From: Mark Brown Date: Fri, 3 Dec 2010 16:02:10 +0000 (+0000) Subject: ASoC: When disabling WM8994 FLL force a source selection X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4514e8997fbefd5befd6176ac9785e287b4daed4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASoC: When disabling WM8994 FLL force a source selection When we disable the WM8994 FLL code path sharing means that we end up writing out a configuration. Currently this is the currently active input and output frequency (which causes snd_soc_update_bits() to suppress actual writes both immediately and in the common case where we reenable the same configuration later) but we allow machine drivers to pass through a source of zero. Since the register values written are one less than the source constants this causes corruption of other bitfields in the register. Fix this by using the most recently configured FLL source when none is provided. Signed-off-by: Mark Brown Acked-by: Liam Girdwood Cc: stable@kernel.org --- diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index af3a98ae0579..b37e95c4e7c7 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -1677,6 +1677,7 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src, /* Allow no source specification when stopping */ if (freq_out) return -EINVAL; + src = wm8994->fll[id].src; break; case WM8994_FLL_SRC_MCLK1: case WM8994_FLL_SRC_MCLK2: