diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-15 09:56:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-15 09:56:40 -0400 |
commit | ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 (patch) | |
tree | c7fcfd4ad7ad1875e611db3a2bd75d64f603c355 /sound/soc/codecs/wm8994.c | |
parent | 6bfb6aa91f61f2a7c526a6353c8c50676ca528da (diff) | |
parent | a532f97c71c7a952531e02b0994104c532fbef0f (diff) |
Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-2.6.37
Trivial overlap with the removal of the local revision variable.
Conflicts:
sound/soc/codecs/wm8994.c
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 7823f92413f3..76a066e908ed 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -94,6 +94,7 @@ struct wm8994_priv { | |||
94 | 94 | ||
95 | struct wm8994_micdet micdet[2]; | 95 | struct wm8994_micdet micdet[2]; |
96 | 96 | ||
97 | int revision; | ||
97 | struct wm8994_pdata *pdata; | 98 | struct wm8994_pdata *pdata; |
98 | }; | 99 | }; |
99 | 100 | ||
@@ -3073,6 +3074,8 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai, | |||
3073 | static int wm8994_set_bias_level(struct snd_soc_codec *codec, | 3074 | static int wm8994_set_bias_level(struct snd_soc_codec *codec, |
3074 | enum snd_soc_bias_level level) | 3075 | enum snd_soc_bias_level level) |
3075 | { | 3076 | { |
3077 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | ||
3078 | |||
3076 | switch (level) { | 3079 | switch (level) { |
3077 | case SND_SOC_BIAS_ON: | 3080 | case SND_SOC_BIAS_ON: |
3078 | break; | 3081 | break; |
@@ -3085,11 +3088,16 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec, | |||
3085 | 3088 | ||
3086 | case SND_SOC_BIAS_STANDBY: | 3089 | case SND_SOC_BIAS_STANDBY: |
3087 | if (codec->bias_level == SND_SOC_BIAS_OFF) { | 3090 | if (codec->bias_level == SND_SOC_BIAS_OFF) { |
3088 | /* Tweak DC servo configuration for improved | 3091 | /* Tweak DC servo and DSP configuration for |
3089 | * performance. */ | 3092 | * improved performance. */ |
3090 | snd_soc_write(codec, 0x102, 0x3); | 3093 | if (wm8994->revision < 4) { |
3091 | snd_soc_write(codec, 0x56, 0x3); | 3094 | /* Tweak DC servo and DSP configuration for |
3092 | snd_soc_write(codec, 0x102, 0); | 3095 | * improved performance. */ |
3096 | snd_soc_write(codec, 0x102, 0x3); | ||
3097 | snd_soc_write(codec, 0x56, 0x3); | ||
3098 | snd_soc_write(codec, 0x817, 0); | ||
3099 | snd_soc_write(codec, 0x102, 0); | ||
3100 | } | ||
3093 | 3101 | ||
3094 | /* Discharge LINEOUT1 & 2 */ | 3102 | /* Discharge LINEOUT1 & 2 */ |
3095 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, | 3103 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, |
@@ -3859,7 +3867,7 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data) | |||
3859 | static int wm8994_codec_probe(struct snd_soc_codec *codec) | 3867 | static int wm8994_codec_probe(struct snd_soc_codec *codec) |
3860 | { | 3868 | { |
3861 | struct wm8994_priv *wm8994; | 3869 | struct wm8994_priv *wm8994; |
3862 | int ret, i, rev; | 3870 | int ret, i; |
3863 | 3871 | ||
3864 | codec->control_data = dev_get_drvdata(codec->dev->parent); | 3872 | codec->control_data = dev_get_drvdata(codec->dev->parent); |
3865 | 3873 | ||
@@ -3889,8 +3897,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3889 | wm8994->reg_cache[i] = 0; | 3897 | wm8994->reg_cache[i] = 0; |
3890 | 3898 | ||
3891 | /* Set revision-specific configuration */ | 3899 | /* Set revision-specific configuration */ |
3892 | rev = snd_soc_read(codec, WM8994_CHIP_REVISION); | 3900 | wm8994->revision = snd_soc_read(codec, WM8994_CHIP_REVISION); |
3893 | switch (rev) { | 3901 | switch (wm8994->revision) { |
3894 | case 2: | 3902 | case 2: |
3895 | case 3: | 3903 | case 3: |
3896 | wm8994->hubs.dcs_codes = -5; | 3904 | wm8994->hubs.dcs_codes = -5; |