aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_analog.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r--sound/pci/hda/patch_analog.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 00ace59b05c..f94f1f22889 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -833,12 +833,14 @@ static struct snd_pci_quirk ad1986a_cfg_tbl[] = {
833 SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS P5", AD1986A_3STACK), 833 SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS P5", AD1986A_3STACK),
834 SND_PCI_QUIRK(0x1043, 0x81cb, "ASUS M2N", AD1986A_3STACK), 834 SND_PCI_QUIRK(0x1043, 0x81cb, "ASUS M2N", AD1986A_3STACK),
835 SND_PCI_QUIRK(0x1043, 0x8234, "ASUS M2N", AD1986A_3STACK), 835 SND_PCI_QUIRK(0x1043, 0x8234, "ASUS M2N", AD1986A_3STACK),
836 SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK),
836 SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), 837 SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP),
837 SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_LAPTOP_EAPD), 838 SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_LAPTOP_EAPD),
838 SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD), 839 SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD),
839 SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD), 840 SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD),
840 SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), 841 SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK),
841 SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), 842 SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA),
843 SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP),
842 SND_PCI_QUIRK(0x17aa, 0x1017, "Lenovo A60", AD1986A_3STACK), 844 SND_PCI_QUIRK(0x17aa, 0x1017, "Lenovo A60", AD1986A_3STACK),
843 SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_LAPTOP_EAPD), 845 SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_LAPTOP_EAPD),
844 SND_PCI_QUIRK(0x17c0, 0x2017, "Samsung M50", AD1986A_LAPTOP), 846 SND_PCI_QUIRK(0x17c0, 0x2017, "Samsung M50", AD1986A_LAPTOP),
@@ -1205,7 +1207,7 @@ static struct hda_verb ad1981_init_verbs[] = {
1205/* 1207/*
1206 * Patch for HP nx6320 1208 * Patch for HP nx6320
1207 * 1209 *
1208 * nx6320 uses EAPD in the reserve way - EAPD-on means the internal 1210 * nx6320 uses EAPD in the reverse way - EAPD-on means the internal
1209 * speaker output enabled _and_ mute-LED off. 1211 * speaker output enabled _and_ mute-LED off.
1210 */ 1212 */
1211 1213
@@ -1373,6 +1375,21 @@ static int ad1981_hp_init(struct hda_codec *codec)
1373 return 0; 1375 return 0;
1374} 1376}
1375 1377
1378/* configuration for Toshiba Laptops */
1379static struct hda_verb ad1981_toshiba_init_verbs[] = {
1380 {0x05, AC_VERB_SET_EAPD_BTLENABLE, 0x01 }, /* default on */
1381 /* pin sensing on HP and Mic jacks */
1382 {0x06, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1981_HP_EVENT},
1383 {0x08, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1981_MIC_EVENT},
1384 {}
1385};
1386
1387static struct snd_kcontrol_new ad1981_toshiba_mixers[] = {
1388 HDA_CODEC_VOLUME("Amp Volume", 0x1a, 0x0, HDA_OUTPUT),
1389 HDA_CODEC_MUTE("Amp Switch", 0x1a, 0x0, HDA_OUTPUT),
1390 { }
1391};
1392
1376/* configuration for Lenovo Thinkpad T60 */ 1393/* configuration for Lenovo Thinkpad T60 */
1377static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = { 1394static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = {
1378 HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT), 1395 HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT),
@@ -1418,6 +1435,7 @@ enum {
1418 AD1981_BASIC, 1435 AD1981_BASIC,
1419 AD1981_HP, 1436 AD1981_HP,
1420 AD1981_THINKPAD, 1437 AD1981_THINKPAD,
1438 AD1981_TOSHIBA,
1421 AD1981_MODELS 1439 AD1981_MODELS
1422}; 1440};
1423 1441
@@ -1425,6 +1443,7 @@ static const char *ad1981_models[AD1981_MODELS] = {
1425 [AD1981_HP] = "hp", 1443 [AD1981_HP] = "hp",
1426 [AD1981_THINKPAD] = "thinkpad", 1444 [AD1981_THINKPAD] = "thinkpad",
1427 [AD1981_BASIC] = "basic", 1445 [AD1981_BASIC] = "basic",
1446 [AD1981_TOSHIBA] = "toshiba"
1428}; 1447};
1429 1448
1430static struct snd_pci_quirk ad1981_cfg_tbl[] = { 1449static struct snd_pci_quirk ad1981_cfg_tbl[] = {
@@ -1435,6 +1454,7 @@ static struct snd_pci_quirk ad1981_cfg_tbl[] = {
1435 /* Lenovo Thinkpad T60/X60/Z6xx */ 1454 /* Lenovo Thinkpad T60/X60/Z6xx */
1436 SND_PCI_QUIRK(0x17aa, 0, "Lenovo Thinkpad", AD1981_THINKPAD), 1455 SND_PCI_QUIRK(0x17aa, 0, "Lenovo Thinkpad", AD1981_THINKPAD),
1437 SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD), 1456 SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD),
1457 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba U205", AD1981_TOSHIBA),
1438 {} 1458 {}
1439}; 1459};
1440 1460
@@ -1485,8 +1505,17 @@ static int patch_ad1981(struct hda_codec *codec)
1485 spec->mixers[0] = ad1981_thinkpad_mixers; 1505 spec->mixers[0] = ad1981_thinkpad_mixers;
1486 spec->input_mux = &ad1981_thinkpad_capture_source; 1506 spec->input_mux = &ad1981_thinkpad_capture_source;
1487 break; 1507 break;
1508 case AD1981_TOSHIBA:
1509 spec->mixers[0] = ad1981_hp_mixers;
1510 spec->mixers[1] = ad1981_toshiba_mixers;
1511 spec->num_init_verbs = 2;
1512 spec->init_verbs[1] = ad1981_toshiba_init_verbs;
1513 spec->multiout.dig_out_nid = 0;
1514 spec->input_mux = &ad1981_hp_capture_source;
1515 codec->patch_ops.init = ad1981_hp_init;
1516 codec->patch_ops.unsol_event = ad1981_hp_unsol_event;
1517 break;
1488 } 1518 }
1489
1490 return 0; 1519 return 0;
1491} 1520}
1492 1521
@@ -2607,6 +2636,12 @@ static const char *ad1988_models[AD1988_MODEL_LAST] = {
2607 [AD1988_AUTO] = "auto", 2636 [AD1988_AUTO] = "auto",
2608}; 2637};
2609 2638
2639static struct snd_pci_quirk ad1988_cfg_tbl[] = {
2640 SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG),
2641 SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG),
2642 {}
2643};
2644
2610static int patch_ad1988(struct hda_codec *codec) 2645static int patch_ad1988(struct hda_codec *codec)
2611{ 2646{
2612 struct ad198x_spec *spec; 2647 struct ad198x_spec *spec;
@@ -2623,7 +2658,7 @@ static int patch_ad1988(struct hda_codec *codec)
2623 snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n"); 2658 snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n");
2624 2659
2625 board_config = snd_hda_check_board_config(codec, AD1988_MODEL_LAST, 2660 board_config = snd_hda_check_board_config(codec, AD1988_MODEL_LAST,
2626 ad1988_models, NULL); 2661 ad1988_models, ad1988_cfg_tbl);
2627 if (board_config < 0) { 2662 if (board_config < 0) {
2628 printk(KERN_INFO "hda_codec: Unknown model for AD1988, trying auto-probe from BIOS...\n"); 2663 printk(KERN_INFO "hda_codec: Unknown model for AD1988, trying auto-probe from BIOS...\n");
2629 board_config = AD1988_AUTO; 2664 board_config = AD1988_AUTO;