2010-11-24 02:15:30

by Axel Lin

[permalink] [raw]
Subject: [PATCH 1/2] ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode

DACSLOPE bit of Register 06h ADC and DAC Control 2:
0: Normal mode
1: Sloping stop-band mode

Thus in the case of normal mode, we should clear DACSLOPE bit.

Signed-off-by: Axel Lin <[email protected]>
---
sound/soc/codecs/wm8961.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index a0bb972..e4638e6 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -710,7 +710,7 @@ static int wm8961_hw_params(struct snd_pcm_substream *substream,
if (fs <= 24000)
reg |= WM8961_DACSLOPE;
else
- reg &= WM8961_DACSLOPE;
+ reg &= ~WM8961_DACSLOPE;
snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg);

return 0;
--
1.7.2



2010-11-24 02:16:47

by Axel Lin

[permalink] [raw]
Subject: [PATCH 2/2] ASoC: wm8961 - clear WM8961_MCLKDIV bit for freq <= 16500000

MCLKDIV bit of Register 04h Clocking1:
0 : Divide by 1
1 : Divide by 2

Thus in the case of freq <= 16500000, we should clear MCLKDIV bit.

Signed-off-by: Axel Lin <[email protected]>
---
sound/soc/codecs/wm8961.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index e4638e6..6b22ef2 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -735,7 +735,7 @@ static int wm8961_set_sysclk(struct snd_soc_dai *dai, int clk_id,
freq /= 2;
} else {
dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq);
- reg &= WM8961_MCLKDIV;
+ reg &= ~WM8961_MCLKDIV;
}

snd_soc_write(codec, WM8961_CLOCKING1, reg);
--
1.7.2


2010-11-24 10:48:38

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH 1/2] ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode

On Wed, 2010-11-24 at 10:20 +0800, Axel Lin wrote:
> DACSLOPE bit of Register 06h ADC and DAC Control 2:
> 0: Normal mode
> 1: Sloping stop-band mode
>
> Thus in the case of normal mode, we should clear DACSLOPE bit.
>
> Signed-off-by: Axel Lin <[email protected]>

Both

Acked-by: Liam Girdwood <[email protected]>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

2010-11-24 11:27:28

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/2] ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode

On Wed, Nov 24, 2010 at 10:48:32AM +0000, Liam Girdwood wrote:
> On Wed, 2010-11-24 at 10:20 +0800, Axel Lin wrote:
> > DACSLOPE bit of Register 06h ADC and DAC Control 2:
> > 0: Normal mode
> > 1: Sloping stop-band mode
> >
> > Thus in the case of normal mode, we should clear DACSLOPE bit.
> >
> > Signed-off-by: Axel Lin <[email protected]>

> Both

> Acked-by: Liam Girdwood <[email protected]>

And applied. Axel, the list for ALSA patches is [email protected]