From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 908B335771D for ; Wed, 19 Nov 2025 15:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763566575; cv=none; b=gQlgO/HeK4r/hO+FwBZwxGFsH7EpmKAkqLpt1oO852t32zv3AMxihH+M85LYAnufU3LmKUGB/7wtszvGy4a/PPIEZ0oNndXzhpDRPCjTAbkPe/s0zwykONbUKbnOs38crjJP0fQ9kdbrG4opMdIFiaYEAYIsYG/4YjfVd7u7zwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763566575; c=relaxed/simple; bh=H6DO/DNOAK8r7LOb8c2flayKt4mHB//bqUtHLakHRSg=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=LeQuSYUchjO/2ZYjwBhfnydfOUkZV0ao96MW8BKp5WZvJLzL4cAKx7caEb3NxP7HQecl/h4DSLpwB40r1wH1igU0o7ef9uRkaHcye8pVQJD1ZLWb2mgSAjLg6c9LL8fqChG0CtIEAuFMzpaYrwvSfZXtXrjgP+nKEJp9LbIw8DY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=FloBbVr0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jmDP4c3Q; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="FloBbVr0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jmDP4c3Q" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AJEeDha2131018 for ; Wed, 19 Nov 2025 15:36:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 6S57lJR6lKRo3qdLi+GChr4nY3+rRqb2kkwWE6UisHY=; b=FloBbVr09lGcclax TaXWbkC0tmWY1jFmqrUE+jxv5vFd5FrF7HKgNQGcFOCSKdkMLOKZGE1MNvgPwiYZ rA0jG4HWeDvjJ6yf3FtJU2NGtiByCyz/SQX1Zp8SEJBuzSz3mw/6PL8DkIdwgdNx uN70wQBj1Xz8IfUxa1DuPuixJIXZed1G5LpqeV9BoG6RK56jBz+y/kxYXBRV931/ z2h8I/Y/Wdd3lg3mpkMb95WI0mB1Fa35ats9mPgmB2j5TvukXTGhYbPgbxOTcf1Y 6HGX4RMUgsgx4vM9GBQgwgMgndz1ElDCZMQJt+k9LsEY9jSLcmNSZP7tfvIxQfl2 r9YNAw== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ahfv305ds-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 19 Nov 2025 15:36:11 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8b225760181so858248185a.2 for ; Wed, 19 Nov 2025 07:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763566571; x=1764171371; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=6S57lJR6lKRo3qdLi+GChr4nY3+rRqb2kkwWE6UisHY=; b=jmDP4c3Qwe+a4Qd3lE1D1diTJQ8AWCMI10puZO1fV8Bgi3SUfg4O2V5AWaWZJ6QKBx avFZ1z38xvOI0KDDudRgcgrrgq4AtXlbV1tZtS8rL6knjAaK8wUY1P3I76J3N8xgPVVE rYEHRmDGkyc/UClhVzrycAxVidVYVrz/p464UeCblroMpjlLcARh00z13nBEH/X3PfrO f4ee/3Qiv9dtMCEOc1iGwLaP0sxP1b017NRK8UhOmZNOIpfCTMC0gzmBEFSgZ9ubk9Nq ndyOANEneewqPSQLUwA5m9AnWUPSJSTBuySs3Wyvx4LUiPJ7j7ORP+mkgSsYKFoSMU5V OW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763566571; x=1764171371; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6S57lJR6lKRo3qdLi+GChr4nY3+rRqb2kkwWE6UisHY=; b=pHfoxE/Q4Vrc71knEBag4E3ysTdRxFSWxt50uE0xQgVx/+BZu3iI9m6MaHxxp0sHit AjxGPBPmcHKHKcZYB1VlWsoQnH4EtN+Aue/TsObKvLCqw8VIVKc/c/ciyD+C2V2jSpan bQvdz1834bgmyNBkw81vMDhueqFVGgqgGs7uoIfczdRS6q9Y69VOL+uhfyNkLFRwMdhk pYBT6do1w1AyWlT2zICqljkph2d1sv2xolgNgbuOnxmjCf5qryuw98908M4rjFRLzyLv Wc4vL0l0NAi1AeRXDzGS4Hv7nbNF3UgmuCZtHc+WVap4CHpXpnJ7fcKiwwbZdP+wNxDx +8BQ== X-Forwarded-Encrypted: i=1; AJvYcCUXYCCKZ9gDS82teMpHGotCgkO6T111IIdZrVDrg6R1SYMqEIxZ2Evesf2RoRw5KFc1Heb3gDfGKHzJAvc=@vger.kernel.org X-Gm-Message-State: AOJu0YxZxntd3PmXhzA+kB/Y9aaDhRTimWtVcZgj/HjsmG3waXjzjGxl 4QrOtpFn6oVBCFe47tXAmvFO71GuwYCdoSHkMxxqb31fQ+9ByFxtzoK9ilywVhzXPHxZgU9GHwQ gnK28T1FGcjnDOdMbBpmYC8LUPM7D9pplLXhgaLkHT+ens/gttSnOzxRIZB3OEeBbR9E= X-Gm-Gg: ASbGncs17Oj13Jzw3w6VhDJ+d2FYaj9vbaqKInXZPkcMvuKWIsfFLMc6pfz6l9hU2HW aaaSbNrMrPq4Lhia9jdl73SCJoBldh8yYZ8cUOyuiGTx+52cVegusDuGQyDTbb62niY2glQw3FP 2eFxtaWn6zjRWysfR32PRQc1w4LxXt7uUXgcRcy33EsrEd0Q4ZhvTv7ZcHYeHeVjUJWZS1PjRBF zLLNBrYU/77prWJwcHNGTDZDLvAT1nuSugFaW9kO3PhD6Mz74EzdslsugG5Lul2U+vOuBo63nQr fKVF6MXXRqqMf6A9cLoXRtYTK5iNsa6GiIuHwgCn37d0vZ58VYi4M0me1ezgEgh+dJi1Y+5wd7J Q5Q5duF+EMCkCMSBQiWxBGqCmCMQJFDV01NhH X-Received: by 2002:a05:622a:1115:b0:4e8:8372:d435 with SMTP id d75a77b69052e-4edf2045b19mr266115671cf.3.1763566570249; Wed, 19 Nov 2025 07:36:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRD6358tFM3tNK0GybZvyhnKDUxrxLeyixXpUSBQe6otQO470BIJt5Qb4sB0/rryyO8waPDQ== X-Received: by 2002:a05:622a:1115:b0:4e8:8372:d435 with SMTP id d75a77b69052e-4edf2045b19mr266115231cf.3.1763566569476; Wed, 19 Nov 2025 07:36:09 -0800 (PST) Received: from [192.168.68.121] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-42b5ce849ddsm32231884f8f.14.2025.11.19.07.36.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Nov 2025 07:36:09 -0800 (PST) Message-ID: Date: Wed, 19 Nov 2025 15:36:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Srinivas Kandagatla Subject: Re: [PATCH 2/9] ASoC: codecs: lpass-wsa-macro: remove useless gain read/write sequence To: Jonathan Marek , linux-arm-msm@vger.kernel.org Cc: Srinivas Kandagatla , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "open list:QCOM AUDIO (ASoC) DRIVERS" , open list References: <20251117051523.16462-1-jonathan@marek.ca> <20251117051523.16462-2-jonathan@marek.ca> Content-Language: en-US In-Reply-To: <20251117051523.16462-2-jonathan@marek.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=YNmSCBGx c=1 sm=1 tr=0 ts=691de3eb cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=ZsC4DHZuhs/kKio7QBcDoQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RAbU-raeAAAA:8 a=EUspDBNiAAAA:8 a=RmIaNmV--FFQmAx1t8oA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 a=JiizpSU_mAIq9zsZDqn2:22 X-Proofpoint-ORIG-GUID: m8LiZrkekObkL_FXNfxSnLuxyJtl22Ps X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTE5MDEyNCBTYWx0ZWRfXyOzMRdirpIP+ 2w+jjQYm6OtQn1leegclCM2voTHwJPpKxaohgd2kvQoPfKge/yP/iUj21rC/1lttZK1jQflBxSF VNTxJ1t/q3mJm5Z5pcZLMipqZz5Nhn21u5UJg5zst/Wr/bFIsJ94uAJ6rwzRZVlFb+h6f24wiu7 Sos9t1/1OVMFF7zCcdMe1KaegIK5INNl59AbylkPjLUQbukrkBc3f5WB9ADkJeEz1KcK+sugM29 0sms1LC1FMIjfysogjfX2znSRCaiiLz6+xovtBXtCXFi7GCahETGn8oS7VEuI9kUfPwgBLNit64 Lk460Xdr0SmxZg9qEpTF8uLVcTavkmtIhj/1wHeUtioBe/xD6/M8lOb212dy1uMpa3ylRhFs/Wy HW3B12gxrJPcx8PGd9FH0SWSJhzG1g== X-Proofpoint-GUID: m8LiZrkekObkL_FXNfxSnLuxyJtl22Ps X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-19_04,2025-11-18_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 clxscore=1015 bulkscore=0 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511190124 On 11/17/25 5:15 AM, Jonathan Marek wrote: > Reading and writing the same value to this register does nothing. > > Looking at downstream driver it seems there was meant to be an offset added > > Signed-off-by: Jonathan Marek Tested-by: Srinivas Kandagatla #on T14s Reviewed-by: Srinivas Kandagatla > --- > sound/soc/codecs/lpass-wsa-macro.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c > index 6e54c1beac8f9..6f16d54aee401 100644 > --- a/sound/soc/codecs/lpass-wsa-macro.c > +++ b/sound/soc/codecs/lpass-wsa-macro.c > @@ -1567,17 +1567,14 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w, > struct snd_kcontrol *kcontrol, int event) > { > struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); > - u16 path_reg, gain_reg; > - int val; > + u16 path_reg; > > switch (w->shift) { > case WSA_MACRO_RX_MIX0: > path_reg = CDC_WSA_RX0_RX_PATH_MIX_CTL; > - gain_reg = CDC_WSA_RX0_RX_VOL_MIX_CTL; > break; > case WSA_MACRO_RX_MIX1: > path_reg = CDC_WSA_RX1_RX_PATH_MIX_CTL; > - gain_reg = CDC_WSA_RX1_RX_VOL_MIX_CTL; > break; > default: > return 0; > @@ -1585,8 +1582,6 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w, > > switch (event) { > case SND_SOC_DAPM_POST_PMU: > - val = snd_soc_component_read(component, gain_reg); > - snd_soc_component_write(component, gain_reg, val); > break; > case SND_SOC_DAPM_POST_PMD: > snd_soc_component_update_bits(component, path_reg, > @@ -1931,7 +1926,6 @@ static int wsa_macro_enable_interpolator(struct snd_soc_dapm_widget *w, > struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); > u16 gain_reg; > u16 reg; > - int val; > struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); > > if (w->shift == WSA_MACRO_COMP1) { > @@ -1971,8 +1965,6 @@ static int wsa_macro_enable_interpolator(struct snd_soc_dapm_widget *w, > CDC_WSA_RX_PGA_HALF_DB_MASK, > CDC_WSA_RX_PGA_HALF_DB_ENABLE); > } > - val = snd_soc_component_read(component, gain_reg); > - snd_soc_component_write(component, gain_reg, val); > wsa_macro_config_ear_spkr_gain(component, wsa, > event, gain_reg); > break;