[alsa-devel] [PATCH V2] ASoC: tlv320aic3x: Fix codec pll configure bug

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Jun 26 10:54:03 CEST 2012

On Tue, Jun 26, 2012 at 11:33:43AM +0530, Hebbar, Gururaja wrote:
> In sound/soc/codecs/tlv320aic3x.c
>         data = snd_soc_read(codec, AIC3X_PLL_PROGA_REG);
>         snd_soc_write(codec, AIC3X_PLL_PROGA_REG,
>                       data | (pll_p << PLLP_SHIFT));
> In the above code, pll-p value is OR'ed with previous value without
> clearing it. Bug is not seen if pll-p value doesn't change across
> Sampling frequency.

A better fix is to change the code to use snd_soc_update_bits() rather
than open code it.  This is more idiomatic and will suppress writes if
they don't change anything.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120626/ebaf029c/attachment.sig 

More information about the Alsa-devel mailing list