aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-06-24 08:09:35 -0400
committerTakashi Iwai <tiwai@suse.de>2013-06-24 08:09:35 -0400
commit1c6770a38a6652777b9d1592b66e0d8e7dfb6160 (patch)
tree5d619f602e99ace1ad771b0424e21f1defcba695
parente32aa85ab49203104019025eba83f03f88a3a0e3 (diff)
parentb12a530682ec725ff7a95871d8003d1753e315b8 (diff)
Merge tag 'asoc-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v3.10 A few small updates, one small core fix and several simple driver ones. The wm8962 changes are a little large but are pretty important.
-rw-r--r--sound/soc/codecs/Kconfig2
-rw-r--r--sound/soc/codecs/wm8962.c35
-rw-r--r--sound/soc/codecs/wm_adsp.c2
-rw-r--r--sound/soc/soc-dapm.c2
4 files changed, 28 insertions, 13 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 2f45f00e31b0..5841674b6993 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -19,7 +19,7 @@ config SND_SOC_ALL_CODECS
19 select SND_SOC_AD1980 if SND_SOC_AC97_BUS 19 select SND_SOC_AD1980 if SND_SOC_AC97_BUS
20 select SND_SOC_AD73311 20 select SND_SOC_AD73311
21 select SND_SOC_ADAU1373 if I2C 21 select SND_SOC_ADAU1373 if I2C
22 select SND_SOC_ADAV80X 22 select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI
23 select SND_SOC_ADS117X 23 select SND_SOC_ADS117X
24 select SND_SOC_AK4104 if SPI_MASTER 24 select SND_SOC_AK4104 if SPI_MASTER
25 select SND_SOC_AK4535 if I2C 25 select SND_SOC_AK4535 if I2C
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index e9710280e5e1..4b7915bec2f1 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -1600,7 +1600,6 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,
1600 struct snd_ctl_elem_value *ucontrol) 1600 struct snd_ctl_elem_value *ucontrol)
1601{ 1601{
1602 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1602 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
1603 u16 *reg_cache = codec->reg_cache;
1604 int ret; 1603 int ret;
1605 1604
1606 /* Apply the update (if any) */ 1605 /* Apply the update (if any) */
@@ -1609,16 +1608,19 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,
1609 return 0; 1608 return 0;
1610 1609
1611 /* If the left PGA is enabled hit that VU bit... */ 1610 /* If the left PGA is enabled hit that VU bit... */
1612 if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTL_PGA_ENA) 1611 ret = snd_soc_read(codec, WM8962_PWR_MGMT_2);
1613 return snd_soc_write(codec, WM8962_HPOUTL_VOLUME, 1612 if (ret & WM8962_HPOUTL_PGA_ENA) {
1614 reg_cache[WM8962_HPOUTL_VOLUME]); 1613 snd_soc_write(codec, WM8962_HPOUTL_VOLUME,
1614 snd_soc_read(codec, WM8962_HPOUTL_VOLUME));
1615 return 1;
1616 }
1615 1617
1616 /* ...otherwise the right. The VU is stereo. */ 1618 /* ...otherwise the right. The VU is stereo. */
1617 if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTR_PGA_ENA) 1619 if (ret & WM8962_HPOUTR_PGA_ENA)
1618 return snd_soc_write(codec, WM8962_HPOUTR_VOLUME, 1620 snd_soc_write(codec, WM8962_HPOUTR_VOLUME,
1619 reg_cache[WM8962_HPOUTR_VOLUME]); 1621 snd_soc_read(codec, WM8962_HPOUTR_VOLUME));
1620 1622
1621 return 0; 1623 return 1;
1622} 1624}
1623 1625
1624/* The VU bits for the speakers are in a different register to the mute 1626/* The VU bits for the speakers are in a different register to the mute
@@ -3374,7 +3376,6 @@ static int wm8962_probe(struct snd_soc_codec *codec)
3374 int ret; 3376 int ret;
3375 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); 3377 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
3376 struct wm8962_pdata *pdata = dev_get_platdata(codec->dev); 3378 struct wm8962_pdata *pdata = dev_get_platdata(codec->dev);
3377 u16 *reg_cache = codec->reg_cache;
3378 int i, trigger, irq_pol; 3379 int i, trigger, irq_pol;
3379 bool dmicclk, dmicdat; 3380 bool dmicclk, dmicdat;
3380 3381
@@ -3432,8 +3433,9 @@ static int wm8962_probe(struct snd_soc_codec *codec)
3432 3433
3433 /* Put the speakers into mono mode? */ 3434 /* Put the speakers into mono mode? */
3434 if (pdata->spk_mono) 3435 if (pdata->spk_mono)
3435 reg_cache[WM8962_CLASS_D_CONTROL_2] 3436 snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_2,
3436 |= WM8962_SPK_MONO; 3437 WM8962_SPK_MONO_MASK, WM8962_SPK_MONO);
3438
3437 3439
3438 /* Micbias setup, detection enable and detection 3440 /* Micbias setup, detection enable and detection
3439 * threasholds. */ 3441 * threasholds. */
@@ -3721,6 +3723,17 @@ static int wm8962_runtime_resume(struct device *dev)
3721 3723
3722 regcache_sync(wm8962->regmap); 3724 regcache_sync(wm8962->regmap);
3723 3725
3726 regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP,
3727 WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA,
3728 WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA);
3729
3730 /* Bias enable at 2*5k (fast start-up) */
3731 regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1,
3732 WM8962_BIAS_ENA | WM8962_VMID_SEL_MASK,
3733 WM8962_BIAS_ENA | 0x180);
3734
3735 msleep(5);
3736
3724 return 0; 3737 return 0;
3725} 3738}
3726 3739
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 3470b649c0b2..0a3c7f704016 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -279,7 +279,7 @@ static const struct soc_enum wm_adsp2_rate_enum[] = {
279 ARIZONA_DSP1_RATE_SHIFT, 0xf, 279 ARIZONA_DSP1_RATE_SHIFT, 0xf,
280 ARIZONA_RATE_ENUM_SIZE, 280 ARIZONA_RATE_ENUM_SIZE,
281 arizona_rate_text, arizona_rate_val), 281 arizona_rate_text, arizona_rate_val),
282 SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP3_CONTROL_1, 282 SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP4_CONTROL_1,
283 ARIZONA_DSP1_RATE_SHIFT, 0xf, 283 ARIZONA_DSP1_RATE_SHIFT, 0xf,
284 ARIZONA_RATE_ENUM_SIZE, 284 ARIZONA_RATE_ENUM_SIZE,
285 arizona_rate_text, arizona_rate_val), 285 arizona_rate_text, arizona_rate_val),
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c7051c457b75..fe2be283508b 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -64,6 +64,7 @@ static int dapm_up_seq[] = {
64 [snd_soc_dapm_virt_mux] = 5, 64 [snd_soc_dapm_virt_mux] = 5,
65 [snd_soc_dapm_value_mux] = 5, 65 [snd_soc_dapm_value_mux] = 5,
66 [snd_soc_dapm_dac] = 6, 66 [snd_soc_dapm_dac] = 6,
67 [snd_soc_dapm_switch] = 7,
67 [snd_soc_dapm_mixer] = 7, 68 [snd_soc_dapm_mixer] = 7,
68 [snd_soc_dapm_mixer_named_ctl] = 7, 69 [snd_soc_dapm_mixer_named_ctl] = 7,
69 [snd_soc_dapm_pga] = 8, 70 [snd_soc_dapm_pga] = 8,
@@ -83,6 +84,7 @@ static int dapm_down_seq[] = {
83 [snd_soc_dapm_line] = 2, 84 [snd_soc_dapm_line] = 2,
84 [snd_soc_dapm_out_drv] = 2, 85 [snd_soc_dapm_out_drv] = 2,
85 [snd_soc_dapm_pga] = 4, 86 [snd_soc_dapm_pga] = 4,
87 [snd_soc_dapm_switch] = 5,
86 [snd_soc_dapm_mixer_named_ctl] = 5, 88 [snd_soc_dapm_mixer_named_ctl] = 5,
87 [snd_soc_dapm_mixer] = 5, 89 [snd_soc_dapm_mixer] = 5,
88 [snd_soc_dapm_dac] = 6, 90 [snd_soc_dapm_dac] = 6,