Skip to contentSkip to conversation

ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode

PATCH In review Axel Lin 3 participants 4 messages Nov 24, 2010

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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.

---
 sound/soc/codecs/wm8961.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8961.c +1 -1
index a0bb972..e4638e6 100644
@@ -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;
Signature · 1 line
1.7.2
author
#1 lore raw

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.

---
 sound/soc/codecs/wm8961.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8961.c +1 -1
index e4638e6..6b22ef2 100644
@@ -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);
Signature · 1 line
1.7.2