aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c46
1 files changed, 38 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 334533197425..3a8e58c483df 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -945,12 +945,13 @@ static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid,
945static void alc_automute_pin(struct hda_codec *codec) 945static void alc_automute_pin(struct hda_codec *codec)
946{ 946{
947 struct alc_spec *spec = codec->spec; 947 struct alc_spec *spec = codec->spec;
948 unsigned int present; 948 unsigned int present, pincap;
949 unsigned int nid = spec->autocfg.hp_pins[0]; 949 unsigned int nid = spec->autocfg.hp_pins[0];
950 int i; 950 int i;
951 951
952 /* need to execute and sync at first */ 952 pincap = snd_hda_query_pin_caps(codec, nid);
953 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); 953 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
954 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
954 present = snd_hda_codec_read(codec, nid, 0, 955 present = snd_hda_codec_read(codec, nid, 0,
955 AC_VERB_GET_PIN_SENSE, 0); 956 AC_VERB_GET_PIN_SENSE, 0);
956 spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0; 957 spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0;
@@ -1392,7 +1393,7 @@ static struct hda_verb alc888_fujitsu_xa3530_verbs[] = {
1392static void alc_automute_amp(struct hda_codec *codec) 1393static void alc_automute_amp(struct hda_codec *codec)
1393{ 1394{
1394 struct alc_spec *spec = codec->spec; 1395 struct alc_spec *spec = codec->spec;
1395 unsigned int val, mute; 1396 unsigned int val, mute, pincap;
1396 hda_nid_t nid; 1397 hda_nid_t nid;
1397 int i; 1398 int i;
1398 1399
@@ -1401,6 +1402,10 @@ static void alc_automute_amp(struct hda_codec *codec)
1401 nid = spec->autocfg.hp_pins[i]; 1402 nid = spec->autocfg.hp_pins[i];
1402 if (!nid) 1403 if (!nid)
1403 break; 1404 break;
1405 pincap = snd_hda_query_pin_caps(codec, nid);
1406 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
1407 snd_hda_codec_read(codec, nid, 0,
1408 AC_VERB_SET_PIN_SENSE, 0);
1404 val = snd_hda_codec_read(codec, nid, 0, 1409 val = snd_hda_codec_read(codec, nid, 0,
1405 AC_VERB_GET_PIN_SENSE, 0); 1410 AC_VERB_GET_PIN_SENSE, 0);
1406 if (val & AC_PINSENSE_PRESENCE) { 1411 if (val & AC_PINSENSE_PRESENCE) {
@@ -1471,6 +1476,10 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
1471static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { 1476static struct hda_verb alc888_acer_aspire_6530g_verbs[] = {
1472/* Bias voltage on for external mic port */ 1477/* Bias voltage on for external mic port */
1473 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, 1478 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80},
1479/* Front Mic: set to PIN_IN (empty by default) */
1480 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1481/* Unselect Front Mic by default in input mixer 3 */
1482 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)},
1474/* Enable unsolicited event for HP jack */ 1483/* Enable unsolicited event for HP jack */
1475 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, 1484 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
1476/* Enable speaker output */ 1485/* Enable speaker output */
@@ -1560,18 +1569,22 @@ static struct hda_input_mux alc888_2_capture_sources[2] = {
1560static struct hda_input_mux alc888_acer_aspire_6530_sources[2] = { 1569static struct hda_input_mux alc888_acer_aspire_6530_sources[2] = {
1561 /* Interal mic only available on one ADC */ 1570 /* Interal mic only available on one ADC */
1562 { 1571 {
1563 .num_items = 3, 1572 .num_items = 5,
1564 .items = { 1573 .items = {
1565 { "Ext Mic", 0x0 }, 1574 { "Ext Mic", 0x0 },
1575 { "Line In", 0x2 },
1566 { "CD", 0x4 }, 1576 { "CD", 0x4 },
1577 { "Input Mix", 0xa },
1567 { "Int Mic", 0xb }, 1578 { "Int Mic", 0xb },
1568 }, 1579 },
1569 }, 1580 },
1570 { 1581 {
1571 .num_items = 2, 1582 .num_items = 4,
1572 .items = { 1583 .items = {
1573 { "Ext Mic", 0x0 }, 1584 { "Ext Mic", 0x0 },
1585 { "Line In", 0x2 },
1574 { "CD", 0x4 }, 1586 { "CD", 0x4 },
1587 { "Input Mix", 0xa },
1575 }, 1588 },
1576 } 1589 }
1577}; 1590};
@@ -1639,6 +1652,17 @@ static void alc888_acer_aspire_4930g_init_hook(struct hda_codec *codec)
1639 alc_automute_amp(codec); 1652 alc_automute_amp(codec);
1640} 1653}
1641 1654
1655static void alc888_acer_aspire_6530g_init_hook(struct hda_codec *codec)
1656{
1657 struct alc_spec *spec = codec->spec;
1658
1659 spec->autocfg.hp_pins[0] = 0x15;
1660 spec->autocfg.speaker_pins[0] = 0x14;
1661 spec->autocfg.speaker_pins[1] = 0x16;
1662 spec->autocfg.speaker_pins[2] = 0x17;
1663 alc_automute_amp(codec);
1664}
1665
1642static void alc889_acer_aspire_8930g_init_hook(struct hda_codec *codec) 1666static void alc889_acer_aspire_8930g_init_hook(struct hda_codec *codec)
1643{ 1667{
1644 struct alc_spec *spec = codec->spec; 1668 struct alc_spec *spec = codec->spec;
@@ -8189,6 +8213,8 @@ static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = {
8189 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 8213 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
8190 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 8214 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
8191 HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT), 8215 HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT),
8216 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
8217 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
8192 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 8218 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
8193 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 8219 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
8194 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), 8220 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
@@ -9064,7 +9090,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
9064 SND_PCI_QUIRK(0x1025, 0x0157, "Acer X3200", ALC883_AUTO), 9090 SND_PCI_QUIRK(0x1025, 0x0157, "Acer X3200", ALC883_AUTO),
9065 SND_PCI_QUIRK(0x1025, 0x0158, "Acer AX1700-U3700A", ALC883_AUTO), 9091 SND_PCI_QUIRK(0x1025, 0x0158, "Acer AX1700-U3700A", ALC883_AUTO),
9066 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", 9092 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
9067 ALC888_ACER_ASPIRE_4930G), 9093 ALC888_ACER_ASPIRE_6530G),
9068 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", 9094 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
9069 ALC888_ACER_ASPIRE_6530G), 9095 ALC888_ACER_ASPIRE_6530G),
9070 /* default Acer -- disabled as it causes more problems. 9096 /* default Acer -- disabled as it causes more problems.
@@ -9317,7 +9343,7 @@ static struct alc_config_preset alc883_presets[] = {
9317 ARRAY_SIZE(alc888_2_capture_sources), 9343 ARRAY_SIZE(alc888_2_capture_sources),
9318 .input_mux = alc888_acer_aspire_6530_sources, 9344 .input_mux = alc888_acer_aspire_6530_sources,
9319 .unsol_event = alc_automute_amp_unsol_event, 9345 .unsol_event = alc_automute_amp_unsol_event,
9320 .init_hook = alc888_acer_aspire_4930g_init_hook, 9346 .init_hook = alc888_acer_aspire_6530g_init_hook,
9321 }, 9347 },
9322 [ALC888_ACER_ASPIRE_8930G] = { 9348 [ALC888_ACER_ASPIRE_8930G] = {
9323 .mixers = { alc888_base_mixer, 9349 .mixers = { alc888_base_mixer,
@@ -12437,6 +12463,8 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
12437 if (err < 0) 12463 if (err < 0)
12438 return err; 12464 return err;
12439 12465
12466 alc_ssid_check(codec, 0x15, 0x1b, 0x14);
12467
12440 return 1; 12468 return 1;
12441} 12469}
12442 12470
@@ -13345,6 +13373,8 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
13345 if (!spec->cap_mixer && !spec->no_analog) 13373 if (!spec->cap_mixer && !spec->no_analog)
13346 set_capture_mixer(spec); 13374 set_capture_mixer(spec);
13347 13375
13376 alc_ssid_check(codec, 0x15, 0x1b, 0x14);
13377
13348 return 1; 13378 return 1;
13349} 13379}
13350 13380