aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorDavid Heidelberger <d.okias@gmail.com>2009-06-08 10:15:18 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-08 10:18:31 -0400
commit64a8be74357477558183b43156c5536b642de134 (patch)
treefaa19fa6d0ef1e1a1d17991ff1afdf4e808c719c /sound/pci
parent3e1647c5b54a91a7182e121cfe569e6f0bf167ec (diff)
ALSA: hda - Add 7.1 support for MSI GX620
Added 7.1 support for MSI GX620 and jack quirk. Reference: kernel bug#13430 http://bugzilla.kernel.org/show_bug.cgi?id=13430 Signed-off-by: David Heidelberger <d.okias@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c115
1 files changed, 107 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1ab1b92fdc1c..cfe4808c3a4c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -220,6 +220,7 @@ enum {
220 ALC883_6ST_DIG, 220 ALC883_6ST_DIG,
221 ALC883_TARGA_DIG, 221 ALC883_TARGA_DIG,
222 ALC883_TARGA_2ch_DIG, 222 ALC883_TARGA_2ch_DIG,
223 ALC883_TARGA_8ch_DIG,
223 ALC883_ACER, 224 ALC883_ACER,
224 ALC883_ACER_ASPIRE, 225 ALC883_ACER_ASPIRE,
225 ALC888_ACER_ASPIRE_4930G, 226 ALC888_ACER_ASPIRE_4930G,
@@ -2722,6 +2723,7 @@ static struct hda_verb alc880_pin_asus_init_verbs[] = {
2722/* Enable GPIO mask and set output */ 2723/* Enable GPIO mask and set output */
2723#define alc880_gpio1_init_verbs alc_gpio1_init_verbs 2724#define alc880_gpio1_init_verbs alc_gpio1_init_verbs
2724#define alc880_gpio2_init_verbs alc_gpio2_init_verbs 2725#define alc880_gpio2_init_verbs alc_gpio2_init_verbs
2726#define alc880_gpio3_init_verbs alc_gpio3_init_verbs
2725 2727
2726/* Clevo m520g init */ 2728/* Clevo m520g init */
2727static struct hda_verb alc880_pin_clevo_init_verbs[] = { 2729static struct hda_verb alc880_pin_clevo_init_verbs[] = {
@@ -7719,6 +7721,73 @@ static struct hda_channel_mode alc883_3ST_6ch_modes[3] = {
7719 { 6, alc883_3ST_ch6_init }, 7721 { 6, alc883_3ST_ch6_init },
7720}; 7722};
7721 7723
7724
7725/*
7726 * 2ch mode
7727 */
7728static struct hda_verb alc883_4ST_ch2_init[] = {
7729 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PhIN_OUT },
7730 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7731 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
7732 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
7733 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
7734 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
7735 { } /* end */
7736};
7737
7738/*
7739 * 4ch mode
7740 */
7741static struct hda_verb alc883_4ST_ch4_init[] = {
7742 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7743 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7744 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
7745 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
7746 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7747 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7748 { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
7749 { } /* end */
7750};
7751
7752/*
7753 * 6ch mode
7754 */
7755static struct hda_verb alc883_4ST_ch6_init[] = {
7756 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7757 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7758 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7759 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7760 { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 },
7761 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7762 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7763 { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
7764 { } /* end */
7765};
7766
7767/*
7768 * 8ch mode
7769 */
7770static struct hda_verb alc883_4ST_ch8_init[] = {
7771 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7772 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7773 { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 },
7774 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7775 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7776 { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 },
7777 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
7778 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
7779 { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
7780 { } /* end */
7781};
7782
7783static struct hda_channel_mode alc883_4ST_8ch_modes[4] = {
7784 { 2, alc883_4ST_ch2_init },
7785 { 4, alc883_4ST_ch4_init },
7786 { 6, alc883_4ST_ch6_init },
7787 { 8, alc883_4ST_ch8_init },
7788};
7789
7790
7722/* 7791/*
7723 * 2ch mode 7792 * 2ch mode
7724 */ 7793 */
@@ -8355,14 +8424,24 @@ static struct hda_verb alc883_tagra_verbs[] = {
8355 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 8424 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8356 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 8425 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8357 8426
8358 {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ 8427/* Connect Line-Out side jack (SPDIF) to Side */
8359 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */ 8428 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8360 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ 8429 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8430 {0x17, AC_VERB_SET_CONNECT_SEL, 0x03},
8431/* Connect Mic jack to CLFE */
8432 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8433 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8434 {0x18, AC_VERB_SET_CONNECT_SEL, 0x02},
8435/* Connect Line-in jack to Surround */
8436 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8437 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8438 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
8439/* Connect HP out jack to Front */
8440 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8441 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8442 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
8361 8443
8362 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, 8444 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
8363 {0x01, AC_VERB_SET_GPIO_MASK, 0x03},
8364 {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03},
8365 {0x01, AC_VERB_SET_GPIO_DATA, 0x03},
8366 8445
8367 { } /* end */ 8446 { } /* end */
8368}; 8447};
@@ -8607,8 +8686,8 @@ static void alc883_lenovo_101e_ispeaker_automute(struct hda_codec *codec)
8607 unsigned int present; 8686 unsigned int present;
8608 unsigned char bits; 8687 unsigned char bits;
8609 8688
8610 present = snd_hda_codec_read(codec, 0x14, 0, 8689 present = snd_hda_codec_read(codec, 0x14, 0, AC_VERB_GET_PIN_SENSE, 0)
8611 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; 8690 & AC_PINSENSE_PRESENCE;
8612 bits = present ? HDA_AMP_MUTE : 0; 8691 bits = present ? HDA_AMP_MUTE : 0;
8613 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, 8692 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
8614 HDA_AMP_MUTE, bits); 8693 HDA_AMP_MUTE, bits);
@@ -8895,6 +8974,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
8895 [ALC883_6ST_DIG] = "6stack-dig", 8974 [ALC883_6ST_DIG] = "6stack-dig",
8896 [ALC883_TARGA_DIG] = "targa-dig", 8975 [ALC883_TARGA_DIG] = "targa-dig",
8897 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", 8976 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig",
8977 [ALC883_TARGA_8ch_DIG] = "targa-8ch-dig",
8898 [ALC883_ACER] = "acer", 8978 [ALC883_ACER] = "acer",
8899 [ALC883_ACER_ASPIRE] = "acer-aspire", 8979 [ALC883_ACER_ASPIRE] = "acer-aspire",
8900 [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g", 8980 [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g",
@@ -8979,6 +9059,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
8979 SND_PCI_QUIRK(0x1462, 0x4314, "MSI", ALC883_TARGA_DIG), 9059 SND_PCI_QUIRK(0x1462, 0x4314, "MSI", ALC883_TARGA_DIG),
8980 SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG), 9060 SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG),
8981 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG), 9061 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG),
9062 SND_PCI_QUIRK(0x1462, 0x6510, "MSI GX620", ALC883_TARGA_8ch_DIG),
8982 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG), 9063 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG),
8983 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG), 9064 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG),
8984 SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG), 9065 SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG),
@@ -9108,6 +9189,24 @@ static struct alc_config_preset alc883_presets[] = {
9108 .unsol_event = alc883_tagra_unsol_event, 9189 .unsol_event = alc883_tagra_unsol_event,
9109 .init_hook = alc883_tagra_init_hook, 9190 .init_hook = alc883_tagra_init_hook,
9110 }, 9191 },
9192 [ALC883_TARGA_8ch_DIG] = {
9193 .mixers = { alc883_base_mixer, alc883_chmode_mixer },
9194 .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs,
9195 alc883_tagra_verbs },
9196 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
9197 .dac_nids = alc883_dac_nids,
9198 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev),
9199 .adc_nids = alc883_adc_nids_rev,
9200 .capsrc_nids = alc883_capsrc_nids_rev,
9201 .dig_out_nid = ALC883_DIGOUT_NID,
9202 .dig_in_nid = ALC883_DIGIN_NID,
9203 .num_channel_mode = ARRAY_SIZE(alc883_4ST_8ch_modes),
9204 .channel_mode = alc883_4ST_8ch_modes,
9205 .need_dac_fix = 1,
9206 .input_mux = &alc883_capture_source,
9207 .unsol_event = alc883_tagra_unsol_event,
9208 .init_hook = alc883_tagra_automute,
9209 },
9111 [ALC883_ACER] = { 9210 [ALC883_ACER] = {
9112 .mixers = { alc883_base_mixer }, 9211 .mixers = { alc883_base_mixer },
9113 /* On TravelMate laptops, GPIO 0 enables the internal speaker 9212 /* On TravelMate laptops, GPIO 0 enables the internal speaker