[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <901874d6-9b1f-714b-31bf-0e1e61956890@linaro.org>
Date: Fri, 5 Mar 2021 09:18:57 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Jonathan Marek <jonathan@...ek.ca>, linux-arm-msm@...r.kernel.org
Cc: Banajit Goswami <bgoswami@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
"moderated list:QCOM AUDIO (ASoC) DRIVERS"
<alsa-devel@...a-project.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: codecs: lpass-wsa-macro: fix RX MIX input controls
Thanks Jonathan for testing the Mix path!
On 05/03/2021 00:50, Jonathan Marek wrote:
> Attempting to use the RX MIX path at 48kHz plays at 96kHz, because these
> controls are incorrectly toggling the first bit of the register, which
> is part of the FS_RATE field.
>
Yes bit 0 is part of PCM RATE!
> Fix the problem by using the same method used by the "WSA RX_MIX EC0_MUX"
> control, which is to use SND_SOC_NOPM as the register and use an enum in
> the shift field instead.
>
> Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
> Signed-off-by: Jonathan Marek <jonathan@...ek.ca>
> ---
This looks good to me.
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> sound/soc/codecs/lpass-wsa-macro.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
> index f399f4dff5511..bd2561f9fb9fa 100644
> --- a/sound/soc/codecs/lpass-wsa-macro.c
> +++ b/sound/soc/codecs/lpass-wsa-macro.c
> @@ -1211,14 +1211,16 @@ 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 gain_reg;
> + u16 path_reg, gain_reg;
> int val;
>
> - switch (w->reg) {
> - case CDC_WSA_RX0_RX_PATH_MIX_CTL:
> + 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 CDC_WSA_RX1_RX_PATH_MIX_CTL:
> + 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:
> @@ -1231,7 +1233,7 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w,
> snd_soc_component_write(component, gain_reg, val);
> break;
> case SND_SOC_DAPM_POST_PMD:
> - snd_soc_component_update_bits(component, w->reg,
> + snd_soc_component_update_bits(component, path_reg,
> CDC_WSA_RX_PATH_MIX_CLK_EN_MASK,
> CDC_WSA_RX_PATH_MIX_CLK_DISABLE);
> break;
> @@ -2068,14 +2070,14 @@ static const struct snd_soc_dapm_widget wsa_macro_dapm_widgets[] = {
> SND_SOC_DAPM_MUX("WSA_RX0 INP0", SND_SOC_NOPM, 0, 0, &rx0_prim_inp0_mux),
> SND_SOC_DAPM_MUX("WSA_RX0 INP1", SND_SOC_NOPM, 0, 0, &rx0_prim_inp1_mux),
> SND_SOC_DAPM_MUX("WSA_RX0 INP2", SND_SOC_NOPM, 0, 0, &rx0_prim_inp2_mux),
> - SND_SOC_DAPM_MUX_E("WSA_RX0 MIX INP", CDC_WSA_RX0_RX_PATH_MIX_CTL,
> - 0, 0, &rx0_mix_mux, wsa_macro_enable_mix_path,
> + SND_SOC_DAPM_MUX_E("WSA_RX0 MIX INP", SND_SOC_NOPM, WSA_MACRO_RX_MIX0,
> + 0, &rx0_mix_mux, wsa_macro_enable_mix_path,
> SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
> SND_SOC_DAPM_MUX("WSA_RX1 INP0", SND_SOC_NOPM, 0, 0, &rx1_prim_inp0_mux),
> SND_SOC_DAPM_MUX("WSA_RX1 INP1", SND_SOC_NOPM, 0, 0, &rx1_prim_inp1_mux),
> SND_SOC_DAPM_MUX("WSA_RX1 INP2", SND_SOC_NOPM, 0, 0, &rx1_prim_inp2_mux),
> - SND_SOC_DAPM_MUX_E("WSA_RX1 MIX INP", CDC_WSA_RX1_RX_PATH_MIX_CTL,
> - 0, 0, &rx1_mix_mux, wsa_macro_enable_mix_path,
> + SND_SOC_DAPM_MUX_E("WSA_RX1 MIX INP", SND_SOC_NOPM, WSA_MACRO_RX_MIX1,
> + 0, &rx1_mix_mux, wsa_macro_enable_mix_path,
> SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
>
> SND_SOC_DAPM_MIXER_E("WSA_RX INT0 MIX", SND_SOC_NOPM, 0, 0, NULL, 0,
>
Powered by blists - more mailing lists