diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-15 11:22:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-15 11:22:00 -0700 |
commit | 1b68c9596ce17a1e06918ed65fc3d19b92b04aab (patch) | |
tree | d7588c281a92fb30604ddc23f88f748be028921d /sound/soc | |
parent | 5a4179460cb50d939a2ae713cf88fcbff75f2c1c (diff) | |
parent | aaae5272118bcce90d11629f15bc01ea8e545e6d (diff) | |
download | op-kernel-dev-1b68c9596ce17a1e06918ed65fc3d19b92b04aab.zip op-kernel-dev-1b68c9596ce17a1e06918ed65fc3d19b92b04aab.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: sound/usb/format: silence uninitialized variable warnings
MAINTAINERS: Add Ian Lartey as comaintaner for Wolfson devices
MAINTAINERS: Make Wolfson entry also cover CODEC drivers
ASoC: Only tweak WM8994 chip configuration on devices up to rev D
ASoC: Optimise DSP performance for WM8994
ALSA: hda - Fix dynamic ADC change working again
ALSA: hda - Restrict PCM parameters per ELD information over HDMI
sound: oss: sh_dac_audio.c removed duplicated #include
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index a87046a..522249d 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -95,6 +95,7 @@ struct wm8994_priv { struct wm8994_micdet micdet[2]; + int revision; struct wm8994_pdata *pdata; }; @@ -3070,6 +3071,8 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai, static int wm8994_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { + struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); + switch (level) { case SND_SOC_BIAS_ON: break; @@ -3082,11 +3085,16 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_STANDBY: if (codec->bias_level == SND_SOC_BIAS_OFF) { - /* Tweak DC servo configuration for improved - * performance. */ - snd_soc_write(codec, 0x102, 0x3); - snd_soc_write(codec, 0x56, 0x3); - snd_soc_write(codec, 0x102, 0); + /* Tweak DC servo and DSP configuration for + * improved performance. */ + if (wm8994->revision < 4) { + /* Tweak DC servo and DSP configuration for + * improved performance. */ + snd_soc_write(codec, 0x102, 0x3); + snd_soc_write(codec, 0x56, 0x3); + snd_soc_write(codec, 0x817, 0); + snd_soc_write(codec, 0x102, 0); + } /* Discharge LINEOUT1 & 2 */ snd_soc_update_bits(codec, WM8994_ANTIPOP_1, @@ -3919,7 +3927,6 @@ static int wm8994_codec_probe(struct platform_device *pdev) struct wm8994_priv *wm8994; struct snd_soc_codec *codec; int i; - u16 rev; if (wm8994_codec) { dev_err(&pdev->dev, "Another WM8994 is registered\n"); @@ -3973,8 +3980,8 @@ static int wm8994_codec_probe(struct platform_device *pdev) wm8994->reg_cache[i] = 0; /* Set revision-specific configuration */ - rev = snd_soc_read(codec, WM8994_CHIP_REVISION); - switch (rev) { + wm8994->revision = snd_soc_read(codec, WM8994_CHIP_REVISION); + switch (wm8994->revision) { case 2: case 3: wm8994->hubs.dcs_codes = -5; |