diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_beep.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_eld.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 164 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 |
8 files changed, 157 insertions, 51 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index e4581a42ace5..29714c818b53 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include "hda_beep.h" | 27 | #include "hda_beep.h" |
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index dcd22446cfc7..d8da18a9e98b 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/slab.h> | ||
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include <asm/unaligned.h> | 27 | #include <asm/unaligned.h> |
27 | #include "hda_codec.h" | 28 | #include "hda_codec.h" |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 8b2915631cc3..f8fd586ae024 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2269,6 +2269,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | |||
2269 | SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), | 2269 | SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), |
2270 | SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), | 2270 | SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), |
2271 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), | 2271 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), |
2272 | SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB), | ||
2272 | SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), | 2273 | SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), |
2273 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), | 2274 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), |
2274 | SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), | 2275 | SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), |
@@ -2361,6 +2362,7 @@ static struct snd_pci_quirk msi_black_list[] __devinitdata = { | |||
2361 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ | 2362 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ |
2362 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ | 2363 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ |
2363 | SND_PCI_QUIRK(0x1849, 0x0888, "ASRock", 0), /* Athlon64 X2 + nvidia */ | 2364 | SND_PCI_QUIRK(0x1849, 0x0888, "ASRock", 0), /* Athlon64 X2 + nvidia */ |
2365 | SND_PCI_QUIRK(0xa0a0, 0x0575, "Aopen MZ915-M", 0), /* ICH6 */ | ||
2364 | {} | 2366 | {} |
2365 | }; | 2367 | }; |
2366 | 2368 | ||
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index e6d1bdff1b6e..af34606c30c3 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1896,6 +1896,14 @@ static int patch_ad1981(struct hda_codec *codec) | |||
1896 | case AD1981_THINKPAD: | 1896 | case AD1981_THINKPAD: |
1897 | spec->mixers[0] = ad1981_thinkpad_mixers; | 1897 | spec->mixers[0] = ad1981_thinkpad_mixers; |
1898 | spec->input_mux = &ad1981_thinkpad_capture_source; | 1898 | spec->input_mux = &ad1981_thinkpad_capture_source; |
1899 | /* set the upper-limit for mixer amp to 0dB for avoiding the | ||
1900 | * possible damage by overloading | ||
1901 | */ | ||
1902 | snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT, | ||
1903 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1904 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1905 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1906 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1899 | break; | 1907 | break; |
1900 | case AD1981_TOSHIBA: | 1908 | case AD1981_TOSHIBA: |
1901 | spec->mixers[0] = ad1981_hp_mixers; | 1909 | spec->mixers[0] = ad1981_hp_mixers; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 194a28c54992..61682e1d09da 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
1591 | #endif | 1591 | #endif |
1592 | } | 1592 | } |
1593 | spec->vmaster_nid = 0x13; | 1593 | spec->vmaster_nid = 0x13; |
1594 | |||
1595 | switch (codec->subsystem_id >> 16) { | ||
1596 | case 0x103c: | ||
1597 | /* HP laptops have really bad sound over 0 dB on NID 0x10. | ||
1598 | * Fix max PCM level to 0 dB (originally it has 0x1e steps | ||
1599 | * with 0 dB offset 0x17) | ||
1600 | */ | ||
1601 | snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT, | ||
1602 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1603 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1604 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1605 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1606 | break; | ||
1607 | } | ||
1608 | |||
1594 | return 0; | 1609 | return 0; |
1595 | } | 1610 | } |
1596 | 1611 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 70669a246902..3c10c0b149f4 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -538,8 +538,6 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) | |||
538 | * patch entries | 538 | * patch entries |
539 | */ | 539 | */ |
540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
541 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
542 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
543 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", | 541 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", |
544 | .patch = patch_nvhdmi_8ch_7x }, | 542 | .patch = patch_nvhdmi_8ch_7x }, |
545 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", | 543 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", |
@@ -550,12 +548,16 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
550 | .patch = patch_nvhdmi_8ch_7x }, | 548 | .patch = patch_nvhdmi_8ch_7x }, |
551 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", | 549 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", |
552 | .patch = patch_nvhdmi_8ch_7x }, | 550 | .patch = patch_nvhdmi_8ch_7x }, |
553 | { .id = 0x10de000c, .name = "MCP89 HDMI", | 551 | { .id = 0x10de000a, .name = "GT220 HDMI", |
554 | .patch = patch_nvhdmi_8ch_89 }, | 552 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000b, .name = "GT21x HDMI", | 553 | { .id = 0x10de000b, .name = "GT21x HDMI", |
556 | .patch = patch_nvhdmi_8ch_89 }, | 554 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000c, .name = "MCP89 HDMI", | ||
556 | .patch = patch_nvhdmi_8ch_89 }, | ||
557 | { .id = 0x10de000d, .name = "GT240 HDMI", | 557 | { .id = 0x10de000d, .name = "GT240 HDMI", |
558 | .patch = patch_nvhdmi_8ch_89 }, | 558 | .patch = patch_nvhdmi_8ch_89 }, |
559 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
560 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
559 | {} /* terminator */ | 561 | {} /* terminator */ |
560 | }; | 562 | }; |
561 | 563 | ||
@@ -564,11 +566,12 @@ MODULE_ALIAS("snd-hda-codec-id:10de0003"); | |||
564 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); | 566 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); |
565 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | 567 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); |
566 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 568 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
567 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 569 | MODULE_ALIAS("snd-hda-codec-id:10de000a"); |
568 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
569 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); | 570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); |
571 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
571 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); | 572 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); |
573 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | ||
574 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
572 | 575 | ||
573 | MODULE_LICENSE("GPL"); | 576 | MODULE_LICENSE("GPL"); |
574 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); | 577 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4ec57633af88..c7730dbb9ddb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1621,6 +1621,11 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = { | |||
1621 | */ | 1621 | */ |
1622 | 1622 | ||
1623 | static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { | 1623 | static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { |
1624 | /* Route to built-in subwoofer as well as speakers */ | ||
1625 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1626 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1627 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1628 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1624 | /* Bias voltage on for external mic port */ | 1629 | /* Bias voltage on for external mic port */ |
1625 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, | 1630 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, |
1626 | /* Front Mic: set to PIN_IN (empty by default) */ | 1631 | /* Front Mic: set to PIN_IN (empty by default) */ |
@@ -1632,10 +1637,12 @@ static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { | |||
1632 | /* Enable speaker output */ | 1637 | /* Enable speaker output */ |
1633 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 1638 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
1634 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1639 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1640 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
1635 | /* Enable headphone output */ | 1641 | /* Enable headphone output */ |
1636 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, | 1642 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, |
1637 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1643 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1638 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | 1644 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, |
1645 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
1639 | { } | 1646 | { } |
1640 | }; | 1647 | }; |
1641 | 1648 | ||
@@ -2532,8 +2539,6 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2532 | return err; | 2539 | return err; |
2533 | } | 2540 | } |
2534 | 2541 | ||
2535 | alc_free_kctls(codec); /* no longer needed */ | ||
2536 | |||
2537 | /* assign Capture Source enums to NID */ | 2542 | /* assign Capture Source enums to NID */ |
2538 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); | 2543 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); |
2539 | if (!kctl) | 2544 | if (!kctl) |
@@ -2602,6 +2607,9 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2602 | } | 2607 | } |
2603 | } | 2608 | } |
2604 | } | 2609 | } |
2610 | |||
2611 | alc_free_kctls(codec); /* no longer needed */ | ||
2612 | |||
2605 | return 0; | 2613 | return 0; |
2606 | } | 2614 | } |
2607 | 2615 | ||
@@ -4983,6 +4991,70 @@ static void set_capture_mixer(struct hda_codec *codec) | |||
4983 | } | 4991 | } |
4984 | } | 4992 | } |
4985 | 4993 | ||
4994 | /* fill adc_nids (and capsrc_nids) containing all active input pins */ | ||
4995 | static void fillup_priv_adc_nids(struct hda_codec *codec, hda_nid_t *nids, | ||
4996 | int num_nids) | ||
4997 | { | ||
4998 | struct alc_spec *spec = codec->spec; | ||
4999 | int n; | ||
5000 | hda_nid_t fallback_adc = 0, fallback_cap = 0; | ||
5001 | |||
5002 | for (n = 0; n < num_nids; n++) { | ||
5003 | hda_nid_t adc, cap; | ||
5004 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; | ||
5005 | int nconns, i, j; | ||
5006 | |||
5007 | adc = nids[n]; | ||
5008 | if (get_wcaps_type(get_wcaps(codec, adc)) != AC_WID_AUD_IN) | ||
5009 | continue; | ||
5010 | cap = adc; | ||
5011 | nconns = snd_hda_get_connections(codec, cap, conn, | ||
5012 | ARRAY_SIZE(conn)); | ||
5013 | if (nconns == 1) { | ||
5014 | cap = conn[0]; | ||
5015 | nconns = snd_hda_get_connections(codec, cap, conn, | ||
5016 | ARRAY_SIZE(conn)); | ||
5017 | } | ||
5018 | if (nconns <= 0) | ||
5019 | continue; | ||
5020 | if (!fallback_adc) { | ||
5021 | fallback_adc = adc; | ||
5022 | fallback_cap = cap; | ||
5023 | } | ||
5024 | for (i = 0; i < AUTO_PIN_LAST; i++) { | ||
5025 | hda_nid_t nid = spec->autocfg.input_pins[i]; | ||
5026 | if (!nid) | ||
5027 | continue; | ||
5028 | for (j = 0; j < nconns; j++) { | ||
5029 | if (conn[j] == nid) | ||
5030 | break; | ||
5031 | } | ||
5032 | if (j >= nconns) | ||
5033 | break; | ||
5034 | } | ||
5035 | if (i >= AUTO_PIN_LAST) { | ||
5036 | int num_adcs = spec->num_adc_nids; | ||
5037 | spec->private_adc_nids[num_adcs] = adc; | ||
5038 | spec->private_capsrc_nids[num_adcs] = cap; | ||
5039 | spec->num_adc_nids++; | ||
5040 | spec->adc_nids = spec->private_adc_nids; | ||
5041 | if (adc != cap) | ||
5042 | spec->capsrc_nids = spec->private_capsrc_nids; | ||
5043 | } | ||
5044 | } | ||
5045 | if (!spec->num_adc_nids) { | ||
5046 | printk(KERN_WARNING "hda_codec: %s: no valid ADC found;" | ||
5047 | " using fallback 0x%x\n", | ||
5048 | codec->chip_name, fallback_adc); | ||
5049 | spec->private_adc_nids[0] = fallback_adc; | ||
5050 | spec->adc_nids = spec->private_adc_nids; | ||
5051 | if (fallback_adc != fallback_cap) { | ||
5052 | spec->private_capsrc_nids[0] = fallback_cap; | ||
5053 | spec->capsrc_nids = spec->private_adc_nids; | ||
5054 | } | ||
5055 | } | ||
5056 | } | ||
5057 | |||
4986 | #ifdef CONFIG_SND_HDA_INPUT_BEEP | 5058 | #ifdef CONFIG_SND_HDA_INPUT_BEEP |
4987 | #define set_beep_amp(spec, nid, idx, dir) \ | 5059 | #define set_beep_amp(spec, nid, idx, dir) \ |
4988 | ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) | 5060 | ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) |
@@ -8397,9 +8469,7 @@ static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { | |||
8397 | 8469 | ||
8398 | static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { | 8470 | static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { |
8399 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 8471 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
8400 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
8401 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 8472 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
8402 | HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT), | ||
8403 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8473 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8404 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8474 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8405 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 8475 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
@@ -10040,6 +10110,8 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec, | |||
10040 | int idx; | 10110 | int idx; |
10041 | 10111 | ||
10042 | alc_set_pin_output(codec, nid, pin_type); | 10112 | alc_set_pin_output(codec, nid, pin_type); |
10113 | if (dac_idx >= spec->multiout.num_dacs) | ||
10114 | return; | ||
10043 | if (spec->multiout.dac_nids[dac_idx] == 0x25) | 10115 | if (spec->multiout.dac_nids[dac_idx] == 0x25) |
10044 | idx = 4; | 10116 | idx = 4; |
10045 | else | 10117 | else |
@@ -12455,11 +12527,11 @@ static void alc268_aspire_one_speaker_automute(struct hda_codec *codec) | |||
12455 | unsigned char bits; | 12527 | unsigned char bits; |
12456 | 12528 | ||
12457 | present = snd_hda_jack_detect(codec, 0x15); | 12529 | present = snd_hda_jack_detect(codec, 0x15); |
12458 | bits = present ? AMP_IN_MUTE(0) : 0; | 12530 | bits = present ? HDA_AMP_MUTE : 0; |
12459 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 0, | 12531 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 0, |
12460 | AMP_IN_MUTE(0), bits); | 12532 | HDA_AMP_MUTE, bits); |
12461 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 1, | 12533 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 1, |
12462 | AMP_IN_MUTE(0), bits); | 12534 | HDA_AMP_MUTE, bits); |
12463 | } | 12535 | } |
12464 | 12536 | ||
12465 | static void alc268_acer_lc_unsol_event(struct hda_codec *codec, | 12537 | static void alc268_acer_lc_unsol_event(struct hda_codec *codec, |
@@ -13329,9 +13401,9 @@ static hda_nid_t alc269vb_capsrc_nids[1] = { | |||
13329 | 0x22, | 13401 | 0x22, |
13330 | }; | 13402 | }; |
13331 | 13403 | ||
13332 | /* NOTE: ADC2 (0x07) is connected from a recording *MIXER* (0x24), | 13404 | static hda_nid_t alc269_adc_candidates[] = { |
13333 | * not a mux! | 13405 | 0x08, 0x09, 0x07, |
13334 | */ | 13406 | }; |
13335 | 13407 | ||
13336 | #define alc269_modes alc260_modes | 13408 | #define alc269_modes alc260_modes |
13337 | #define alc269_capture_source alc880_lg_lw_capture_source | 13409 | #define alc269_capture_source alc880_lg_lw_capture_source |
@@ -13478,11 +13550,11 @@ static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec) | |||
13478 | unsigned char bits; | 13550 | unsigned char bits; |
13479 | 13551 | ||
13480 | present = snd_hda_jack_detect(codec, 0x15); | 13552 | present = snd_hda_jack_detect(codec, 0x15); |
13481 | bits = present ? AMP_IN_MUTE(0) : 0; | 13553 | bits = present ? HDA_AMP_MUTE : 0; |
13482 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13554 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13483 | AMP_IN_MUTE(0), bits); | 13555 | HDA_AMP_MUTE, bits); |
13484 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 13556 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
13485 | AMP_IN_MUTE(0), bits); | 13557 | HDA_AMP_MUTE, bits); |
13486 | 13558 | ||
13487 | snd_hda_codec_write(codec, 0x20, 0, | 13559 | snd_hda_codec_write(codec, 0x20, 0, |
13488 | AC_VERB_SET_COEF_INDEX, 0x0c); | 13560 | AC_VERB_SET_COEF_INDEX, 0x0c); |
@@ -13507,11 +13579,11 @@ static void alc269_lifebook_speaker_automute(struct hda_codec *codec) | |||
13507 | /* Check port replicator headphone socket */ | 13579 | /* Check port replicator headphone socket */ |
13508 | present |= snd_hda_jack_detect(codec, 0x1a); | 13580 | present |= snd_hda_jack_detect(codec, 0x1a); |
13509 | 13581 | ||
13510 | bits = present ? AMP_IN_MUTE(0) : 0; | 13582 | bits = present ? HDA_AMP_MUTE : 0; |
13511 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13583 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13512 | AMP_IN_MUTE(0), bits); | 13584 | HDA_AMP_MUTE, bits); |
13513 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 13585 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
13514 | AMP_IN_MUTE(0), bits); | 13586 | HDA_AMP_MUTE, bits); |
13515 | 13587 | ||
13516 | snd_hda_codec_write(codec, 0x20, 0, | 13588 | snd_hda_codec_write(codec, 0x20, 0, |
13517 | AC_VERB_SET_COEF_INDEX, 0x0c); | 13589 | AC_VERB_SET_COEF_INDEX, 0x0c); |
@@ -13642,11 +13714,11 @@ static void alc269_speaker_automute(struct hda_codec *codec) | |||
13642 | unsigned char bits; | 13714 | unsigned char bits; |
13643 | 13715 | ||
13644 | present = snd_hda_jack_detect(codec, nid); | 13716 | present = snd_hda_jack_detect(codec, nid); |
13645 | bits = present ? AMP_IN_MUTE(0) : 0; | 13717 | bits = present ? HDA_AMP_MUTE : 0; |
13646 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13718 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13647 | AMP_IN_MUTE(0), bits); | 13719 | HDA_AMP_MUTE, bits); |
13648 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 13720 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
13649 | AMP_IN_MUTE(0), bits); | 13721 | HDA_AMP_MUTE, bits); |
13650 | } | 13722 | } |
13651 | 13723 | ||
13652 | /* unsolicited event for HP jack sensing */ | 13724 | /* unsolicited event for HP jack sensing */ |
@@ -13838,7 +13910,6 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
13838 | struct alc_spec *spec = codec->spec; | 13910 | struct alc_spec *spec = codec->spec; |
13839 | int err; | 13911 | int err; |
13840 | static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; | 13912 | static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; |
13841 | hda_nid_t real_capsrc_nids; | ||
13842 | 13913 | ||
13843 | err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, | 13914 | err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, |
13844 | alc269_ignore); | 13915 | alc269_ignore); |
@@ -13862,18 +13933,19 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
13862 | 13933 | ||
13863 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { | 13934 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { |
13864 | add_verb(spec, alc269vb_init_verbs); | 13935 | add_verb(spec, alc269vb_init_verbs); |
13865 | real_capsrc_nids = alc269vb_capsrc_nids[0]; | ||
13866 | alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21); | 13936 | alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21); |
13867 | } else { | 13937 | } else { |
13868 | add_verb(spec, alc269_init_verbs); | 13938 | add_verb(spec, alc269_init_verbs); |
13869 | real_capsrc_nids = alc269_capsrc_nids[0]; | ||
13870 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); | 13939 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
13871 | } | 13940 | } |
13872 | 13941 | ||
13873 | spec->num_mux_defs = 1; | 13942 | spec->num_mux_defs = 1; |
13874 | spec->input_mux = &spec->private_imux[0]; | 13943 | spec->input_mux = &spec->private_imux[0]; |
13944 | fillup_priv_adc_nids(codec, alc269_adc_candidates, | ||
13945 | sizeof(alc269_adc_candidates)); | ||
13946 | |||
13875 | /* set default input source */ | 13947 | /* set default input source */ |
13876 | snd_hda_codec_write_cache(codec, real_capsrc_nids, | 13948 | snd_hda_codec_write_cache(codec, spec->capsrc_nids[0], |
13877 | 0, AC_VERB_SET_CONNECT_SEL, | 13949 | 0, AC_VERB_SET_CONNECT_SEL, |
13878 | spec->input_mux->items[0].index); | 13950 | spec->input_mux->items[0].index); |
13879 | 13951 | ||
@@ -14152,14 +14224,16 @@ static int patch_alc269(struct hda_codec *codec) | |||
14152 | spec->stream_digital_playback = &alc269_pcm_digital_playback; | 14224 | spec->stream_digital_playback = &alc269_pcm_digital_playback; |
14153 | spec->stream_digital_capture = &alc269_pcm_digital_capture; | 14225 | spec->stream_digital_capture = &alc269_pcm_digital_capture; |
14154 | 14226 | ||
14155 | if (!is_alc269vb) { | 14227 | if (!spec->adc_nids) { /* wasn't filled automatically? use default */ |
14156 | spec->adc_nids = alc269_adc_nids; | 14228 | if (!is_alc269vb) { |
14157 | spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); | 14229 | spec->adc_nids = alc269_adc_nids; |
14158 | spec->capsrc_nids = alc269_capsrc_nids; | 14230 | spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); |
14159 | } else { | 14231 | spec->capsrc_nids = alc269_capsrc_nids; |
14160 | spec->adc_nids = alc269vb_adc_nids; | 14232 | } else { |
14161 | spec->num_adc_nids = ARRAY_SIZE(alc269vb_adc_nids); | 14233 | spec->adc_nids = alc269vb_adc_nids; |
14162 | spec->capsrc_nids = alc269vb_capsrc_nids; | 14234 | spec->num_adc_nids = ARRAY_SIZE(alc269vb_adc_nids); |
14235 | spec->capsrc_nids = alc269vb_capsrc_nids; | ||
14236 | } | ||
14163 | } | 14237 | } |
14164 | 14238 | ||
14165 | if (!spec->cap_mixer) | 14239 | if (!spec->cap_mixer) |
@@ -17111,9 +17185,9 @@ static void alc663_m51va_speaker_automute(struct hda_codec *codec) | |||
17111 | present = snd_hda_jack_detect(codec, 0x21); | 17185 | present = snd_hda_jack_detect(codec, 0x21); |
17112 | bits = present ? HDA_AMP_MUTE : 0; | 17186 | bits = present ? HDA_AMP_MUTE : 0; |
17113 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17187 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17114 | AMP_IN_MUTE(0), bits); | 17188 | HDA_AMP_MUTE, bits); |
17115 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17189 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17116 | AMP_IN_MUTE(0), bits); | 17190 | HDA_AMP_MUTE, bits); |
17117 | } | 17191 | } |
17118 | 17192 | ||
17119 | static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) | 17193 | static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) |
@@ -17124,13 +17198,13 @@ static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) | |||
17124 | present = snd_hda_jack_detect(codec, 0x21); | 17198 | present = snd_hda_jack_detect(codec, 0x21); |
17125 | bits = present ? HDA_AMP_MUTE : 0; | 17199 | bits = present ? HDA_AMP_MUTE : 0; |
17126 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17200 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17127 | AMP_IN_MUTE(0), bits); | 17201 | HDA_AMP_MUTE, bits); |
17128 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17202 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17129 | AMP_IN_MUTE(0), bits); | 17203 | HDA_AMP_MUTE, bits); |
17130 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, | 17204 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, |
17131 | AMP_IN_MUTE(0), bits); | 17205 | HDA_AMP_MUTE, bits); |
17132 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, | 17206 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, |
17133 | AMP_IN_MUTE(0), bits); | 17207 | HDA_AMP_MUTE, bits); |
17134 | } | 17208 | } |
17135 | 17209 | ||
17136 | static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) | 17210 | static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) |
@@ -17141,13 +17215,13 @@ static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) | |||
17141 | present = snd_hda_jack_detect(codec, 0x15); | 17215 | present = snd_hda_jack_detect(codec, 0x15); |
17142 | bits = present ? HDA_AMP_MUTE : 0; | 17216 | bits = present ? HDA_AMP_MUTE : 0; |
17143 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17217 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17144 | AMP_IN_MUTE(0), bits); | 17218 | HDA_AMP_MUTE, bits); |
17145 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17219 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17146 | AMP_IN_MUTE(0), bits); | 17220 | HDA_AMP_MUTE, bits); |
17147 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, | 17221 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, |
17148 | AMP_IN_MUTE(0), bits); | 17222 | HDA_AMP_MUTE, bits); |
17149 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, | 17223 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, |
17150 | AMP_IN_MUTE(0), bits); | 17224 | HDA_AMP_MUTE, bits); |
17151 | } | 17225 | } |
17152 | 17226 | ||
17153 | static void alc662_f5z_speaker_automute(struct hda_codec *codec) | 17227 | static void alc662_f5z_speaker_automute(struct hda_codec *codec) |
@@ -17186,14 +17260,14 @@ static void alc663_two_hp_m2_speaker_automute(struct hda_codec *codec) | |||
17186 | 17260 | ||
17187 | if (present1 || present2) { | 17261 | if (present1 || present2) { |
17188 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17262 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17189 | AMP_IN_MUTE(0), AMP_IN_MUTE(0)); | 17263 | HDA_AMP_MUTE, HDA_AMP_MUTE); |
17190 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17264 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17191 | AMP_IN_MUTE(0), AMP_IN_MUTE(0)); | 17265 | HDA_AMP_MUTE, HDA_AMP_MUTE); |
17192 | } else { | 17266 | } else { |
17193 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17267 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17194 | AMP_IN_MUTE(0), 0); | 17268 | HDA_AMP_MUTE, 0); |
17195 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17269 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17196 | AMP_IN_MUTE(0), 0); | 17270 | HDA_AMP_MUTE, 0); |
17197 | } | 17271 | } |
17198 | } | 17272 | } |
17199 | 17273 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 8c416bb18a57..c4be3fab94e5 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1730,6 +1730,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1730 | "HP HDX", STAC_HP_HDX), /* HDX16 */ | 1730 | "HP HDX", STAC_HP_HDX), /* HDX16 */ |
1731 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, | 1731 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, |
1732 | "HP dv6", STAC_HP_DV5), | 1732 | "HP dv6", STAC_HP_DV5), |
1733 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3061, | ||
1734 | "HP dv6", STAC_HP_DV5), /* HP dv6-1110ax */ | ||
1733 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, | 1735 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, |
1734 | "HP", STAC_HP_DV5), | 1736 | "HP", STAC_HP_DV5), |
1735 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, | 1737 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, |