diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-13 10:41:01 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-13 10:41:01 -0400 |
commit | 78890b5989d96ddce989cde929c45ceeded0fcaf (patch) | |
tree | 4e2da81fc7c97f11aee174b1eedac110c9a68b3a /sound/soc/codecs | |
parent | 1959ec5f82acbdf91425b41600f119ebecb5f6a8 (diff) | |
parent | 55d512e245bc7699a8800e23df1a24195dd08217 (diff) |
Merge commit 'v3.6-rc5' into next
* commit 'v3.6-rc5': (1098 commits)
Linux 3.6-rc5
HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
Remove user-triggerable BUG from mpol_to_str
xen/pciback: Fix proper FLR steps.
uml: fix compile error in deliver_alarm()
dj: memory scribble in logi_dj
Fix order of arguments to compat_put_time[spec|val]
xen: Use correct masking in xen_swiotlb_alloc_coherent.
xen: fix logical error in tlb flushing
xen/p2m: Fix one-off error in checking the P2M tree directory.
powerpc: Don't use __put_user() in patch_instruction
powerpc: Make sure IPI handlers see data written by IPI senders
powerpc: Restore correct DSCR in context switch
powerpc: Fix DSCR inheritance in copy_thread()
powerpc: Keep thread.dscr and thread.dscr_inherit in sync
powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
powerpc/powernv: Always go into nap mode when CPU is offline
powerpc: Give hypervisor decrementer interrupts their own handler
powerpc/vphn: Fix arch_update_cpu_topology() return value
ARM: gemini: fix the gemini build
...
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/rapidio/devices/tsi721.c
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/ad1980.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/mc13783.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/stac9766.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm5102.c | 25 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 18 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm9712.c | 22 | ||||
-rw-r--r-- | sound/soc/codecs/wm9713.c | 1 |
11 files changed, 69 insertions, 37 deletions
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 3c795921c5f6..23b40186f9b8 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c | |||
@@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) | |||
2406 | 2406 | ||
2407 | /* Setup AB8500 according to board-settings */ | 2407 | /* Setup AB8500 according to board-settings */ |
2408 | pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent); | 2408 | pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent); |
2409 | |||
2410 | /* Inform SoC Core that we have our own I/O arrangements. */ | ||
2411 | codec->control_data = (void *)true; | ||
2412 | |||
2409 | status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); | 2413 | status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); |
2410 | if (status < 0) { | 2414 | if (status < 0) { |
2411 | pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); | 2415 | pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); |
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c index 8c39dddd7d00..11b1b714b8b5 100644 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c | |||
@@ -186,6 +186,7 @@ static int ad1980_soc_probe(struct snd_soc_codec *codec) | |||
186 | 186 | ||
187 | printk(KERN_INFO "AD1980 SoC Audio Codec\n"); | 187 | printk(KERN_INFO "AD1980 SoC Audio Codec\n"); |
188 | 188 | ||
189 | codec->control_data = codec; /* we don't use regmap! */ | ||
189 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | 190 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); |
190 | if (ret < 0) { | 191 | if (ret < 0) { |
191 | printk(KERN_ERR "ad1980: failed to register AC97 codec\n"); | 192 | printk(KERN_ERR "ad1980: failed to register AC97 codec\n"); |
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c index 6276e352125f..8f726c063f42 100644 --- a/sound/soc/codecs/mc13783.c +++ b/sound/soc/codecs/mc13783.c | |||
@@ -581,6 +581,8 @@ static int mc13783_probe(struct snd_soc_codec *codec) | |||
581 | { | 581 | { |
582 | struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec); | 582 | struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec); |
583 | 583 | ||
584 | codec->control_data = priv->mc13xxx; | ||
585 | |||
584 | mc13xxx_lock(priv->mc13xxx); | 586 | mc13xxx_lock(priv->mc13xxx); |
585 | 587 | ||
586 | /* these are the reset values */ | 588 | /* these are the reset values */ |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 8af6a5245b18..df2f99d1d428 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -239,6 +239,7 @@ static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = { | |||
239 | {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */ | 239 | {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */ |
240 | {"LO", NULL, "DAC"}, /* dac --> line_out */ | 240 | {"LO", NULL, "DAC"}, /* dac --> line_out */ |
241 | 241 | ||
242 | {"LINE_IN", NULL, "VAG_POWER"}, | ||
242 | {"Headphone Mux", "LINE_IN", "LINE_IN"},/* line_in --> hp_mux */ | 243 | {"Headphone Mux", "LINE_IN", "LINE_IN"},/* line_in --> hp_mux */ |
243 | {"HP", NULL, "Headphone Mux"}, /* hp_mux --> hp */ | 244 | {"HP", NULL, "Headphone Mux"}, /* hp_mux --> hp */ |
244 | 245 | ||
@@ -1357,8 +1358,6 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) | |||
1357 | if (ret) | 1358 | if (ret) |
1358 | goto err; | 1359 | goto err; |
1359 | 1360 | ||
1360 | snd_soc_dapm_new_widgets(&codec->dapm); | ||
1361 | |||
1362 | return 0; | 1361 | return 0; |
1363 | 1362 | ||
1364 | err: | 1363 | err: |
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 982e437799a8..33c0f3d39c87 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
@@ -340,6 +340,7 @@ static int stac9766_codec_probe(struct snd_soc_codec *codec) | |||
340 | 340 | ||
341 | printk(KERN_INFO "STAC9766 SoC Audio Codec %s\n", STAC9766_VERSION); | 341 | printk(KERN_INFO "STAC9766 SoC Audio Codec %s\n", STAC9766_VERSION); |
342 | 342 | ||
343 | codec->control_data = codec; /* we don't use regmap! */ | ||
343 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | 344 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); |
344 | if (ret < 0) | 345 | if (ret < 0) |
345 | goto codec_err; | 346 | goto codec_err; |
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 6537f16d383e..e33d327396ad 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -128,13 +128,9 @@ SOC_SINGLE_TLV("EQ4 B5 Volume", ARIZONA_EQ4_2, ARIZONA_EQ4_B5_GAIN_SHIFT, | |||
128 | 128 | ||
129 | ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE), | 129 | ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE), |
130 | ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE), | 130 | ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE), |
131 | ARIZONA_MIXER_CONTROLS("DRC2L", ARIZONA_DRC2LMIX_INPUT_1_SOURCE), | ||
132 | ARIZONA_MIXER_CONTROLS("DRC2R", ARIZONA_DRC2RMIX_INPUT_1_SOURCE), | ||
133 | 131 | ||
134 | SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5, | 132 | SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5, |
135 | ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA), | 133 | ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA), |
136 | SND_SOC_BYTES_MASK("DRC2", ARIZONA_DRC2_CTRL1, 5, | ||
137 | ARIZONA_DRC2R_ENA | ARIZONA_DRC2L_ENA), | ||
138 | 134 | ||
139 | ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE), | 135 | ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE), |
140 | ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE), | 136 | ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE), |
@@ -236,8 +232,6 @@ ARIZONA_MIXER_ENUMS(EQ4, ARIZONA_EQ4MIX_INPUT_1_SOURCE); | |||
236 | 232 | ||
237 | ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE); | 233 | ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE); |
238 | ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE); | 234 | ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE); |
239 | ARIZONA_MIXER_ENUMS(DRC2L, ARIZONA_DRC2LMIX_INPUT_1_SOURCE); | ||
240 | ARIZONA_MIXER_ENUMS(DRC2R, ARIZONA_DRC2RMIX_INPUT_1_SOURCE); | ||
241 | 235 | ||
242 | ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE); | 236 | ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE); |
243 | ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE); | 237 | ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE); |
@@ -349,10 +343,6 @@ SND_SOC_DAPM_PGA("DRC1L", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1L_ENA_SHIFT, 0, | |||
349 | NULL, 0), | 343 | NULL, 0), |
350 | SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0, | 344 | SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0, |
351 | NULL, 0), | 345 | NULL, 0), |
352 | SND_SOC_DAPM_PGA("DRC2L", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2L_ENA_SHIFT, 0, | ||
353 | NULL, 0), | ||
354 | SND_SOC_DAPM_PGA("DRC2R", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2R_ENA_SHIFT, 0, | ||
355 | NULL, 0), | ||
356 | 346 | ||
357 | SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0, | 347 | SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0, |
358 | NULL, 0), | 348 | NULL, 0), |
@@ -466,8 +456,6 @@ ARIZONA_MIXER_WIDGETS(EQ4, "EQ4"), | |||
466 | 456 | ||
467 | ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"), | 457 | ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"), |
468 | ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"), | 458 | ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"), |
469 | ARIZONA_MIXER_WIDGETS(DRC2L, "DRC2L"), | ||
470 | ARIZONA_MIXER_WIDGETS(DRC2R, "DRC2R"), | ||
471 | 459 | ||
472 | ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"), | 460 | ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"), |
473 | ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"), | 461 | ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"), |
@@ -553,8 +541,6 @@ SND_SOC_DAPM_OUTPUT("SPKDAT1R"), | |||
553 | { name, "EQ4", "EQ4" }, \ | 541 | { name, "EQ4", "EQ4" }, \ |
554 | { name, "DRC1L", "DRC1L" }, \ | 542 | { name, "DRC1L", "DRC1L" }, \ |
555 | { name, "DRC1R", "DRC1R" }, \ | 543 | { name, "DRC1R", "DRC1R" }, \ |
556 | { name, "DRC2L", "DRC2L" }, \ | ||
557 | { name, "DRC2R", "DRC2R" }, \ | ||
558 | { name, "LHPF1", "LHPF1" }, \ | 544 | { name, "LHPF1", "LHPF1" }, \ |
559 | { name, "LHPF2", "LHPF2" }, \ | 545 | { name, "LHPF2", "LHPF2" }, \ |
560 | { name, "LHPF3", "LHPF3" }, \ | 546 | { name, "LHPF3", "LHPF3" }, \ |
@@ -639,6 +625,15 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { | |||
639 | { "AIF2 Capture", NULL, "SYSCLK" }, | 625 | { "AIF2 Capture", NULL, "SYSCLK" }, |
640 | { "AIF3 Capture", NULL, "SYSCLK" }, | 626 | { "AIF3 Capture", NULL, "SYSCLK" }, |
641 | 627 | ||
628 | { "IN1L PGA", NULL, "IN1L" }, | ||
629 | { "IN1R PGA", NULL, "IN1R" }, | ||
630 | |||
631 | { "IN2L PGA", NULL, "IN2L" }, | ||
632 | { "IN2R PGA", NULL, "IN2R" }, | ||
633 | |||
634 | { "IN3L PGA", NULL, "IN3L" }, | ||
635 | { "IN3R PGA", NULL, "IN3R" }, | ||
636 | |||
642 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), | 637 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), |
643 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), | 638 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), |
644 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), | 639 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), |
@@ -675,8 +670,6 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { | |||
675 | 670 | ||
676 | ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"), | 671 | ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"), |
677 | ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"), | 672 | ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"), |
678 | ARIZONA_MIXER_ROUTES("DRC2L", "DRC2L"), | ||
679 | ARIZONA_MIXER_ROUTES("DRC2R", "DRC2R"), | ||
680 | 673 | ||
681 | ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"), | 674 | ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"), |
682 | ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"), | 675 | ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"), |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 8033f7065189..01ebbcc5c6a4 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -681,6 +681,18 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { | |||
681 | { "AIF2 Capture", NULL, "SYSCLK" }, | 681 | { "AIF2 Capture", NULL, "SYSCLK" }, |
682 | { "AIF3 Capture", NULL, "SYSCLK" }, | 682 | { "AIF3 Capture", NULL, "SYSCLK" }, |
683 | 683 | ||
684 | { "IN1L PGA", NULL, "IN1L" }, | ||
685 | { "IN1R PGA", NULL, "IN1R" }, | ||
686 | |||
687 | { "IN2L PGA", NULL, "IN2L" }, | ||
688 | { "IN2R PGA", NULL, "IN2R" }, | ||
689 | |||
690 | { "IN3L PGA", NULL, "IN3L" }, | ||
691 | { "IN3R PGA", NULL, "IN3R" }, | ||
692 | |||
693 | { "IN4L PGA", NULL, "IN4L" }, | ||
694 | { "IN4R PGA", NULL, "IN4R" }, | ||
695 | |||
684 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), | 696 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), |
685 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), | 697 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), |
686 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), | 698 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index eaf65863ec21..ce6720073798 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -2501,6 +2501,9 @@ static int wm8962_set_bias_level(struct snd_soc_codec *codec, | |||
2501 | /* VMID 2*250k */ | 2501 | /* VMID 2*250k */ |
2502 | snd_soc_update_bits(codec, WM8962_PWR_MGMT_1, | 2502 | snd_soc_update_bits(codec, WM8962_PWR_MGMT_1, |
2503 | WM8962_VMID_SEL_MASK, 0x100); | 2503 | WM8962_VMID_SEL_MASK, 0x100); |
2504 | |||
2505 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) | ||
2506 | msleep(100); | ||
2504 | break; | 2507 | break; |
2505 | 2508 | ||
2506 | case SND_SOC_BIAS_OFF: | 2509 | case SND_SOC_BIAS_OFF: |
@@ -3730,21 +3733,6 @@ static int wm8962_runtime_resume(struct device *dev) | |||
3730 | 3733 | ||
3731 | regcache_sync(wm8962->regmap); | 3734 | regcache_sync(wm8962->regmap); |
3732 | 3735 | ||
3733 | regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP, | ||
3734 | WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA, | ||
3735 | WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA); | ||
3736 | |||
3737 | /* Bias enable at 2*50k for ramp */ | ||
3738 | regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1, | ||
3739 | WM8962_VMID_SEL_MASK | WM8962_BIAS_ENA, | ||
3740 | WM8962_BIAS_ENA | 0x180); | ||
3741 | |||
3742 | msleep(5); | ||
3743 | |||
3744 | /* VMID back to 2x250k for standby */ | ||
3745 | regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1, | ||
3746 | WM8962_VMID_SEL_MASK, 0x100); | ||
3747 | |||
3748 | return 0; | 3736 | return 0; |
3749 | } | 3737 | } |
3750 | 3738 | ||
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index bb62f4b3d563..6c9eeca85b95 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -2649,7 +2649,7 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream, | |||
2649 | return -EINVAL; | 2649 | return -EINVAL; |
2650 | } | 2650 | } |
2651 | 2651 | ||
2652 | bclk_rate = params_rate(params) * 2; | 2652 | bclk_rate = params_rate(params) * 4; |
2653 | switch (params_format(params)) { | 2653 | switch (params_format(params)) { |
2654 | case SNDRV_PCM_FORMAT_S16_LE: | 2654 | case SNDRV_PCM_FORMAT_S16_LE: |
2655 | bclk_rate *= 16; | 2655 | bclk_rate *= 16; |
@@ -3253,10 +3253,13 @@ static void wm8994_mic_work(struct work_struct *work) | |||
3253 | int ret; | 3253 | int ret; |
3254 | int report; | 3254 | int report; |
3255 | 3255 | ||
3256 | pm_runtime_get_sync(dev); | ||
3257 | |||
3256 | ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, ®); | 3258 | ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, ®); |
3257 | if (ret < 0) { | 3259 | if (ret < 0) { |
3258 | dev_err(dev, "Failed to read microphone status: %d\n", | 3260 | dev_err(dev, "Failed to read microphone status: %d\n", |
3259 | ret); | 3261 | ret); |
3262 | pm_runtime_put(dev); | ||
3260 | return; | 3263 | return; |
3261 | } | 3264 | } |
3262 | 3265 | ||
@@ -3299,6 +3302,8 @@ static void wm8994_mic_work(struct work_struct *work) | |||
3299 | 3302 | ||
3300 | snd_soc_jack_report(priv->micdet[1].jack, report, | 3303 | snd_soc_jack_report(priv->micdet[1].jack, report, |
3301 | SND_JACK_HEADSET | SND_JACK_BTN_0); | 3304 | SND_JACK_HEADSET | SND_JACK_BTN_0); |
3305 | |||
3306 | pm_runtime_put(dev); | ||
3302 | } | 3307 | } |
3303 | 3308 | ||
3304 | static irqreturn_t wm8994_mic_irq(int irq, void *data) | 3309 | static irqreturn_t wm8994_mic_irq(int irq, void *data) |
@@ -3421,12 +3426,15 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) | |||
3421 | int reg; | 3426 | int reg; |
3422 | bool present; | 3427 | bool present; |
3423 | 3428 | ||
3429 | pm_runtime_get_sync(codec->dev); | ||
3430 | |||
3424 | mutex_lock(&wm8994->accdet_lock); | 3431 | mutex_lock(&wm8994->accdet_lock); |
3425 | 3432 | ||
3426 | reg = snd_soc_read(codec, WM1811_JACKDET_CTRL); | 3433 | reg = snd_soc_read(codec, WM1811_JACKDET_CTRL); |
3427 | if (reg < 0) { | 3434 | if (reg < 0) { |
3428 | dev_err(codec->dev, "Failed to read jack status: %d\n", reg); | 3435 | dev_err(codec->dev, "Failed to read jack status: %d\n", reg); |
3429 | mutex_unlock(&wm8994->accdet_lock); | 3436 | mutex_unlock(&wm8994->accdet_lock); |
3437 | pm_runtime_put(codec->dev); | ||
3430 | return IRQ_NONE; | 3438 | return IRQ_NONE; |
3431 | } | 3439 | } |
3432 | 3440 | ||
@@ -3491,6 +3499,7 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) | |||
3491 | SND_JACK_MECHANICAL | SND_JACK_HEADSET | | 3499 | SND_JACK_MECHANICAL | SND_JACK_HEADSET | |
3492 | wm8994->btn_mask); | 3500 | wm8994->btn_mask); |
3493 | 3501 | ||
3502 | pm_runtime_put(codec->dev); | ||
3494 | return IRQ_HANDLED; | 3503 | return IRQ_HANDLED; |
3495 | } | 3504 | } |
3496 | 3505 | ||
@@ -3602,6 +3611,8 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) | |||
3602 | if (!(snd_soc_read(codec, WM8958_MIC_DETECT_1) & WM8958_MICD_ENA)) | 3611 | if (!(snd_soc_read(codec, WM8958_MIC_DETECT_1) & WM8958_MICD_ENA)) |
3603 | return IRQ_HANDLED; | 3612 | return IRQ_HANDLED; |
3604 | 3613 | ||
3614 | pm_runtime_get_sync(codec->dev); | ||
3615 | |||
3605 | /* We may occasionally read a detection without an impedence | 3616 | /* We may occasionally read a detection without an impedence |
3606 | * range being provided - if that happens loop again. | 3617 | * range being provided - if that happens loop again. |
3607 | */ | 3618 | */ |
@@ -3612,6 +3623,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) | |||
3612 | dev_err(codec->dev, | 3623 | dev_err(codec->dev, |
3613 | "Failed to read mic detect status: %d\n", | 3624 | "Failed to read mic detect status: %d\n", |
3614 | reg); | 3625 | reg); |
3626 | pm_runtime_put(codec->dev); | ||
3615 | return IRQ_NONE; | 3627 | return IRQ_NONE; |
3616 | } | 3628 | } |
3617 | 3629 | ||
@@ -3639,6 +3651,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) | |||
3639 | dev_warn(codec->dev, "Accessory detection with no callback\n"); | 3651 | dev_warn(codec->dev, "Accessory detection with no callback\n"); |
3640 | 3652 | ||
3641 | out: | 3653 | out: |
3654 | pm_runtime_put(codec->dev); | ||
3642 | return IRQ_HANDLED; | 3655 | return IRQ_HANDLED; |
3643 | } | 3656 | } |
3644 | 3657 | ||
@@ -4025,6 +4038,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
4025 | break; | 4038 | break; |
4026 | case WM8958: | 4039 | case WM8958: |
4027 | if (wm8994->revision < 1) { | 4040 | if (wm8994->revision < 1) { |
4041 | snd_soc_dapm_add_routes(dapm, wm8994_intercon, | ||
4042 | ARRAY_SIZE(wm8994_intercon)); | ||
4028 | snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon, | 4043 | snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon, |
4029 | ARRAY_SIZE(wm8994_revd_intercon)); | 4044 | ARRAY_SIZE(wm8994_revd_intercon)); |
4030 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon, | 4045 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon, |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 099e6ec32125..c6d2076a796b 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -148,7 +148,7 @@ SOC_SINGLE("Treble Volume", AC97_MASTER_TONE, 0, 15, 1), | |||
148 | 148 | ||
149 | SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1), | 149 | SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1), |
150 | SOC_ENUM("Capture Volume Steps", wm9712_enum[6]), | 150 | SOC_ENUM("Capture Volume Steps", wm9712_enum[6]), |
151 | SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1), | 151 | SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0), |
152 | SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), | 152 | SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), |
153 | 153 | ||
154 | SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), | 154 | SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), |
@@ -272,7 +272,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]); | |||
272 | 272 | ||
273 | /* Mic select */ | 273 | /* Mic select */ |
274 | static const struct snd_kcontrol_new wm9712_mic_src_controls = | 274 | static const struct snd_kcontrol_new wm9712_mic_src_controls = |
275 | SOC_DAPM_ENUM("Route", wm9712_enum[7]); | 275 | SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]); |
276 | 276 | ||
277 | /* diff select */ | 277 | /* diff select */ |
278 | static const struct snd_kcontrol_new wm9712_diff_sel_controls = | 278 | static const struct snd_kcontrol_new wm9712_diff_sel_controls = |
@@ -291,7 +291,9 @@ SND_SOC_DAPM_MUX("Left Capture Select", SND_SOC_NOPM, 0, 0, | |||
291 | &wm9712_capture_selectl_controls), | 291 | &wm9712_capture_selectl_controls), |
292 | SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, | 292 | SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, |
293 | &wm9712_capture_selectr_controls), | 293 | &wm9712_capture_selectr_controls), |
294 | SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0, | 294 | SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0, |
295 | &wm9712_mic_src_controls), | ||
296 | SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0, | ||
295 | &wm9712_mic_src_controls), | 297 | &wm9712_mic_src_controls), |
296 | SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, | 298 | SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, |
297 | &wm9712_diff_sel_controls), | 299 | &wm9712_diff_sel_controls), |
@@ -319,6 +321,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_PAGING, 5, 1, NULL, 0), | |||
319 | SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), | 321 | SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), |
320 | SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), | 322 | SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), |
321 | SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), | 323 | SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), |
324 | SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0), | ||
322 | SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), | 325 | SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), |
323 | SND_SOC_DAPM_OUTPUT("MONOOUT"), | 326 | SND_SOC_DAPM_OUTPUT("MONOOUT"), |
324 | SND_SOC_DAPM_OUTPUT("HPOUTL"), | 327 | SND_SOC_DAPM_OUTPUT("HPOUTL"), |
@@ -379,6 +382,18 @@ static const struct snd_soc_dapm_route wm9712_audio_map[] = { | |||
379 | {"Mic PGA", NULL, "MIC1"}, | 382 | {"Mic PGA", NULL, "MIC1"}, |
380 | {"Mic PGA", NULL, "MIC2"}, | 383 | {"Mic PGA", NULL, "MIC2"}, |
381 | 384 | ||
385 | /* microphones */ | ||
386 | {"Differential Mic", NULL, "MIC1"}, | ||
387 | {"Differential Mic", NULL, "MIC2"}, | ||
388 | {"Left Mic Select Source", "Mic 1", "MIC1"}, | ||
389 | {"Left Mic Select Source", "Mic 2", "MIC2"}, | ||
390 | {"Left Mic Select Source", "Stereo", "MIC1"}, | ||
391 | {"Left Mic Select Source", "Differential", "Differential Mic"}, | ||
392 | {"Right Mic Select Source", "Mic 1", "MIC1"}, | ||
393 | {"Right Mic Select Source", "Mic 2", "MIC2"}, | ||
394 | {"Right Mic Select Source", "Stereo", "MIC2"}, | ||
395 | {"Right Mic Select Source", "Differential", "Differential Mic"}, | ||
396 | |||
382 | /* left capture selector */ | 397 | /* left capture selector */ |
383 | {"Left Capture Select", "Mic", "MIC1"}, | 398 | {"Left Capture Select", "Mic", "MIC1"}, |
384 | {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, | 399 | {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, |
@@ -619,6 +634,7 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
619 | { | 634 | { |
620 | int ret = 0; | 635 | int ret = 0; |
621 | 636 | ||
637 | codec->control_data = codec; /* we don't use regmap! */ | ||
622 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | 638 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); |
623 | if (ret < 0) { | 639 | if (ret < 0) { |
624 | printk(KERN_ERR "wm9712: failed to register AC97 codec\n"); | 640 | printk(KERN_ERR "wm9712: failed to register AC97 codec\n"); |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 3eb19fb71d17..d0b8a3287a85 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -1196,6 +1196,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
1196 | if (wm9713 == NULL) | 1196 | if (wm9713 == NULL) |
1197 | return -ENOMEM; | 1197 | return -ENOMEM; |
1198 | snd_soc_codec_set_drvdata(codec, wm9713); | 1198 | snd_soc_codec_set_drvdata(codec, wm9713); |
1199 | codec->control_data = wm9713; /* we don't use regmap! */ | ||
1199 | 1200 | ||
1200 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | 1201 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); |
1201 | if (ret < 0) | 1202 | if (ret < 0) |