diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 56 |
3 files changed, 51 insertions, 22 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 75de40aaab0a..0177ef8f4c9e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -347,6 +347,7 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
347 | &spec->cur_mux[adc_idx]); | 347 | &spec->cur_mux[adc_idx]); |
348 | } | 348 | } |
349 | 349 | ||
350 | #ifdef CONFIG_SND_JACK | ||
350 | static int conexant_add_jack(struct hda_codec *codec, | 351 | static int conexant_add_jack(struct hda_codec *codec, |
351 | hda_nid_t nid, int type) | 352 | hda_nid_t nid, int type) |
352 | { | 353 | { |
@@ -394,7 +395,6 @@ static void conexant_report_jack(struct hda_codec *codec, hda_nid_t nid) | |||
394 | 395 | ||
395 | static int conexant_init_jacks(struct hda_codec *codec) | 396 | static int conexant_init_jacks(struct hda_codec *codec) |
396 | { | 397 | { |
397 | #ifdef CONFIG_SND_JACK | ||
398 | struct conexant_spec *spec = codec->spec; | 398 | struct conexant_spec *spec = codec->spec; |
399 | int i; | 399 | int i; |
400 | 400 | ||
@@ -422,10 +422,19 @@ static int conexant_init_jacks(struct hda_codec *codec) | |||
422 | ++hv; | 422 | ++hv; |
423 | } | 423 | } |
424 | } | 424 | } |
425 | #endif | ||
426 | return 0; | 425 | return 0; |
427 | 426 | ||
428 | } | 427 | } |
428 | #else | ||
429 | static inline void conexant_report_jack(struct hda_codec *codec, hda_nid_t nid) | ||
430 | { | ||
431 | } | ||
432 | |||
433 | static inline int conexant_init_jacks(struct hda_codec *codec) | ||
434 | { | ||
435 | return 0; | ||
436 | } | ||
437 | #endif | ||
429 | 438 | ||
430 | static int conexant_init(struct hda_codec *codec) | 439 | static int conexant_init(struct hda_codec *codec) |
431 | { | 440 | { |
@@ -1566,6 +1575,7 @@ static struct snd_pci_quirk cxt5047_cfg_tbl[] = { | |||
1566 | SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), | 1575 | SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), |
1567 | SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), | 1576 | SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), |
1568 | SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP), | 1577 | SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP), |
1578 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6700", CXT5047_LAPTOP), | ||
1569 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), | 1579 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), |
1570 | {} | 1580 | {} |
1571 | }; | 1581 | }; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 82dd08431970..7884a4e07061 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -7018,6 +7018,7 @@ static int patch_alc882(struct hda_codec *codec) | |||
7018 | case 0x106b00a4: /* MacbookPro4,1 */ | 7018 | case 0x106b00a4: /* MacbookPro4,1 */ |
7019 | case 0x106b2c00: /* Macbook Pro rev3 */ | 7019 | case 0x106b2c00: /* Macbook Pro rev3 */ |
7020 | case 0x106b3600: /* Macbook 3.1 */ | 7020 | case 0x106b3600: /* Macbook 3.1 */ |
7021 | case 0x106b3800: /* MacbookPro4,1 - latter revision */ | ||
7021 | board_config = ALC885_MBP3; | 7022 | board_config = ALC885_MBP3; |
7022 | break; | 7023 | break; |
7023 | default: | 7024 | default: |
@@ -8478,6 +8479,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8478 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 8479 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
8479 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 8480 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
8480 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 8481 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
8482 | SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC), | ||
8481 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), | 8483 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), |
8482 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 8484 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
8483 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), | 8485 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), |
@@ -8526,6 +8528,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8526 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), | 8528 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), |
8527 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), | 8529 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), |
8528 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), | 8530 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), |
8531 | SND_PCI_QUIRK(0x8086, 0x2503, "82801H", ALC883_MITAC), | ||
8529 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), | 8532 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), |
8530 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), | 8533 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), |
8531 | {} | 8534 | {} |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c39deebb588f..b787b3cc096f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -81,6 +81,7 @@ enum { | |||
81 | 81 | ||
82 | enum { | 82 | enum { |
83 | STAC_92HD83XXX_REF, | 83 | STAC_92HD83XXX_REF, |
84 | STAC_92HD83XXX_PWR_REF, | ||
84 | STAC_92HD83XXX_MODELS | 85 | STAC_92HD83XXX_MODELS |
85 | }; | 86 | }; |
86 | 87 | ||
@@ -334,7 +335,7 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { | |||
334 | }; | 335 | }; |
335 | 336 | ||
336 | static unsigned int stac92hd83xxx_pwr_mapping[4] = { | 337 | static unsigned int stac92hd83xxx_pwr_mapping[4] = { |
337 | 0x03, 0x0c, 0x10, 0x40, | 338 | 0x03, 0x0c, 0x20, 0x40, |
338 | }; | 339 | }; |
339 | 340 | ||
340 | static hda_nid_t stac92hd83xxx_amp_nids[1] = { | 341 | static hda_nid_t stac92hd83xxx_amp_nids[1] = { |
@@ -841,10 +842,6 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = { | |||
841 | }; | 842 | }; |
842 | 843 | ||
843 | static struct hda_verb stac92hd83xxx_core_init[] = { | 844 | static struct hda_verb stac92hd83xxx_core_init[] = { |
844 | /* start of config #1 */ | ||
845 | { 0xe, AC_VERB_SET_CONNECT_SEL, 0x3}, | ||
846 | |||
847 | /* start of config #2 */ | ||
848 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, | 845 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, |
849 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, | 846 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, |
850 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, | 847 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, |
@@ -885,8 +882,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { | |||
885 | static struct hda_verb stac925x_core_init[] = { | 882 | static struct hda_verb stac925x_core_init[] = { |
886 | /* set dac0mux for dac converter */ | 883 | /* set dac0mux for dac converter */ |
887 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, | 884 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, |
888 | /* unmute and set max the selector */ | 885 | /* mute the master volume */ |
889 | { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb01f }, | 886 | { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, |
890 | {} | 887 | {} |
891 | }; | 888 | }; |
892 | 889 | ||
@@ -1138,6 +1135,8 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { | |||
1138 | }; | 1135 | }; |
1139 | 1136 | ||
1140 | static struct snd_kcontrol_new stac925x_mixer[] = { | 1137 | static struct snd_kcontrol_new stac925x_mixer[] = { |
1138 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0e, 0, HDA_OUTPUT), | ||
1139 | HDA_CODEC_MUTE("Master Playback Switch", 0x0e, 0, HDA_OUTPUT), | ||
1141 | STAC_INPUT_SOURCE(1), | 1140 | STAC_INPUT_SOURCE(1), |
1142 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), | 1141 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), |
1143 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), | 1142 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), |
@@ -1736,10 +1735,12 @@ static unsigned int ref92hd83xxx_pin_configs[14] = { | |||
1736 | 1735 | ||
1737 | static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { | 1736 | static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { |
1738 | [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, | 1737 | [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, |
1738 | [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, | ||
1739 | }; | 1739 | }; |
1740 | 1740 | ||
1741 | static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { | 1741 | static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { |
1742 | [STAC_92HD83XXX_REF] = "ref", | 1742 | [STAC_92HD83XXX_REF] = "ref", |
1743 | [STAC_92HD83XXX_PWR_REF] = "mic-ref", | ||
1743 | }; | 1744 | }; |
1744 | 1745 | ||
1745 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | 1746 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { |
@@ -1799,6 +1800,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1799 | "HP dv5", STAC_HP_M4), | 1800 | "HP dv5", STAC_HP_M4), |
1800 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, | 1801 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, |
1801 | "HP dv7", STAC_HP_M4), | 1802 | "HP dv7", STAC_HP_M4), |
1803 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7, | ||
1804 | "HP dv4", STAC_HP_DV5), | ||
1802 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, | 1805 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, |
1803 | "HP dv7", STAC_HP_M4), | 1806 | "HP dv7", STAC_HP_M4), |
1804 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, | 1807 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, |
@@ -2536,6 +2539,8 @@ static int stac92xx_build_pcms(struct hda_codec *codec) | |||
2536 | 2539 | ||
2537 | info->name = "STAC92xx Analog"; | 2540 | info->name = "STAC92xx Analog"; |
2538 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; | 2541 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; |
2542 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = | ||
2543 | spec->multiout.dac_nids[0]; | ||
2539 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; | 2544 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; |
2540 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; | 2545 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; |
2541 | info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; | 2546 | info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; |
@@ -3573,13 +3578,12 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
3573 | err = stac92xx_auto_fill_dac_nids(codec); | 3578 | err = stac92xx_auto_fill_dac_nids(codec); |
3574 | if (err < 0) | 3579 | if (err < 0) |
3575 | return err; | 3580 | return err; |
3581 | err = stac92xx_auto_create_multi_out_ctls(codec, | ||
3582 | &spec->autocfg); | ||
3583 | if (err < 0) | ||
3584 | return err; | ||
3576 | } | 3585 | } |
3577 | 3586 | ||
3578 | err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg); | ||
3579 | |||
3580 | if (err < 0) | ||
3581 | return err; | ||
3582 | |||
3583 | /* setup analog beep controls */ | 3587 | /* setup analog beep controls */ |
3584 | if (spec->anabeep_nid > 0) { | 3588 | if (spec->anabeep_nid > 0) { |
3585 | err = stac92xx_auto_create_beep_ctls(codec, | 3589 | err = stac92xx_auto_create_beep_ctls(codec, |
@@ -4753,7 +4757,9 @@ static struct hda_input_mux stac92hd83xxx_dmux = { | |||
4753 | static int patch_stac92hd83xxx(struct hda_codec *codec) | 4757 | static int patch_stac92hd83xxx(struct hda_codec *codec) |
4754 | { | 4758 | { |
4755 | struct sigmatel_spec *spec; | 4759 | struct sigmatel_spec *spec; |
4760 | hda_nid_t conn[STAC92HD83_DAC_COUNT + 1]; | ||
4756 | int err; | 4761 | int err; |
4762 | int num_dacs; | ||
4757 | 4763 | ||
4758 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 4764 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
4759 | if (spec == NULL) | 4765 | if (spec == NULL) |
@@ -4772,15 +4778,16 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
4772 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); | 4778 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); |
4773 | spec->multiout.dac_nids = spec->dac_nids; | 4779 | spec->multiout.dac_nids = spec->dac_nids; |
4774 | 4780 | ||
4775 | spec->init = stac92hd83xxx_core_init; | ||
4776 | switch (codec->vendor_id) { | ||
4777 | case 0x111d7605: | ||
4778 | break; | ||
4779 | default: | ||
4780 | spec->num_pwrs--; | ||
4781 | spec->init++; /* switch to config #2 */ | ||
4782 | } | ||
4783 | 4781 | ||
4782 | /* set port 0xe to select the last DAC | ||
4783 | */ | ||
4784 | num_dacs = snd_hda_get_connections(codec, 0x0e, | ||
4785 | conn, STAC92HD83_DAC_COUNT + 1) - 1; | ||
4786 | |||
4787 | snd_hda_codec_write_cache(codec, 0xe, 0, | ||
4788 | AC_VERB_SET_CONNECT_SEL, num_dacs); | ||
4789 | |||
4790 | spec->init = stac92hd83xxx_core_init; | ||
4784 | spec->mixer = stac92hd83xxx_mixer; | 4791 | spec->mixer = stac92hd83xxx_mixer; |
4785 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); | 4792 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); |
4786 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); | 4793 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); |
@@ -4806,6 +4813,15 @@ again: | |||
4806 | return err; | 4813 | return err; |
4807 | } | 4814 | } |
4808 | 4815 | ||
4816 | switch (codec->vendor_id) { | ||
4817 | case 0x111d7604: | ||
4818 | case 0x111d7605: | ||
4819 | if (spec->board_config == STAC_92HD83XXX_PWR_REF) | ||
4820 | break; | ||
4821 | spec->num_pwrs = 0; | ||
4822 | break; | ||
4823 | } | ||
4824 | |||
4809 | err = stac92xx_parse_auto_config(codec, 0x1d, 0); | 4825 | err = stac92xx_parse_auto_config(codec, 0x1d, 0); |
4810 | if (!err) { | 4826 | if (!err) { |
4811 | if (spec->board_config < 0) { | 4827 | if (spec->board_config < 0) { |