From patchwork Tue Jan 16 09:38:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13520610 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 39AAD134A1; Tue, 16 Jan 2024 09:39:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="srMWK9ab" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E34AC43330; Tue, 16 Jan 2024 09:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705397981; bh=mnsvv8nLXcpID7aeu/iuGLMoF7xZR5DEBr8yX7bAx7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=srMWK9ab1BIYiHFwgI2B2+w1VwIwAs5MRYycieUR/UqX2/NlVT1DqOvkuvQZFwuI2 1NZ2CkD1LX+bjLz1x75526r3oggFIXzPzVbwpcvY8bkZ0enYTmIiSJkDxokVwWjG96 U8HrIVW/M0I9DB0vq0SxvTqBaZlewFzpm4DPwn9aF4cZIbXdETXpbmRThEmHC30v9M ShVnMrj0oKVqRsfmLodGn59RPmz1aySjA3HTv9m5vGaUYvA9juNQGy+SiIkvVfMiUn kfR3DcAi1pqcnjGTyglSKBEL70kFgKP0vqpqlwVChEWtub2LLiFsNMzCWuTg8UmEEI yt2hpY6514q5Q== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rPfv6-00053V-18; Tue, 16 Jan 2024 10:39:44 +0100 From: Johan Hovold To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/7] ASoC: codecs: lpass-wsa-macro: drop dead mixer-path gain hack Date: Tue, 16 Jan 2024 10:38:59 +0100 Message-ID: <20240116093903.19403-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240116093903.19403-1-johan+linaro@kernel.org> References: <20240116093903.19403-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The vendor driver modifies the gain settings behind the back of user space but some of these hacks never made it upstream except for some essentially dead code that reads out the (cached) gain setting and writes it back again on DAPM events. Drop the incomplete and pointless hack when enabling mixer paths. Signed-off-by: Johan Hovold --- sound/soc/codecs/lpass-wsa-macro.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 7de221464d47..36a8f1980c6e 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -1220,27 +1220,20 @@ 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; } 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, CDC_WSA_RX_PATH_MIX_CLK_EN_MASK,