Re: [PATCH] ASoC: msm8916-wcd-digital: Remove broken MIX2 DAPM routes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 09, 2019 at 10:15:57AM +0100, Srinivas Kandagatla wrote:
> Hi Stephan,
> Thanks for testing and reporting this!
> 
> On 07/10/2019 19:19, Stephan Gerhold wrote:
> > Since 5.3-rc1, the kernel (correctly) complains about missing
> > widgets when loading msm8916-wcd-digital:
> > 
> > 	ASoC: no sink widget found for RX1 MIX2 INP1
> > 	ASoC: Failed to add route IIR1 -> IIR1 -> RX1 MIX2 INP1
> > 	ASoC: no sink widget found for RX2 MIX2 INP1
> > 	ASoC: Failed to add route IIR1 -> IIR1 -> RX2 MIX2 INP1
> > 	ASoC: no sink widget found for RX1 MIX2 INP1
> > 	ASoC: Failed to add route IIR2 -> IIR2 -> RX1 MIX2 INP1
> > 	ASoC: no sink widget found for RX2 MIX2 INP1
> > 	ASoC: Failed to add route IIR2 -> IIR2 -> RX2 MIX2 INP1
> > 
> > This happens because RX1/2 MIX2 INP1 is not actually supported by
> > msm8916-wcd-digital for some reason. There were some traces of it
> 
> RX1/2 MIX2 path is supported by the codec with IIR1 and IIR2 inputs on INP1.
> 
> MIX2 path was not added when we added first codec support as there was no
> IIR support. I think I totally missed adding this while adding IIR support.
> Better fix here would be to add that missing path.
> 

Either way is fine for me, as long as it gets fixed for 5.4 :)

> Can you try this patch?
> 
> ------------------------------------->cut<-----------------------------
> 
> From c54cc63897794efdf3c9fa8886d8377f80c272f8 Mon Sep 17 00:00:00 2001
> From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
> Date: Wed, 9 Oct 2019 10:10:09 +0100
> Subject: [PATCH] ASoC: msm8916-wcd-digital: add missing MIX2 path for RX1/2
> 
> This patch adds missing MIX2 path on RX1/2 which take IIR1 and
> IIR2 as inputs.
> 
> Without this patch sound card fails to intialize with below warning:
> 
>  ASoC: no sink widget found for RX1 MIX2 INP1
>  ASoC: Failed to add route IIR1 -> IIR1 -> RX1 MIX2 INP1
>  ASoC: no sink widget found for RX2 MIX2 INP1
>  ASoC: Failed to add route IIR1 -> IIR1 -> RX2 MIX2 INP1
>  ASoC: no sink widget found for RX1 MIX2 INP1
>  ASoC: Failed to add route IIR2 -> IIR2 -> RX1 MIX2 INP1
>  ASoC: no sink widget found for RX2 MIX2 INP1
>  ASoC: Failed to add route IIR2 -> IIR2 -> RX2 MIX2 INP1
> 
> Reported-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
> ---
>  sound/soc/codecs/msm8916-wcd-digital.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/sound/soc/codecs/msm8916-wcd-digital.c
> b/sound/soc/codecs/msm8916-wcd-digital.c
> index 9fa5d44fdc79..58b2468fb2a7 100644
> --- a/sound/soc/codecs/msm8916-wcd-digital.c
> +++ b/sound/soc/codecs/msm8916-wcd-digital.c
> @@ -243,6 +243,10 @@ static const char *const rx_mix1_text[] = {
>  	"ZERO", "IIR1", "IIR2", "RX1", "RX2", "RX3"
>  };
> 
> +static const char * const rx_mix2_text[] = {
> +	"ZERO", "IIR1", "IIR2"
> +};
> +
>  static const char *const dec_mux_text[] = {
>  	"ZERO", "ADC1", "ADC2", "ADC3", "DMIC1", "DMIC2"
>  };
> @@ -270,6 +274,16 @@ static const struct soc_enum rx3_mix1_inp_enum[] = {
>  	SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX3_B2_CTL, 0, 6, rx_mix1_text),
>  };
> 
> +/* RX1 MIX2 */
> +static const struct soc_enum rx_mix2_inp1_chain_enum =
> +	SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX1_B3_CTL,
> +		0, 3, rx_mix2_text);
> +
> +/* RX2 MIX2 */
> +static const struct soc_enum rx2_mix2_inp1_chain_enum =
> +	SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX2_B3_CTL,
> +		0, 3, rx_mix2_text);
> +
>  /* DEC */
>  static const struct soc_enum dec1_mux_enum = SOC_ENUM_SINGLE(
>  				LPASS_CDC_CONN_TX_B1_CTL, 0, 6, dec_mux_text);
> @@ -309,6 +323,10 @@ static const struct snd_kcontrol_new rx3_mix1_inp2_mux
> = SOC_DAPM_ENUM(
>  				"RX3 MIX1 INP2 Mux", rx3_mix1_inp_enum[1]);
>  static const struct snd_kcontrol_new rx3_mix1_inp3_mux = SOC_DAPM_ENUM(
>  				"RX3 MIX1 INP3 Mux", rx3_mix1_inp_enum[2]);
> +static const struct snd_kcontrol_new rx1_mix2_inp1_mux = SOC_DAPM_ENUM(
> +				"RX1 MIX2 INP1 Mux", rx_mix2_inp1_chain_enum);
> +static const struct snd_kcontrol_new rx2_mix2_inp1_mux = SOC_DAPM_ENUM(
> +				"RX2 MIX2 INP1 Mux", rx2_mix2_inp1_chain_enum);
> 
>  /* Digital Gain control -38.4 dB to +38.4 dB in 0.3 dB steps */
>  static const DECLARE_TLV_DB_SCALE(digital_gain, -3840, 30, 0);
> @@ -740,6 +758,10 @@ static const struct snd_soc_dapm_widget
> msm8916_wcd_digital_dapm_widgets[] = {
>  			 &rx3_mix1_inp2_mux),
>  	SND_SOC_DAPM_MUX("RX3 MIX1 INP3", SND_SOC_NOPM, 0, 0,
>  			 &rx3_mix1_inp3_mux),
> +	SND_SOC_DAPM_MUX("RX1 MIX2 INP1", SND_SOC_NOPM, 0, 0,
> +			 &rx1_mix2_inp1_mux),
> +	SND_SOC_DAPM_MUX("RX2 MIX2 INP1", SND_SOC_NOPM, 0, 0,
> +			 &rx2_mix2_inp1_mux),
> 
>  	SND_SOC_DAPM_MUX("CIC1 MUX", SND_SOC_NOPM, 0, 0, &cic1_mux),
>  	SND_SOC_DAPM_MUX("CIC2 MUX", SND_SOC_NOPM, 0, 0, &cic2_mux),
> -- 
> 2.21.0
> 
> ------------------------------------->cut<-----------------------------
> 

Thanks for the patch!

I think your mail client messed it up, but I managed to apply it with
some manual fixes. It seems to work fine too:

Tested-by: Stephan Gerhold <stephan@xxxxxxxxxxx>

Thanks,
Stephan
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux