[patch 086/176] ASoC: When disabling WM8994 FLL force a source selection

From: Greg KH
Date: Tue Feb 15 2011 - 20:09:42 EST


2.6.36-stable review patch. If anyone has any objections, please let us know.

------------------

From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

commit 4514e8997fbefd5befd6176ac9785e287b4daed4 upstream.

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 <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Acked-by: Liam Girdwood <lrg@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
sound/soc/codecs/wm8994.c | 1 +
1 file changed, 1 insertion(+)

--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2914,6 +2914,7 @@ static int wm8994_set_fll(struct snd_soc
/* 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:


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/