summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-08-15 13:56:40 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-08-15 13:56:40 (GMT)
commitec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 (patch)
treec7fcfd4ad7ad1875e611db3a2bd75d64f603c355 /sound/soc/codecs
parent6bfb6aa91f61f2a7c526a6353c8c50676ca528da (diff)
parenta532f97c71c7a952531e02b0994104c532fbef0f (diff)
downloadlinux-fsl-qoriq-ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1.tar.xz
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')
-rw-r--r--sound/soc/codecs/ad1980.c10
-rw-r--r--sound/soc/codecs/ad1980.h6
-rw-r--r--sound/soc/codecs/wm8580.c6
-rw-r--r--sound/soc/codecs/wm8994.c24
4 files changed, 34 insertions, 12 deletions
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index 1371afa..81a4440 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -11,6 +11,14 @@
* option) any later version.
*/
+/*
+ * WARNING:
+ *
+ * Because Analog Devices Inc. discontinued the ad1980 sound chip since
+ * Sep. 2009, this ad1980 driver is not maintained, tested and supported
+ * by ADI now.
+ */
+
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
@@ -283,6 +291,6 @@ static void __exit ad1980_exit(void)
}
module_exit(ad1980_exit);
-MODULE_DESCRIPTION("ASoC ad1980 driver");
+MODULE_DESCRIPTION("ASoC ad1980 driver (Obsolete)");
MODULE_AUTHOR("Roy Huang, Cliff Cai");
MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/ad1980.h b/sound/soc/codecs/ad1980.h
index 29b5a87..eb0af44 100644
--- a/sound/soc/codecs/ad1980.h
+++ b/sound/soc/codecs/ad1980.h
@@ -1,5 +1,11 @@
/*
* ad1980.h -- ad1980 Soc Audio driver
+ *
+ * WARNING:
+ *
+ * Because Analog Devices Inc. discontinued the ad1980 sound chip since
+ * Sep. 2009, this ad1980 driver is not maintained, tested and supported
+ * by ADI now.
*/
#ifndef _AD1980_H
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index d66db4b..af4517e 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -260,9 +260,9 @@ SOC_DOUBLE("DAC2 Invert Switch", WM8580_DAC_CONTROL4, 2, 3, 1, 0),
SOC_DOUBLE("DAC3 Invert Switch", WM8580_DAC_CONTROL4, 4, 5, 1, 0),
SOC_SINGLE("DAC ZC Switch", WM8580_DAC_CONTROL5, 5, 1, 0),
-SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 0),
-SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 0),
-SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 0),
+SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 1),
+SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 1),
+SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 1),
SOC_DOUBLE("Capture Switch", WM8580_ADC_CONTROL1, 0, 1, 1, 1),
SOC_SINGLE("Capture High-Pass Filter Switch", WM8580_ADC_CONTROL1, 4, 1, 0),
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 7823f92..76a066e 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -94,6 +94,7 @@ struct wm8994_priv {
struct wm8994_micdet micdet[2];
+ int revision;
struct wm8994_pdata *pdata;
};
@@ -3073,6 +3074,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;
@@ -3085,11 +3088,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,
@@ -3859,7 +3867,7 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data)
static int wm8994_codec_probe(struct snd_soc_codec *codec)
{
struct wm8994_priv *wm8994;
- int ret, i, rev;
+ int ret, i;
codec->control_data = dev_get_drvdata(codec->dev->parent);
@@ -3889,8 +3897,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
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;