aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-23 02:38:23 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-23 02:38:23 -0500
commit524027916e5763a0c9a7da80aa8dd013a14a0440 (patch)
treeed576766b050122065f5c548adb22f9ce277a2a0 /sound/pci
parent75d1aeb9d6899b10420d10284e8ea894b2794224 (diff)
parent9dc8398bab52931435fce403ce2eaf5822f28e58 (diff)
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c1
-rw-r--r--sound/pci/hda/patch_cirrus.c22
-rw-r--r--sound/pci/hda/patch_conexant.c43
-rw-r--r--sound/pci/hda/patch_realtek.c79
-rw-r--r--sound/pci/hda/patch_sigmatel.c19
5 files changed, 141 insertions, 23 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 93eaf4fc39be..d258569fc921 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2322,6 +2322,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev)
2322 * white/black-list for enable_msi 2322 * white/black-list for enable_msi
2323 */ 2323 */
2324static struct snd_pci_quirk msi_black_list[] __devinitdata = { 2324static struct snd_pci_quirk msi_black_list[] __devinitdata = {
2325 SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */
2325 {} 2326 {}
2326}; 2327};
2327 2328
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index eeb91f6a06c2..093cfbb55e9e 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -66,6 +66,7 @@ struct cs_spec {
66/* available models */ 66/* available models */
67enum { 67enum {
68 CS420X_MBP55, 68 CS420X_MBP55,
69 CS420X_IMAC27,
69 CS420X_AUTO, 70 CS420X_AUTO,
70 CS420X_MODELS 71 CS420X_MODELS
71}; 72};
@@ -833,7 +834,8 @@ static void cs_automute(struct hda_codec *codec)
833 AC_VERB_SET_PIN_WIDGET_CONTROL, 834 AC_VERB_SET_PIN_WIDGET_CONTROL,
834 hp_present ? 0 : PIN_OUT); 835 hp_present ? 0 : PIN_OUT);
835 } 836 }
836 if (spec->board_config == CS420X_MBP55) { 837 if (spec->board_config == CS420X_MBP55 ||
838 spec->board_config == CS420X_IMAC27) {
837 unsigned int gpio = hp_present ? 0x02 : 0x08; 839 unsigned int gpio = hp_present ? 0x02 : 0x08;
838 snd_hda_codec_write(codec, 0x01, 0, 840 snd_hda_codec_write(codec, 0x01, 0,
839 AC_VERB_SET_GPIO_DATA, gpio); 841 AC_VERB_SET_GPIO_DATA, gpio);
@@ -1075,12 +1077,14 @@ static int cs_parse_auto_config(struct hda_codec *codec)
1075 1077
1076static const char *cs420x_models[CS420X_MODELS] = { 1078static const char *cs420x_models[CS420X_MODELS] = {
1077 [CS420X_MBP55] = "mbp55", 1079 [CS420X_MBP55] = "mbp55",
1080 [CS420X_IMAC27] = "imac27",
1078 [CS420X_AUTO] = "auto", 1081 [CS420X_AUTO] = "auto",
1079}; 1082};
1080 1083
1081 1084
1082static struct snd_pci_quirk cs420x_cfg_tbl[] = { 1085static struct snd_pci_quirk cs420x_cfg_tbl[] = {
1083 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), 1086 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
1087 SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),
1084 {} /* terminator */ 1088 {} /* terminator */
1085}; 1089};
1086 1090
@@ -1103,8 +1107,23 @@ static struct cs_pincfg mbp55_pincfgs[] = {
1103 {} /* terminator */ 1107 {} /* terminator */
1104}; 1108};
1105 1109
1110static struct cs_pincfg imac27_pincfgs[] = {
1111 { 0x09, 0x012b4050 },
1112 { 0x0a, 0x90100140 },
1113 { 0x0b, 0x90100142 },
1114 { 0x0c, 0x018b3020 },
1115 { 0x0d, 0x90a00110 },
1116 { 0x0e, 0x400000f0 },
1117 { 0x0f, 0x01cbe030 },
1118 { 0x10, 0x014be060 },
1119 { 0x12, 0x01ab9070 },
1120 { 0x15, 0x400000f0 },
1121 {} /* terminator */
1122};
1123
1106static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { 1124static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = {
1107 [CS420X_MBP55] = mbp55_pincfgs, 1125 [CS420X_MBP55] = mbp55_pincfgs,
1126 [CS420X_IMAC27] = imac27_pincfgs,
1108}; 1127};
1109 1128
1110static void fix_pincfg(struct hda_codec *codec, int model) 1129static void fix_pincfg(struct hda_codec *codec, int model)
@@ -1134,6 +1153,7 @@ static int patch_cs420x(struct hda_codec *codec)
1134 fix_pincfg(codec, spec->board_config); 1153 fix_pincfg(codec, spec->board_config);
1135 1154
1136 switch (spec->board_config) { 1155 switch (spec->board_config) {
1156 case CS420X_IMAC27:
1137 case CS420X_MBP55: 1157 case CS420X_MBP55:
1138 /* GPIO1 = headphones */ 1158 /* GPIO1 = headphones */
1139 /* GPIO3 = speakers */ 1159 /* GPIO3 = speakers */
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 1ab2958a290b..947785f43b28 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -29,6 +29,7 @@
29 29
30#include "hda_codec.h" 30#include "hda_codec.h"
31#include "hda_local.h" 31#include "hda_local.h"
32#include "hda_beep.h"
32 33
33#define CXT_PIN_DIR_IN 0x00 34#define CXT_PIN_DIR_IN 0x00
34#define CXT_PIN_DIR_OUT 0x01 35#define CXT_PIN_DIR_OUT 0x01
@@ -111,6 +112,7 @@ struct conexant_spec {
111 unsigned int dell_automute; 112 unsigned int dell_automute;
112 unsigned int port_d_mode; 113 unsigned int port_d_mode;
113 unsigned char ext_mic_bias; 114 unsigned char ext_mic_bias;
115 unsigned int dell_vostro;
114}; 116};
115 117
116static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, 118static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo,
@@ -476,6 +478,7 @@ static void conexant_free(struct hda_codec *codec)
476 snd_array_free(&spec->jacks); 478 snd_array_free(&spec->jacks);
477 } 479 }
478#endif 480#endif
481 snd_hda_detach_beep_device(codec);
479 kfree(codec->spec); 482 kfree(codec->spec);
480} 483}
481 484
@@ -2109,9 +2112,12 @@ static int cxt5066_mic_boost_mux_enum_get(struct snd_kcontrol *kcontrol,
2109{ 2112{
2110 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2113 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2111 int val; 2114 int val;
2115 hda_nid_t nid = kcontrol->private_value & 0xff;
2116 int inout = (kcontrol->private_value & 0x100) ?
2117 AC_AMP_GET_INPUT : AC_AMP_GET_OUTPUT;
2112 2118
2113 val = snd_hda_codec_read(codec, 0x17, 0, 2119 val = snd_hda_codec_read(codec, nid, 0,
2114 AC_VERB_GET_AMP_GAIN_MUTE, AC_AMP_GET_OUTPUT); 2120 AC_VERB_GET_AMP_GAIN_MUTE, inout);
2115 2121
2116 ucontrol->value.enumerated.item[0] = val & AC_AMP_GAIN; 2122 ucontrol->value.enumerated.item[0] = val & AC_AMP_GAIN;
2117 return 0; 2123 return 0;
@@ -2123,6 +2129,9 @@ static int cxt5066_mic_boost_mux_enum_put(struct snd_kcontrol *kcontrol,
2123 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2129 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2124 const struct hda_input_mux *imux = &cxt5066_analog_mic_boost; 2130 const struct hda_input_mux *imux = &cxt5066_analog_mic_boost;
2125 unsigned int idx; 2131 unsigned int idx;
2132 hda_nid_t nid = kcontrol->private_value & 0xff;
2133 int inout = (kcontrol->private_value & 0x100) ?
2134 AC_AMP_SET_INPUT : AC_AMP_SET_OUTPUT;
2126 2135
2127 if (!imux->num_items) 2136 if (!imux->num_items)
2128 return 0; 2137 return 0;
@@ -2130,9 +2139,9 @@ static int cxt5066_mic_boost_mux_enum_put(struct snd_kcontrol *kcontrol,
2130 if (idx >= imux->num_items) 2139 if (idx >= imux->num_items)
2131 idx = imux->num_items - 1; 2140 idx = imux->num_items - 1;
2132 2141
2133 snd_hda_codec_write_cache(codec, 0x17, 0, 2142 snd_hda_codec_write_cache(codec, nid, 0,
2134 AC_VERB_SET_AMP_GAIN_MUTE, 2143 AC_VERB_SET_AMP_GAIN_MUTE,
2135 AC_AMP_SET_RIGHT | AC_AMP_SET_LEFT | AC_AMP_SET_OUTPUT | 2144 AC_AMP_SET_RIGHT | AC_AMP_SET_LEFT | inout |
2136 imux->items[idx].index); 2145 imux->items[idx].index);
2137 2146
2138 return 1; 2147 return 1;
@@ -2202,10 +2211,11 @@ static struct snd_kcontrol_new cxt5066_mixers[] = {
2202 2211
2203 { 2212 {
2204 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2213 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2205 .name = "Analog Mic Boost Capture Enum", 2214 .name = "Ext Mic Boost Capture Enum",
2206 .info = cxt5066_mic_boost_mux_enum_info, 2215 .info = cxt5066_mic_boost_mux_enum_info,
2207 .get = cxt5066_mic_boost_mux_enum_get, 2216 .get = cxt5066_mic_boost_mux_enum_get,
2208 .put = cxt5066_mic_boost_mux_enum_put, 2217 .put = cxt5066_mic_boost_mux_enum_put,
2218 .private_value = 0x17,
2209 }, 2219 },
2210 2220
2211 HDA_BIND_VOL("Capture Volume", &cxt5066_bind_capture_vol_others), 2221 HDA_BIND_VOL("Capture Volume", &cxt5066_bind_capture_vol_others),
@@ -2213,6 +2223,19 @@ static struct snd_kcontrol_new cxt5066_mixers[] = {
2213 {} 2223 {}
2214}; 2224};
2215 2225
2226static struct snd_kcontrol_new cxt5066_vostro_mixers[] = {
2227 {
2228 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2229 .name = "Int Mic Boost Capture Enum",
2230 .info = cxt5066_mic_boost_mux_enum_info,
2231 .get = cxt5066_mic_boost_mux_enum_get,
2232 .put = cxt5066_mic_boost_mux_enum_put,
2233 .private_value = 0x23 | 0x100,
2234 },
2235 HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT),
2236 {}
2237};
2238
2216static struct hda_verb cxt5066_init_verbs[] = { 2239static struct hda_verb cxt5066_init_verbs[] = {
2217 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */ 2240 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */
2218 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */ 2241 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */
@@ -2398,11 +2421,16 @@ static struct hda_verb cxt5066_init_verbs_portd_lo[] = {
2398/* initialize jack-sensing, too */ 2421/* initialize jack-sensing, too */
2399static int cxt5066_init(struct hda_codec *codec) 2422static int cxt5066_init(struct hda_codec *codec)
2400{ 2423{
2424 struct conexant_spec *spec = codec->spec;
2425
2401 snd_printdd("CXT5066: init\n"); 2426 snd_printdd("CXT5066: init\n");
2402 conexant_init(codec); 2427 conexant_init(codec);
2403 if (codec->patch_ops.unsol_event) { 2428 if (codec->patch_ops.unsol_event) {
2404 cxt5066_hp_automute(codec); 2429 cxt5066_hp_automute(codec);
2405 cxt5066_automic(codec); 2430 if (spec->dell_vostro)
2431 cxt5066_vostro_automic(codec);
2432 else
2433 cxt5066_automic(codec);
2406 } 2434 }
2407 return 0; 2435 return 0;
2408} 2436}
@@ -2501,7 +2529,10 @@ static int patch_cxt5066(struct hda_codec *codec)
2501 spec->init_verbs[0] = cxt5066_init_verbs_vostro; 2529 spec->init_verbs[0] = cxt5066_init_verbs_vostro;
2502 spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc; 2530 spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc;
2503 spec->mixers[spec->num_mixers++] = cxt5066_mixers; 2531 spec->mixers[spec->num_mixers++] = cxt5066_mixers;
2532 spec->mixers[spec->num_mixers++] = cxt5066_vostro_mixers;
2504 spec->port_d_mode = 0; 2533 spec->port_d_mode = 0;
2534 spec->dell_vostro = 1;
2535 snd_hda_attach_beep_device(codec, 0x13);
2505 2536
2506 /* no S/PDIF out */ 2537 /* no S/PDIF out */
2507 spec->multiout.dig_out_nid = 0; 2538 spec->multiout.dig_out_nid = 0;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 012435212e58..e7cdc6a7d61d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -337,6 +337,9 @@ struct alc_spec {
337 /* hooks */ 337 /* hooks */
338 void (*init_hook)(struct hda_codec *codec); 338 void (*init_hook)(struct hda_codec *codec);
339 void (*unsol_event)(struct hda_codec *codec, unsigned int res); 339 void (*unsol_event)(struct hda_codec *codec, unsigned int res);
340#ifdef CONFIG_SND_HDA_POWER_SAVE
341 void (*power_hook)(struct hda_codec *codec, int power);
342#endif
340 343
341 /* for pin sensing */ 344 /* for pin sensing */
342 unsigned int sense_updated: 1; 345 unsigned int sense_updated: 1;
@@ -388,6 +391,7 @@ struct alc_config_preset {
388 void (*init_hook)(struct hda_codec *); 391 void (*init_hook)(struct hda_codec *);
389#ifdef CONFIG_SND_HDA_POWER_SAVE 392#ifdef CONFIG_SND_HDA_POWER_SAVE
390 struct hda_amp_list *loopbacks; 393 struct hda_amp_list *loopbacks;
394 void (*power_hook)(struct hda_codec *codec, int power);
391#endif 395#endif
392}; 396};
393 397
@@ -904,6 +908,7 @@ static void setup_preset(struct hda_codec *codec,
904 spec->unsol_event = preset->unsol_event; 908 spec->unsol_event = preset->unsol_event;
905 spec->init_hook = preset->init_hook; 909 spec->init_hook = preset->init_hook;
906#ifdef CONFIG_SND_HDA_POWER_SAVE 910#ifdef CONFIG_SND_HDA_POWER_SAVE
911 spec->power_hook = preset->power_hook;
907 spec->loopback.amplist = preset->loopbacks; 912 spec->loopback.amplist = preset->loopbacks;
908#endif 913#endif
909 914
@@ -1669,9 +1674,6 @@ static struct hda_verb alc889_acer_aspire_8930g_verbs[] = {
1669/* some bit here disables the other DACs. Init=0x4900 */ 1674/* some bit here disables the other DACs. Init=0x4900 */
1670 {0x20, AC_VERB_SET_COEF_INDEX, 0x08}, 1675 {0x20, AC_VERB_SET_COEF_INDEX, 0x08},
1671 {0x20, AC_VERB_SET_PROC_COEF, 0x0000}, 1676 {0x20, AC_VERB_SET_PROC_COEF, 0x0000},
1672/* Enable amplifiers */
1673 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
1674 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
1675/* DMIC fix 1677/* DMIC fix
1676 * This laptop has a stereo digital microphone. The mics are only 1cm apart 1678 * This laptop has a stereo digital microphone. The mics are only 1cm apart
1677 * which makes the stereo useless. However, either the mic or the ALC889 1679 * which makes the stereo useless. However, either the mic or the ALC889
@@ -1784,6 +1786,25 @@ static struct snd_kcontrol_new alc888_base_mixer[] = {
1784 { } /* end */ 1786 { } /* end */
1785}; 1787};
1786 1788
1789static struct snd_kcontrol_new alc889_acer_aspire_8930g_mixer[] = {
1790 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1791 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1792 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
1793 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
1794 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
1795 HDA_OUTPUT),
1796 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
1797 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
1798 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
1799 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
1800 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
1801 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
1802 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
1803 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
1804 { } /* end */
1805};
1806
1807
1787static void alc888_acer_aspire_4930g_setup(struct hda_codec *codec) 1808static void alc888_acer_aspire_4930g_setup(struct hda_codec *codec)
1788{ 1809{
1789 struct alc_spec *spec = codec->spec; 1810 struct alc_spec *spec = codec->spec;
@@ -1814,6 +1835,16 @@ static void alc889_acer_aspire_8930g_setup(struct hda_codec *codec)
1814 spec->autocfg.speaker_pins[2] = 0x1b; 1835 spec->autocfg.speaker_pins[2] = 0x1b;
1815} 1836}
1816 1837
1838#ifdef CONFIG_SND_HDA_POWER_SAVE
1839static void alc889_power_eapd(struct hda_codec *codec, int power)
1840{
1841 snd_hda_codec_write(codec, 0x14, 0,
1842 AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0);
1843 snd_hda_codec_write(codec, 0x15, 0,
1844 AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0);
1845}
1846#endif
1847
1817/* 1848/*
1818 * ALC880 3-stack model 1849 * ALC880 3-stack model
1819 * 1850 *
@@ -3688,12 +3719,29 @@ static void alc_free(struct hda_codec *codec)
3688 snd_hda_detach_beep_device(codec); 3719 snd_hda_detach_beep_device(codec);
3689} 3720}
3690 3721
3722#ifdef CONFIG_SND_HDA_POWER_SAVE
3723static int alc_suspend(struct hda_codec *codec, pm_message_t state)
3724{
3725 struct alc_spec *spec = codec->spec;
3726 if (spec && spec->power_hook)
3727 spec->power_hook(codec, 0);
3728 return 0;
3729}
3730#endif
3731
3691#ifdef SND_HDA_NEEDS_RESUME 3732#ifdef SND_HDA_NEEDS_RESUME
3692static int alc_resume(struct hda_codec *codec) 3733static int alc_resume(struct hda_codec *codec)
3693{ 3734{
3735#ifdef CONFIG_SND_HDA_POWER_SAVE
3736 struct alc_spec *spec = codec->spec;
3737#endif
3694 codec->patch_ops.init(codec); 3738 codec->patch_ops.init(codec);
3695 snd_hda_codec_resume_amp(codec); 3739 snd_hda_codec_resume_amp(codec);
3696 snd_hda_codec_resume_cache(codec); 3740 snd_hda_codec_resume_cache(codec);
3741#ifdef CONFIG_SND_HDA_POWER_SAVE
3742 if (spec && spec->power_hook)
3743 spec->power_hook(codec, 1);
3744#endif
3697 return 0; 3745 return 0;
3698} 3746}
3699#endif 3747#endif
@@ -3710,6 +3758,7 @@ static struct hda_codec_ops alc_patch_ops = {
3710 .resume = alc_resume, 3758 .resume = alc_resume,
3711#endif 3759#endif
3712#ifdef CONFIG_SND_HDA_POWER_SAVE 3760#ifdef CONFIG_SND_HDA_POWER_SAVE
3761 .suspend = alc_suspend,
3713 .check_power_status = alc_check_power_status, 3762 .check_power_status = alc_check_power_status,
3714#endif 3763#endif
3715}; 3764};
@@ -9010,7 +9059,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
9010 SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), 9059 SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG),
9011 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG), 9060 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG),
9012 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ 9061 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */
9013 SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC883_TARGA_2ch_DIG), 9062 SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC882_AUTO),
9014 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), 9063 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
9015 SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG), 9064 SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG),
9016 SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG), 9065 SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG),
@@ -9373,6 +9422,7 @@ static struct alc_config_preset alc882_presets[] = {
9373 .dac_nids = alc883_dac_nids, 9422 .dac_nids = alc883_dac_nids,
9374 .adc_nids = alc883_adc_nids_alt, 9423 .adc_nids = alc883_adc_nids_alt,
9375 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), 9424 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
9425 .capsrc_nids = alc883_capsrc_nids,
9376 .dig_out_nid = ALC883_DIGOUT_NID, 9426 .dig_out_nid = ALC883_DIGOUT_NID,
9377 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), 9427 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
9378 .channel_mode = alc883_3ST_2ch_modes, 9428 .channel_mode = alc883_3ST_2ch_modes,
@@ -9469,10 +9519,11 @@ static struct alc_config_preset alc882_presets[] = {
9469 .init_hook = alc_automute_amp, 9519 .init_hook = alc_automute_amp,
9470 }, 9520 },
9471 [ALC888_ACER_ASPIRE_8930G] = { 9521 [ALC888_ACER_ASPIRE_8930G] = {
9472 .mixers = { alc888_base_mixer, 9522 .mixers = { alc889_acer_aspire_8930g_mixer,
9473 alc883_chmode_mixer }, 9523 alc883_chmode_mixer },
9474 .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, 9524 .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs,
9475 alc889_acer_aspire_8930g_verbs }, 9525 alc889_acer_aspire_8930g_verbs,
9526 alc889_eapd_verbs},
9476 .num_dacs = ARRAY_SIZE(alc883_dac_nids), 9527 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
9477 .dac_nids = alc883_dac_nids, 9528 .dac_nids = alc883_dac_nids,
9478 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), 9529 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids),
@@ -9489,6 +9540,9 @@ static struct alc_config_preset alc882_presets[] = {
9489 .unsol_event = alc_automute_amp_unsol_event, 9540 .unsol_event = alc_automute_amp_unsol_event,
9490 .setup = alc889_acer_aspire_8930g_setup, 9541 .setup = alc889_acer_aspire_8930g_setup,
9491 .init_hook = alc_automute_amp, 9542 .init_hook = alc_automute_amp,
9543#ifdef CONFIG_SND_HDA_POWER_SAVE
9544 .power_hook = alc889_power_eapd,
9545#endif
9492 }, 9546 },
9493 [ALC888_ACER_ASPIRE_7730G] = { 9547 [ALC888_ACER_ASPIRE_7730G] = {
9494 .mixers = { alc883_3ST_6ch_mixer, 9548 .mixers = { alc883_3ST_6ch_mixer,
@@ -9519,6 +9573,7 @@ static struct alc_config_preset alc882_presets[] = {
9519 .dac_nids = alc883_dac_nids, 9573 .dac_nids = alc883_dac_nids,
9520 .adc_nids = alc883_adc_nids_alt, 9574 .adc_nids = alc883_adc_nids_alt,
9521 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), 9575 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
9576 .capsrc_nids = alc883_capsrc_nids,
9522 .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), 9577 .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
9523 .channel_mode = alc883_sixstack_modes, 9578 .channel_mode = alc883_sixstack_modes,
9524 .input_mux = &alc883_capture_source, 9579 .input_mux = &alc883_capture_source,
@@ -9580,6 +9635,7 @@ static struct alc_config_preset alc882_presets[] = {
9580 .dac_nids = alc883_dac_nids, 9635 .dac_nids = alc883_dac_nids,
9581 .adc_nids = alc883_adc_nids_alt, 9636 .adc_nids = alc883_adc_nids_alt,
9582 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), 9637 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
9638 .capsrc_nids = alc883_capsrc_nids,
9583 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), 9639 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
9584 .channel_mode = alc883_3ST_2ch_modes, 9640 .channel_mode = alc883_3ST_2ch_modes,
9585 .input_mux = &alc883_lenovo_101e_capture_source, 9641 .input_mux = &alc883_lenovo_101e_capture_source,
@@ -9759,6 +9815,7 @@ static struct alc_config_preset alc882_presets[] = {
9759 alc880_gpio1_init_verbs }, 9815 alc880_gpio1_init_verbs },
9760 .adc_nids = alc883_adc_nids, 9816 .adc_nids = alc883_adc_nids,
9761 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), 9817 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
9818 .capsrc_nids = alc883_capsrc_nids,
9762 .dac_nids = alc883_dac_nids, 9819 .dac_nids = alc883_dac_nids,
9763 .num_dacs = ARRAY_SIZE(alc883_dac_nids), 9820 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
9764 .channel_mode = alc889A_mb31_6ch_modes, 9821 .channel_mode = alc889A_mb31_6ch_modes,
@@ -10781,6 +10838,13 @@ static struct hda_verb alc262_lenovo_3000_unsol_verbs[] = {
10781 {} 10838 {}
10782}; 10839};
10783 10840
10841static struct hda_verb alc262_lenovo_3000_init_verbs[] = {
10842 /* Front Mic pin: input vref at 50% */
10843 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
10844 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
10845 {}
10846};
10847
10784static struct hda_input_mux alc262_fujitsu_capture_source = { 10848static struct hda_input_mux alc262_fujitsu_capture_source = {
10785 .num_items = 3, 10849 .num_items = 3,
10786 .items = { 10850 .items = {
@@ -11835,7 +11899,8 @@ static struct alc_config_preset alc262_presets[] = {
11835 [ALC262_LENOVO_3000] = { 11899 [ALC262_LENOVO_3000] = {
11836 .mixers = { alc262_lenovo_3000_mixer }, 11900 .mixers = { alc262_lenovo_3000_mixer },
11837 .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs, 11901 .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs,
11838 alc262_lenovo_3000_unsol_verbs }, 11902 alc262_lenovo_3000_unsol_verbs,
11903 alc262_lenovo_3000_init_verbs },
11839 .num_dacs = ARRAY_SIZE(alc262_dac_nids), 11904 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
11840 .dac_nids = alc262_dac_nids, 11905 .dac_nids = alc262_dac_nids,
11841 .hp_nid = 0x03, 11906 .hp_nid = 0x03,
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a4526d008042..2f08b434bbd8 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -3778,15 +3778,16 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
3778 err = snd_hda_attach_beep_device(codec, nid); 3778 err = snd_hda_attach_beep_device(codec, nid);
3779 if (err < 0) 3779 if (err < 0)
3780 return err; 3780 return err;
3781 /* IDT/STAC codecs have linear beep tone parameter */ 3781 if (codec->beep) {
3782 codec->beep->linear_tone = 1; 3782 /* IDT/STAC codecs have linear beep tone parameter */
3783 /* if no beep switch is available, make its own one */ 3783 codec->beep->linear_tone = 1;
3784 caps = query_amp_caps(codec, nid, HDA_OUTPUT); 3784 /* if no beep switch is available, make its own one */
3785 if (codec->beep && 3785 caps = query_amp_caps(codec, nid, HDA_OUTPUT);
3786 !((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT)) { 3786 if (!(caps & AC_AMPCAP_MUTE)) {
3787 err = stac92xx_beep_switch_ctl(codec); 3787 err = stac92xx_beep_switch_ctl(codec);
3788 if (err < 0) 3788 if (err < 0)
3789 return err; 3789 return err;
3790 }
3790 } 3791 }
3791 } 3792 }
3792#endif 3793#endif