diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-17 12:27:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-17 12:27:30 -0500 |
commit | 74280817e5013af83089a5dd511f6fb3b2362e09 (patch) | |
tree | d4c9eccad139dc295db915302270d05dff62072c /sound | |
parent | a3383e8372c0c11238f9bb9777929bfc3a2d320a (diff) | |
parent | 5aad6c5f7733b94e666e3bf8b57beb7bbee15886 (diff) |
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: hda - Fix conflict of Mic Boot controls
ALSA: HDA: Enable subwoofer on Asus G73Jw
ALSA: HDA: Fix auto-mute on Lenovo Edge 14
ASoC: Fix bias power down of non-DAPM codec
ASoC: WM8580: Fix R8 initial value
ASoC: fix deemphasis control in wm8904/55/60 codecs
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 24 | ||||
-rw-r--r-- | sound/soc/codecs/wm8580.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8955.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8960.c | 3 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 3 |
6 files changed, 32 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2d7d7de8498a..427da45d7906 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -10830,7 +10830,8 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10830 | { | 10830 | { |
10831 | struct alc_spec *spec = codec->spec; | 10831 | struct alc_spec *spec = codec->spec; |
10832 | struct auto_pin_cfg *cfg = &spec->autocfg; | 10832 | struct auto_pin_cfg *cfg = &spec->autocfg; |
10833 | int i, err; | 10833 | int i, err, type; |
10834 | int type_idx = 0; | ||
10834 | hda_nid_t nid; | 10835 | hda_nid_t nid; |
10835 | 10836 | ||
10836 | for (i = 0; i < cfg->num_inputs; i++) { | 10837 | for (i = 0; i < cfg->num_inputs; i++) { |
@@ -10839,9 +10840,15 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10839 | nid = cfg->inputs[i].pin; | 10840 | nid = cfg->inputs[i].pin; |
10840 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { | 10841 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { |
10841 | char label[32]; | 10842 | char label[32]; |
10843 | type = cfg->inputs[i].type; | ||
10844 | if (i > 0 && type == cfg->inputs[i - 1].type) | ||
10845 | type_idx++; | ||
10846 | else | ||
10847 | type_idx = 0; | ||
10842 | snprintf(label, sizeof(label), "%s Boost", | 10848 | snprintf(label, sizeof(label), "%s Boost", |
10843 | hda_get_autocfg_input_label(codec, cfg, i)); | 10849 | hda_get_autocfg_input_label(codec, cfg, i)); |
10844 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, 0, | 10850 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, |
10851 | type_idx, | ||
10845 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); | 10852 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); |
10846 | if (err < 0) | 10853 | if (err < 0) |
10847 | return err; | 10854 | return err; |
@@ -14800,6 +14807,8 @@ static int alc269_resume(struct hda_codec *codec) | |||
14800 | enum { | 14807 | enum { |
14801 | ALC269_FIXUP_SONY_VAIO, | 14808 | ALC269_FIXUP_SONY_VAIO, |
14802 | ALC269_FIXUP_DELL_M101Z, | 14809 | ALC269_FIXUP_DELL_M101Z, |
14810 | ALC269_FIXUP_LENOVO_EDGE14, | ||
14811 | ALC269_FIXUP_ASUS_G73JW, | ||
14803 | }; | 14812 | }; |
14804 | 14813 | ||
14805 | static const struct alc_fixup alc269_fixups[] = { | 14814 | static const struct alc_fixup alc269_fixups[] = { |
@@ -14817,11 +14826,22 @@ static const struct alc_fixup alc269_fixups[] = { | |||
14817 | {} | 14826 | {} |
14818 | } | 14827 | } |
14819 | }, | 14828 | }, |
14829 | [ALC269_FIXUP_LENOVO_EDGE14] = { | ||
14830 | .sku = ALC_FIXUP_SKU_IGNORE, | ||
14831 | }, | ||
14832 | [ALC269_FIXUP_ASUS_G73JW] = { | ||
14833 | .pins = (const struct alc_pincfg[]) { | ||
14834 | { 0x17, 0x99130111 }, /* subwoofer */ | ||
14835 | { } | ||
14836 | } | ||
14837 | }, | ||
14820 | }; | 14838 | }; |
14821 | 14839 | ||
14822 | static struct snd_pci_quirk alc269_fixup_tbl[] = { | 14840 | static struct snd_pci_quirk alc269_fixup_tbl[] = { |
14823 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), | 14841 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
14824 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 14842 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
14843 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_LENOVO_EDGE14), | ||
14844 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | ||
14825 | {} | 14845 | {} |
14826 | }; | 14846 | }; |
14827 | 14847 | ||
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 879dff2714dd..8725d4e75431 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -161,7 +161,7 @@ | |||
161 | static const u16 wm8580_reg[] = { | 161 | static const u16 wm8580_reg[] = { |
162 | 0x0121, 0x017e, 0x007d, 0x0014, /*R3*/ | 162 | 0x0121, 0x017e, 0x007d, 0x0014, /*R3*/ |
163 | 0x0121, 0x017e, 0x007d, 0x0194, /*R7*/ | 163 | 0x0121, 0x017e, 0x007d, 0x0194, /*R7*/ |
164 | 0x001c, 0x0002, 0x0002, 0x00c2, /*R11*/ | 164 | 0x0010, 0x0002, 0x0002, 0x00c2, /*R11*/ |
165 | 0x0182, 0x0082, 0x000a, 0x0024, /*R15*/ | 165 | 0x0182, 0x0082, 0x000a, 0x0024, /*R15*/ |
166 | 0x0009, 0x0000, 0x00ff, 0x0000, /*R19*/ | 166 | 0x0009, 0x0000, 0x00ff, 0x0000, /*R19*/ |
167 | 0x00ff, 0x00ff, 0x00ff, 0x00ff, /*R23*/ | 167 | 0x00ff, 0x00ff, 0x00ff, 0x00ff, /*R23*/ |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index fca60a0b57b8..9001cc48ba13 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -818,7 +818,8 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol, | |||
818 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 818 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
819 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); | 819 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); |
820 | 820 | ||
821 | return wm8904->deemph; | 821 | ucontrol->value.enumerated.item[0] = wm8904->deemph; |
822 | return 0; | ||
822 | } | 823 | } |
823 | 824 | ||
824 | static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, | 825 | static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, |
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index f89ad6c9a80b..9cbab8e1de01 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
@@ -380,7 +380,8 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol, | |||
380 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 380 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
381 | struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); | 381 | struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); |
382 | 382 | ||
383 | return wm8955->deemph; | 383 | ucontrol->value.enumerated.item[0] = wm8955->deemph; |
384 | return 0; | ||
384 | } | 385 | } |
385 | 386 | ||
386 | static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, | 387 | static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, |
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 8d5efb333c33..21986c42272f 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -138,7 +138,8 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol, | |||
138 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 138 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
139 | struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); | 139 | struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); |
140 | 140 | ||
141 | return wm8960->deemph; | 141 | ucontrol->value.enumerated.item[0] = wm8960->deemph; |
142 | return 0; | ||
142 | } | 143 | } |
143 | 144 | ||
144 | static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, | 145 | static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 75ed6491222d..c721502833bc 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -944,6 +944,9 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event) | |||
944 | case SND_SOC_DAPM_STREAM_RESUME: | 944 | case SND_SOC_DAPM_STREAM_RESUME: |
945 | sys_power = 1; | 945 | sys_power = 1; |
946 | break; | 946 | break; |
947 | case SND_SOC_DAPM_STREAM_STOP: | ||
948 | sys_power = !!codec->active; | ||
949 | break; | ||
947 | case SND_SOC_DAPM_STREAM_SUSPEND: | 950 | case SND_SOC_DAPM_STREAM_SUSPEND: |
948 | sys_power = 0; | 951 | sys_power = 0; |
949 | break; | 952 | break; |