Hebbar, Gururaja | 21 Jun 2012 12:38
Picon
Favicon

[PATCH] davinci:mcasp: Fix codec pll configure bug

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.

However on some platforms (like AM335x EVM-SK), pll-p may have different
values across different sampling frequencies. In such case, above code
configures the pll with a wrong value.
Because of this bug, when a audio stream is played with pll value
different from previous stream, audio is heard as stretched.

Fix the same by clearing the mask and then writing the value.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar <at> ti.com>
---
 sound/soc/codecs/tlv320aic3x.c |    2 +-
 sound/soc/codecs/tlv320aic3x.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index d0dbac1..8c1977b 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
 <at>  <at>  -963,7 +963,7  <at>  <at>  static int aic3x_hw_params(struct snd_pcm_substream *substream,
 	}
(Continue reading)

Hebbar, Gururaja | 26 Jun 2012 08:23
Picon
Favicon

Re: [PATCH] davinci:mcasp: Fix codec pll configure bug

All,

Kindly ignore this patch I will resend a corrected patch with below changes

1. add asoc codec maintainers (Mark Brown & Liam Girdwood)
2. modify the subject to indicate ASOC and codec as tlv320aic3x

On Thu, Jun 21, 2012 at 16:08:28, 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.
> 
> However on some platforms (like AM335x EVM-SK), pll-p may have different
> values across different sampling frequencies. In such case, above code
> configures the pll with a wrong value.
> Because of this bug, when a audio stream is played with pll value
> different from previous stream, audio is heard as stretched.
> 
> Fix the same by clearing the mask and then writing the value.
> 
> Signed-off-by: Hebbar, Gururaja <gururaja.hebbar <at> ti.com>
> ---
>  sound/soc/codecs/tlv320aic3x.c |    2 +-
>  sound/soc/codecs/tlv320aic3x.h |    1 +
(Continue reading)


Gmane