Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157508
b: refs/heads/master
c: 21002e2
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jun 13, 2009
1 parent c0da762 commit a02d49b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e79261f302083cbc6aa95e0f778e3583b1ab36e
refs/heads/master: 21002e20767292d85701154cdf12a591b45f0979
13 changes: 12 additions & 1 deletion trunk/sound/soc/codecs/wm8900.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
#define WM8900_REG_CLOCKING2_DAC_CLKDIV 0x1c

#define WM8900_REG_DACCTRL_MUTE 0x004
#define WM8900_REG_DACCTRL_DAC_SB_FILT 0x100
#define WM8900_REG_DACCTRL_AIF_LRCLKRATE 0x400

#define WM8900_REG_AUDIO3_ADCLRC_DIR 0x0800
Expand Down Expand Up @@ -439,7 +440,6 @@ SOC_SINGLE("DAC Soft Mute Switch", WM8900_REG_DACCTRL, 6, 1, 1),
SOC_ENUM("DAC Mute Rate", dac_mute_rate),
SOC_SINGLE("DAC Mono Switch", WM8900_REG_DACCTRL, 9, 1, 0),
SOC_ENUM("DAC Deemphasis", dac_deemphasis),
SOC_SINGLE("DAC Sloping Stopband Filter Switch", WM8900_REG_DACCTRL, 8, 1, 0),
SOC_SINGLE("DAC Sigma-Delta Modulator Clock Switch", WM8900_REG_DACCTRL,
12, 1, 0),

Expand Down Expand Up @@ -743,6 +743,17 @@ static int wm8900_hw_params(struct snd_pcm_substream *substream,

wm8900_write(codec, WM8900_REG_AUDIO1, reg);

if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
reg = wm8900_read(codec, WM8900_REG_DACCTRL);

if (params_rate(params) <= 24000)
reg |= WM8900_REG_DACCTRL_DAC_SB_FILT;
else
reg &= ~WM8900_REG_DACCTRL_DAC_SB_FILT;

wm8900_write(codec, WM8900_REG_DACCTRL, reg);
}

return 0;
}

Expand Down

0 comments on commit a02d49b

Please sign in to comment.