From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Stephan Gerhold <stephan@gerhold.net>, Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [alsa-devel] [PATCH] ASoC: msm8916-wcd-digital: Reset RX interpolation path after use
Date: Mon, 13 Jan 2020 11:30:48 +0000 [thread overview]
Message-ID: <33e68247-ff11-6c0c-b91c-9b406f9607cd@linaro.org> (raw)
In-Reply-To: <20200105102753.83108-1-stephan@gerhold.net>
On 05/01/2020 10:27, Stephan Gerhold wrote:
> For some reason, attempting to route audio through QDSP6 on MSM8916
> causes the RX interpolation path to get "stuck" after playing audio
> a few times. In this situation, the analog codec part is still working,
> but the RX path in the digital codec stops working, so you only hear
> the analog parts powering up. After a reboot everything works again.
>
> So far I was not able to reproduce the problem when using lpass-cpu.
>
> The downstream kernel driver avoids this by resetting the RX
> interpolation path after use. In mainline we do something similar
> for the TX decimator (LPASS_CDC_CLK_TX_RESET_B1_CTL), but the
> interpolator reset (LPASS_CDC_CLK_RX_RESET_CTL) got lost when the
> msm8916-wcd driver was split into analog and digital.
>
> Fix this problem by adding the reset to
> msm8916_wcd_digital_enable_interpolator().
>
> Fixes: 150db8c5afa1 ("ASoC: codecs: Add msm8916-wcd digital codec")
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Thanks for the patch and testing it with QDSP6.
> ---
> Tested on msm8916-samsung-a5u:
> - qdsp6 does no longer stop working after playing audio a few times
> - lpass-cpu is still working fine (no difference)
> ---
> sound/soc/codecs/msm8916-wcd-digital.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c
> index 58b2468fb2a7..09fccacadd6b 100644
> --- a/sound/soc/codecs/msm8916-wcd-digital.c
> +++ b/sound/soc/codecs/msm8916-wcd-digital.c
> @@ -586,6 +586,12 @@ static int msm8916_wcd_digital_enable_interpolator(
> snd_soc_component_write(component, rx_gain_reg[w->shift],
> snd_soc_component_read32(component, rx_gain_reg[w->shift]));
> break;
> + case SND_SOC_DAPM_POST_PMD:
We should do this in SND_SOC_DAPM_PRE_PMU rather than in power down
sequence.
> + snd_soc_component_update_bits(component, LPASS_CDC_CLK_RX_RESET_CTL,
> + 1 << w->shift, 1 << w->shift);
> + snd_soc_component_update_bits(component, LPASS_CDC_CLK_RX_RESET_CTL,
> + 1 << w->shift, 0x0);
> + break;
> }
> return 0;
> }
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2020-01-14 13:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-05 10:27 [alsa-devel] [PATCH] ASoC: msm8916-wcd-digital: Reset RX interpolation path after use Stephan Gerhold
2020-01-13 11:30 ` Srinivas Kandagatla [this message]
2020-01-13 13:10 ` Stephan Gerhold
2020-01-13 13:55 ` Srinivas Kandagatla
2020-01-13 15:12 ` [alsa-devel] Applied "ASoC: msm8916-wcd-digital: Reset RX interpolation path after use" to the asoc tree Mark Brown
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=33e68247-ff11-6c0c-b91c-9b406f9607cd@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=stephan@gerhold.net \
--cc=tiwai@suse.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).