diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 63 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 159 |
5 files changed, 196 insertions, 32 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 3c596da2b9b5..b7bba7dc7cf1 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -2724,6 +2724,67 @@ int snd_hda_check_board_config(struct hda_codec *codec, | |||
2724 | EXPORT_SYMBOL_HDA(snd_hda_check_board_config); | 2724 | EXPORT_SYMBOL_HDA(snd_hda_check_board_config); |
2725 | 2725 | ||
2726 | /** | 2726 | /** |
2727 | * snd_hda_check_board_codec_sid_config - compare the current codec | ||
2728 | subsystem ID with the | ||
2729 | config table | ||
2730 | |||
2731 | This is important for Gateway notebooks with SB450 HDA Audio | ||
2732 | where the vendor ID of the PCI device is: | ||
2733 | ATI Technologies Inc SB450 HDA Audio [1002:437b] | ||
2734 | and the vendor/subvendor are found only at the codec. | ||
2735 | |||
2736 | * @codec: the HDA codec | ||
2737 | * @num_configs: number of config enums | ||
2738 | * @models: array of model name strings | ||
2739 | * @tbl: configuration table, terminated by null entries | ||
2740 | * | ||
2741 | * Compares the modelname or PCI subsystem id of the current codec with the | ||
2742 | * given configuration table. If a matching entry is found, returns its | ||
2743 | * config value (supposed to be 0 or positive). | ||
2744 | * | ||
2745 | * If no entries are matching, the function returns a negative value. | ||
2746 | */ | ||
2747 | int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, | ||
2748 | int num_configs, const char **models, | ||
2749 | const struct snd_pci_quirk *tbl) | ||
2750 | { | ||
2751 | const struct snd_pci_quirk *q; | ||
2752 | |||
2753 | /* Search for codec ID */ | ||
2754 | for (q = tbl; q->subvendor; q++) { | ||
2755 | unsigned long vendorid = (q->subdevice) | (q->subvendor << 16); | ||
2756 | |||
2757 | if (vendorid == codec->subsystem_id) | ||
2758 | break; | ||
2759 | } | ||
2760 | |||
2761 | if (!q->subvendor) | ||
2762 | return -1; | ||
2763 | |||
2764 | tbl = q; | ||
2765 | |||
2766 | if (tbl->value >= 0 && tbl->value < num_configs) { | ||
2767 | #ifdef CONFIG_SND_DEBUG_DETECT | ||
2768 | char tmp[10]; | ||
2769 | const char *model = NULL; | ||
2770 | if (models) | ||
2771 | model = models[tbl->value]; | ||
2772 | if (!model) { | ||
2773 | sprintf(tmp, "#%d", tbl->value); | ||
2774 | model = tmp; | ||
2775 | } | ||
2776 | snd_printdd(KERN_INFO "hda_codec: model '%s' is selected " | ||
2777 | "for config %x:%x (%s)\n", | ||
2778 | model, tbl->subvendor, tbl->subdevice, | ||
2779 | (tbl->name ? tbl->name : "Unknown device")); | ||
2780 | #endif | ||
2781 | return tbl->value; | ||
2782 | } | ||
2783 | return -1; | ||
2784 | } | ||
2785 | EXPORT_SYMBOL_HDA(snd_hda_check_board_codec_sid_config); | ||
2786 | |||
2787 | /** | ||
2727 | * snd_hda_add_new_ctls - create controls from the array | 2788 | * snd_hda_add_new_ctls - create controls from the array |
2728 | * @codec: the HDA codec | 2789 | * @codec: the HDA codec |
2729 | * @knew: the array of struct snd_kcontrol_new | 2790 | * @knew: the array of struct snd_kcontrol_new |
@@ -2815,7 +2876,7 @@ void snd_hda_power_down(struct hda_codec *codec) | |||
2815 | return; | 2876 | return; |
2816 | if (power_save(codec)) { | 2877 | if (power_save(codec)) { |
2817 | codec->power_transition = 1; /* avoid reentrance */ | 2878 | codec->power_transition = 1; /* avoid reentrance */ |
2818 | schedule_delayed_work(&codec->power_work, | 2879 | queue_delayed_work(codec->bus->workq, &codec->power_work, |
2819 | msecs_to_jiffies(power_save(codec) * 1000)); | 2880 | msecs_to_jiffies(power_save(codec) * 1000)); |
2820 | } | 2881 | } |
2821 | } | 2882 | } |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 6f2fe0f9fdd8..1dd8716c387f 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -296,6 +296,9 @@ void snd_print_pcm_bits(int pcm, char *buf, int buflen); | |||
296 | int snd_hda_check_board_config(struct hda_codec *codec, int num_configs, | 296 | int snd_hda_check_board_config(struct hda_codec *codec, int num_configs, |
297 | const char **modelnames, | 297 | const char **modelnames, |
298 | const struct snd_pci_quirk *pci_list); | 298 | const struct snd_pci_quirk *pci_list); |
299 | int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, | ||
300 | int num_configs, const char **models, | ||
301 | const struct snd_pci_quirk *tbl); | ||
299 | int snd_hda_add_new_ctls(struct hda_codec *codec, | 302 | int snd_hda_add_new_ctls(struct hda_codec *codec, |
300 | struct snd_kcontrol_new *knew); | 303 | struct snd_kcontrol_new *knew); |
301 | 304 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 96952a37d884..d57d8132a06e 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -160,6 +160,7 @@ static int patch_nvhdmi(struct hda_codec *codec) | |||
160 | */ | 160 | */ |
161 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 161 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
162 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi }, | 162 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi }, |
163 | { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi }, | ||
163 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi }, | 164 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi }, |
164 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi }, | 165 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi }, |
165 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi }, | 166 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi }, |
@@ -167,6 +168,7 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
167 | }; | 168 | }; |
168 | 169 | ||
169 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); | 170 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); |
171 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | ||
170 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 172 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
171 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 173 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); |
172 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | 174 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ea4c88fe05c4..82dd08431970 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -10573,6 +10573,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
10573 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), | 10573 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), |
10574 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), | 10574 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), |
10575 | SND_PCI_QUIRK(0x144d, 0xc039, "Samsung Q1U EL", ALC262_ULTRA), | 10575 | SND_PCI_QUIRK(0x144d, 0xc039, "Samsung Q1U EL", ALC262_ULTRA), |
10576 | SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO), | ||
10576 | SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000), | 10577 | SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000), |
10577 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), | 10578 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), |
10578 | SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31), | 10579 | SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 35b83dc6e19e..e6c13963f215 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -55,7 +55,8 @@ enum { | |||
55 | STAC_9200_DELL_M25, | 55 | STAC_9200_DELL_M25, |
56 | STAC_9200_DELL_M26, | 56 | STAC_9200_DELL_M26, |
57 | STAC_9200_DELL_M27, | 57 | STAC_9200_DELL_M27, |
58 | STAC_9200_GATEWAY, | 58 | STAC_9200_M4, |
59 | STAC_9200_M4_2, | ||
59 | STAC_9200_PANASONIC, | 60 | STAC_9200_PANASONIC, |
60 | STAC_9200_MODELS | 61 | STAC_9200_MODELS |
61 | }; | 62 | }; |
@@ -89,14 +90,19 @@ enum { | |||
89 | STAC_DELL_M4_2, | 90 | STAC_DELL_M4_2, |
90 | STAC_DELL_M4_3, | 91 | STAC_DELL_M4_3, |
91 | STAC_HP_M4, | 92 | STAC_HP_M4, |
93 | STAC_HP_DV5, | ||
92 | STAC_92HD71BXX_MODELS | 94 | STAC_92HD71BXX_MODELS |
93 | }; | 95 | }; |
94 | 96 | ||
95 | enum { | 97 | enum { |
96 | STAC_925x_REF, | 98 | STAC_925x_REF, |
99 | STAC_M1, | ||
100 | STAC_M1_2, | ||
101 | STAC_M2, | ||
97 | STAC_M2_2, | 102 | STAC_M2_2, |
98 | STAC_MA6, | 103 | STAC_M3, |
99 | STAC_PA6, | 104 | STAC_M5, |
105 | STAC_M6, | ||
100 | STAC_925x_MODELS | 106 | STAC_925x_MODELS |
101 | }; | 107 | }; |
102 | 108 | ||
@@ -331,6 +337,10 @@ static unsigned int stac92hd83xxx_pwr_mapping[4] = { | |||
331 | 0x03, 0x0c, 0x10, 0x40, | 337 | 0x03, 0x0c, 0x10, 0x40, |
332 | }; | 338 | }; |
333 | 339 | ||
340 | static hda_nid_t stac92hd83xxx_amp_nids[1] = { | ||
341 | 0xc, | ||
342 | }; | ||
343 | |||
334 | static hda_nid_t stac92hd71bxx_pwr_nids[3] = { | 344 | static hda_nid_t stac92hd71bxx_pwr_nids[3] = { |
335 | 0x0a, 0x0d, 0x0f | 345 | 0x0a, 0x0d, 0x0f |
336 | }; | 346 | }; |
@@ -875,6 +885,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { | |||
875 | static struct hda_verb stac925x_core_init[] = { | 885 | static struct hda_verb stac925x_core_init[] = { |
876 | /* set dac0mux for dac converter */ | 886 | /* set dac0mux for dac converter */ |
877 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, | 887 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, |
888 | /* unmute and set max the selector */ | ||
889 | { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb07f }, | ||
878 | {} | 890 | {} |
879 | }; | 891 | }; |
880 | 892 | ||
@@ -1334,7 +1346,16 @@ static unsigned int ref9200_pin_configs[8] = { | |||
1334 | 0x02a19020, 0x01a19021, 0x90100140, 0x01813122, | 1346 | 0x02a19020, 0x01a19021, 0x90100140, 0x01813122, |
1335 | }; | 1347 | }; |
1336 | 1348 | ||
1337 | /* | 1349 | static unsigned int gateway9200_m4_pin_configs[8] = { |
1350 | 0x400000fe, 0x404500f4, 0x400100f0, 0x90110010, | ||
1351 | 0x400100f1, 0x02a1902e, 0x500000f2, 0x500000f3, | ||
1352 | }; | ||
1353 | static unsigned int gateway9200_m4_2_pin_configs[8] = { | ||
1354 | 0x400000fe, 0x404500f4, 0x400100f0, 0x90110010, | ||
1355 | 0x400100f1, 0x02a1902e, 0x500000f2, 0x500000f3, | ||
1356 | }; | ||
1357 | |||
1358 | /* | ||
1338 | STAC 9200 pin configs for | 1359 | STAC 9200 pin configs for |
1339 | 102801A8 | 1360 | 102801A8 |
1340 | 102801DE | 1361 | 102801DE |
@@ -1464,6 +1485,8 @@ static unsigned int *stac9200_brd_tbl[STAC_9200_MODELS] = { | |||
1464 | [STAC_9200_DELL_M25] = dell9200_m25_pin_configs, | 1485 | [STAC_9200_DELL_M25] = dell9200_m25_pin_configs, |
1465 | [STAC_9200_DELL_M26] = dell9200_m26_pin_configs, | 1486 | [STAC_9200_DELL_M26] = dell9200_m26_pin_configs, |
1466 | [STAC_9200_DELL_M27] = dell9200_m27_pin_configs, | 1487 | [STAC_9200_DELL_M27] = dell9200_m27_pin_configs, |
1488 | [STAC_9200_M4] = gateway9200_m4_pin_configs, | ||
1489 | [STAC_9200_M4_2] = gateway9200_m4_2_pin_configs, | ||
1467 | [STAC_9200_PANASONIC] = ref9200_pin_configs, | 1490 | [STAC_9200_PANASONIC] = ref9200_pin_configs, |
1468 | }; | 1491 | }; |
1469 | 1492 | ||
@@ -1480,7 +1503,8 @@ static const char *stac9200_models[STAC_9200_MODELS] = { | |||
1480 | [STAC_9200_DELL_M25] = "dell-m25", | 1503 | [STAC_9200_DELL_M25] = "dell-m25", |
1481 | [STAC_9200_DELL_M26] = "dell-m26", | 1504 | [STAC_9200_DELL_M26] = "dell-m26", |
1482 | [STAC_9200_DELL_M27] = "dell-m27", | 1505 | [STAC_9200_DELL_M27] = "dell-m27", |
1483 | [STAC_9200_GATEWAY] = "gateway", | 1506 | [STAC_9200_M4] = "gateway-m4", |
1507 | [STAC_9200_M4_2] = "gateway-m4-2", | ||
1484 | [STAC_9200_PANASONIC] = "panasonic", | 1508 | [STAC_9200_PANASONIC] = "panasonic", |
1485 | }; | 1509 | }; |
1486 | 1510 | ||
@@ -1550,11 +1574,9 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { | |||
1550 | /* Panasonic */ | 1574 | /* Panasonic */ |
1551 | SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC), | 1575 | SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC), |
1552 | /* Gateway machines needs EAPD to be set on resume */ | 1576 | /* Gateway machines needs EAPD to be set on resume */ |
1553 | SND_PCI_QUIRK(0x107b, 0x0205, "Gateway S-7110M", STAC_9200_GATEWAY), | 1577 | SND_PCI_QUIRK(0x107b, 0x0205, "Gateway S-7110M", STAC_9200_M4), |
1554 | SND_PCI_QUIRK(0x107b, 0x0317, "Gateway MT3423, MX341*", | 1578 | SND_PCI_QUIRK(0x107b, 0x0317, "Gateway MT3423, MX341*", STAC_9200_M4_2), |
1555 | STAC_9200_GATEWAY), | 1579 | SND_PCI_QUIRK(0x107b, 0x0318, "Gateway ML3019, MT3707", STAC_9200_M4_2), |
1556 | SND_PCI_QUIRK(0x107b, 0x0318, "Gateway ML3019, MT3707", | ||
1557 | STAC_9200_GATEWAY), | ||
1558 | /* OQO Mobile */ | 1580 | /* OQO Mobile */ |
1559 | SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO), | 1581 | SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO), |
1560 | {} /* terminator */ | 1582 | {} /* terminator */ |
@@ -1565,44 +1587,85 @@ static unsigned int ref925x_pin_configs[8] = { | |||
1565 | 0x90a70320, 0x02214210, 0x01019020, 0x9033032e, | 1587 | 0x90a70320, 0x02214210, 0x01019020, 0x9033032e, |
1566 | }; | 1588 | }; |
1567 | 1589 | ||
1568 | static unsigned int stac925x_MA6_pin_configs[8] = { | 1590 | static unsigned int stac925xM1_pin_configs[8] = { |
1569 | 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, | 1591 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, |
1570 | 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, | 1592 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, |
1571 | }; | 1593 | }; |
1572 | 1594 | ||
1573 | static unsigned int stac925x_PA6_pin_configs[8] = { | 1595 | static unsigned int stac925xM1_2_pin_configs[8] = { |
1574 | 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, | 1596 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, |
1575 | 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e, | 1597 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, |
1598 | }; | ||
1599 | |||
1600 | static unsigned int stac925xM2_pin_configs[8] = { | ||
1601 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1602 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | ||
1576 | }; | 1603 | }; |
1577 | 1604 | ||
1578 | static unsigned int stac925xM2_2_pin_configs[8] = { | 1605 | static unsigned int stac925xM2_2_pin_configs[8] = { |
1579 | 0x40c003f3, 0x424503f2, 0x04180011, 0x02a19020, | 1606 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, |
1580 | 0x50a103f0, 0x90100212, 0x400003f1, 0x9033032e, | 1607 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, |
1608 | }; | ||
1609 | |||
1610 | static unsigned int stac925xM3_pin_configs[8] = { | ||
1611 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1612 | 0x40a000f0, 0x90100210, 0x400003f1, 0x503303f3, | ||
1613 | }; | ||
1614 | |||
1615 | static unsigned int stac925xM5_pin_configs[8] = { | ||
1616 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1617 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | ||
1618 | }; | ||
1619 | |||
1620 | static unsigned int stac925xM6_pin_configs[8] = { | ||
1621 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1622 | 0x40a000f0, 0x90100210, 0x400003f1, 0x90330320, | ||
1581 | }; | 1623 | }; |
1582 | 1624 | ||
1583 | static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { | 1625 | static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { |
1584 | [STAC_REF] = ref925x_pin_configs, | 1626 | [STAC_REF] = ref925x_pin_configs, |
1627 | [STAC_M1] = stac925xM1_pin_configs, | ||
1628 | [STAC_M1_2] = stac925xM1_2_pin_configs, | ||
1629 | [STAC_M2] = stac925xM2_pin_configs, | ||
1585 | [STAC_M2_2] = stac925xM2_2_pin_configs, | 1630 | [STAC_M2_2] = stac925xM2_2_pin_configs, |
1586 | [STAC_MA6] = stac925x_MA6_pin_configs, | 1631 | [STAC_M3] = stac925xM3_pin_configs, |
1587 | [STAC_PA6] = stac925x_PA6_pin_configs, | 1632 | [STAC_M5] = stac925xM5_pin_configs, |
1633 | [STAC_M6] = stac925xM6_pin_configs, | ||
1588 | }; | 1634 | }; |
1589 | 1635 | ||
1590 | static const char *stac925x_models[STAC_925x_MODELS] = { | 1636 | static const char *stac925x_models[STAC_925x_MODELS] = { |
1591 | [STAC_REF] = "ref", | 1637 | [STAC_REF] = "ref", |
1638 | [STAC_M1] = "m1", | ||
1639 | [STAC_M1_2] = "m1-2", | ||
1640 | [STAC_M2] = "m2", | ||
1592 | [STAC_M2_2] = "m2-2", | 1641 | [STAC_M2_2] = "m2-2", |
1593 | [STAC_MA6] = "m6", | 1642 | [STAC_M3] = "m3", |
1594 | [STAC_PA6] = "pa6", | 1643 | [STAC_M5] = "m5", |
1644 | [STAC_M6] = "m6", | ||
1645 | }; | ||
1646 | |||
1647 | static struct snd_pci_quirk stac925x_codec_id_cfg_tbl[] = { | ||
1648 | SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_M2), | ||
1649 | SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_M5), | ||
1650 | SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_M1), | ||
1651 | SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_M2), | ||
1652 | SND_PCI_QUIRK(0x107b, 0x0367, "Gateway MX6453", STAC_M1_2), | ||
1653 | /* Not sure about the brand name for those */ | ||
1654 | SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M1), | ||
1655 | SND_PCI_QUIRK(0x107b, 0x0507, "Gateway mobile", STAC_M3), | ||
1656 | SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M6), | ||
1657 | SND_PCI_QUIRK(0x107b, 0x0685, "Gateway mobile", STAC_M2_2), | ||
1658 | {} /* terminator */ | ||
1595 | }; | 1659 | }; |
1596 | 1660 | ||
1597 | static struct snd_pci_quirk stac925x_cfg_tbl[] = { | 1661 | static struct snd_pci_quirk stac925x_cfg_tbl[] = { |
1598 | /* SigmaTel reference board */ | 1662 | /* SigmaTel reference board */ |
1599 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), | 1663 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), |
1600 | SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), | 1664 | SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), |
1601 | SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), | 1665 | |
1602 | SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), | 1666 | /* Default table for unknown ID */ |
1603 | SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), | 1667 | SND_PCI_QUIRK(0x1002, 0x437b, "Gateway mobile", STAC_M2_2), |
1604 | SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6), | 1668 | |
1605 | SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), | ||
1606 | {} /* terminator */ | 1669 | {} /* terminator */ |
1607 | }; | 1670 | }; |
1608 | 1671 | ||
@@ -1682,7 +1745,7 @@ static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { | |||
1682 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | 1745 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { |
1683 | /* SigmaTel reference board */ | 1746 | /* SigmaTel reference board */ |
1684 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, | 1747 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, |
1685 | "DFI LanParty", STAC_92HD71BXX_REF), | 1748 | "DFI LanParty", STAC_92HD83XXX_REF), |
1686 | {} /* terminator */ | 1749 | {} /* terminator */ |
1687 | }; | 1750 | }; |
1688 | 1751 | ||
@@ -1716,6 +1779,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { | |||
1716 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, | 1779 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, |
1717 | [STAC_DELL_M4_3] = dell_m4_3_pin_configs, | 1780 | [STAC_DELL_M4_3] = dell_m4_3_pin_configs, |
1718 | [STAC_HP_M4] = NULL, | 1781 | [STAC_HP_M4] = NULL, |
1782 | [STAC_HP_DV5] = NULL, | ||
1719 | }; | 1783 | }; |
1720 | 1784 | ||
1721 | static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { | 1785 | static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { |
@@ -1724,6 +1788,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { | |||
1724 | [STAC_DELL_M4_2] = "dell-m4-2", | 1788 | [STAC_DELL_M4_2] = "dell-m4-2", |
1725 | [STAC_DELL_M4_3] = "dell-m4-3", | 1789 | [STAC_DELL_M4_3] = "dell-m4-3", |
1726 | [STAC_HP_M4] = "hp-m4", | 1790 | [STAC_HP_M4] = "hp-m4", |
1791 | [STAC_HP_DV5] = "hp-dv5", | ||
1727 | }; | 1792 | }; |
1728 | 1793 | ||
1729 | static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | 1794 | static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { |
@@ -1736,6 +1801,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1736 | "HP dv7", STAC_HP_M4), | 1801 | "HP dv7", STAC_HP_M4), |
1737 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, | 1802 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, |
1738 | "HP dv7", STAC_HP_M4), | 1803 | "HP dv7", STAC_HP_M4), |
1804 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, | ||
1805 | "HP dv5", STAC_HP_DV5), | ||
1739 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, | 1806 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, |
1740 | "unknown HP", STAC_HP_M4), | 1807 | "unknown HP", STAC_HP_M4), |
1741 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, | 1808 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, |
@@ -4163,8 +4230,19 @@ static void stac92xx_hp_detect(struct hda_codec *codec) | |||
4163 | continue; | 4230 | continue; |
4164 | if (presence) | 4231 | if (presence) |
4165 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); | 4232 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); |
4233 | #if 0 /* FIXME */ | ||
4234 | /* Resetting the pinctl like below may lead to (a sort of) regressions | ||
4235 | * on some devices since they use the HP pin actually for line/speaker | ||
4236 | * outs although the default pin config shows a different pin (that is | ||
4237 | * wrong and useless). | ||
4238 | * | ||
4239 | * So, it's basically a problem of default pin configs, likely a BIOS issue. | ||
4240 | * But, disabling the code below just works around it, and I'm too tired of | ||
4241 | * bug reports with such devices... | ||
4242 | */ | ||
4166 | else | 4243 | else |
4167 | stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val); | 4244 | stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val); |
4245 | #endif /* FIXME */ | ||
4168 | } | 4246 | } |
4169 | } | 4247 | } |
4170 | 4248 | ||
@@ -4390,7 +4468,8 @@ static int patch_stac9200(struct hda_codec *codec) | |||
4390 | spec->num_adcs = 1; | 4468 | spec->num_adcs = 1; |
4391 | spec->num_pwrs = 0; | 4469 | spec->num_pwrs = 0; |
4392 | 4470 | ||
4393 | if (spec->board_config == STAC_9200_GATEWAY || | 4471 | if (spec->board_config == STAC_9200_M4 || |
4472 | spec->board_config == STAC_9200_M4_2 || | ||
4394 | spec->board_config == STAC_9200_OQO) | 4473 | spec->board_config == STAC_9200_OQO) |
4395 | spec->init = stac9200_eapd_init; | 4474 | spec->init = stac9200_eapd_init; |
4396 | else | 4475 | else |
@@ -4408,6 +4487,12 @@ static int patch_stac9200(struct hda_codec *codec) | |||
4408 | return err; | 4487 | return err; |
4409 | } | 4488 | } |
4410 | 4489 | ||
4490 | /* CF-74 has no headphone detection, and the driver should *NOT* | ||
4491 | * do detection and HP/speaker toggle because the hardware does it. | ||
4492 | */ | ||
4493 | if (spec->board_config == STAC_9200_PANASONIC) | ||
4494 | spec->hp_detect = 0; | ||
4495 | |||
4411 | codec->patch_ops = stac92xx_patch_ops; | 4496 | codec->patch_ops = stac92xx_patch_ops; |
4412 | 4497 | ||
4413 | return 0; | 4498 | return 0; |
@@ -4425,12 +4510,22 @@ static int patch_stac925x(struct hda_codec *codec) | |||
4425 | codec->spec = spec; | 4510 | codec->spec = spec; |
4426 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); | 4511 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); |
4427 | spec->pin_nids = stac925x_pin_nids; | 4512 | spec->pin_nids = stac925x_pin_nids; |
4428 | spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, | 4513 | |
4514 | /* Check first for codec ID */ | ||
4515 | spec->board_config = snd_hda_check_board_codec_sid_config(codec, | ||
4516 | STAC_925x_MODELS, | ||
4517 | stac925x_models, | ||
4518 | stac925x_codec_id_cfg_tbl); | ||
4519 | |||
4520 | /* Now checks for PCI ID, if codec ID is not found */ | ||
4521 | if (spec->board_config < 0) | ||
4522 | spec->board_config = snd_hda_check_board_config(codec, | ||
4523 | STAC_925x_MODELS, | ||
4429 | stac925x_models, | 4524 | stac925x_models, |
4430 | stac925x_cfg_tbl); | 4525 | stac925x_cfg_tbl); |
4431 | again: | 4526 | again: |
4432 | if (spec->board_config < 0) { | 4527 | if (spec->board_config < 0) { |
4433 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," | 4528 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," |
4434 | "using BIOS defaults\n"); | 4529 | "using BIOS defaults\n"); |
4435 | err = stac92xx_save_bios_config_regs(codec); | 4530 | err = stac92xx_save_bios_config_regs(codec); |
4436 | } else | 4531 | } else |
@@ -4672,6 +4767,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
4672 | spec->dmux_nids = stac92hd83xxx_dmux_nids; | 4767 | spec->dmux_nids = stac92hd83xxx_dmux_nids; |
4673 | spec->adc_nids = stac92hd83xxx_adc_nids; | 4768 | spec->adc_nids = stac92hd83xxx_adc_nids; |
4674 | spec->pwr_nids = stac92hd83xxx_pwr_nids; | 4769 | spec->pwr_nids = stac92hd83xxx_pwr_nids; |
4770 | spec->amp_nids = stac92hd83xxx_amp_nids; | ||
4675 | spec->pwr_mapping = stac92hd83xxx_pwr_mapping; | 4771 | spec->pwr_mapping = stac92hd83xxx_pwr_mapping; |
4676 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); | 4772 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); |
4677 | spec->multiout.dac_nids = spec->dac_nids; | 4773 | spec->multiout.dac_nids = spec->dac_nids; |
@@ -4689,6 +4785,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
4689 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); | 4785 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); |
4690 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); | 4786 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); |
4691 | spec->num_adcs = ARRAY_SIZE(stac92hd83xxx_adc_nids); | 4787 | spec->num_adcs = ARRAY_SIZE(stac92hd83xxx_adc_nids); |
4788 | spec->num_amps = ARRAY_SIZE(stac92hd83xxx_amp_nids); | ||
4692 | spec->num_dmics = STAC92HD83XXX_NUM_DMICS; | 4789 | spec->num_dmics = STAC92HD83XXX_NUM_DMICS; |
4693 | spec->dinput_mux = &stac92hd83xxx_dmux; | 4790 | spec->dinput_mux = &stac92hd83xxx_dmux; |
4694 | spec->pin_nids = stac92hd83xxx_pin_nids; | 4791 | spec->pin_nids = stac92hd83xxx_pin_nids; |