summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2020-01-05 11:27:53 +0100
committerMark Brown <broonie@kernel.org>2020-01-13 15:12:28 +0000
commit85578bbd642f65065039b1765ebe1a867d5435b0 (patch)
tree37817a4e33c0d09a31b3f76e3d4557b1cb6f9232 /sound
parent057efcf9faea4769cf1020677d93d040db9b23f3 (diff)
downloadlinux-stable-85578bbd642f65065039b1765ebe1a867d5435b0.tar.gz
linux-stable-85578bbd642f65065039b1765ebe1a867d5435b0.tar.bz2
linux-stable-85578bbd642f65065039b1765ebe1a867d5435b0.zip
ASoC: msm8916-wcd-digital: Reset RX interpolation path after use
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> Link: https://lore.kernel.org/r/20200105102753.83108-1-stephan@gerhold.net Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/msm8916-wcd-digital.c6
1 files changed, 6 insertions, 0 deletions
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:
+ 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;
}