From: Stephan Gerhold <stephan@gerhold.net>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] [PATCH] ASoC: msm8916-wcd-digital: Remove broken MIX2 DAPM routes
Date: Wed, 9 Oct 2019 13:15:41 +0200 [thread overview]
Message-ID: <20191009111541.GA170307@gerhold.net> (raw)
In-Reply-To: <6d324680-de9b-8fe9-5093-abb7cb1f1f83@linaro.org>
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@linaro.org>
> 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@gerhold.net>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> 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@gerhold.net>
Thanks,
Stephan
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-10-09 11:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 18:19 [alsa-devel] [PATCH] ASoC: msm8916-wcd-digital: Remove broken MIX2 DAPM routes Stephan Gerhold
2019-10-09 9:15 ` Srinivas Kandagatla
2019-10-09 11:15 ` Stephan Gerhold [this message]
2019-10-09 11:18 ` Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191009111541.GA170307@gerhold.net \
--to=stephan@gerhold.net \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.