diff options
author | Jiang zhe <zhe.jiang@intel.com> | 2008-06-04 06:11:07 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-06-06 05:53:59 -0400 |
commit | 17bba1b72d190742c99a140154f0abac9c1996c3 (patch) | |
tree | 8748c17db4ed0760dcb710aaf0629a1a6ddd0ef4 /sound/pci/hda | |
parent | 5a85bb02ba473aacd29f4039a74744f729443b31 (diff) |
[ALSA] hda - support intel DG33 motherboards
These two motherboards's pin configuration are not covered by driver.
I wrote a new model to support them.
Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index cb3e0283f0ce..048cb84721fa 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -209,6 +209,7 @@ enum { | |||
209 | ALC883_MITAC, | 209 | ALC883_MITAC, |
210 | ALC883_CLEVO_M720, | 210 | ALC883_CLEVO_M720, |
211 | ALC883_FUJITSU_PI2515, | 211 | ALC883_FUJITSU_PI2515, |
212 | ALC883_3ST_6ch_INTEL, | ||
212 | ALC883_AUTO, | 213 | ALC883_AUTO, |
213 | ALC883_MODEL_LAST, | 214 | ALC883_MODEL_LAST, |
214 | }; | 215 | }; |
@@ -6603,6 +6604,16 @@ static struct hda_input_mux alc883_capture_source = { | |||
6603 | }, | 6604 | }, |
6604 | }; | 6605 | }; |
6605 | 6606 | ||
6607 | static struct hda_input_mux alc883_3stack_6ch_intel = { | ||
6608 | .num_items = 4, | ||
6609 | .items = { | ||
6610 | { "Mic", 0x1 }, | ||
6611 | { "Front Mic", 0x0 }, | ||
6612 | { "Line", 0x2 }, | ||
6613 | { "CD", 0x4 }, | ||
6614 | }, | ||
6615 | }; | ||
6616 | |||
6606 | static struct hda_input_mux alc883_lenovo_101e_capture_source = { | 6617 | static struct hda_input_mux alc883_lenovo_101e_capture_source = { |
6607 | .num_items = 2, | 6618 | .num_items = 2, |
6608 | .items = { | 6619 | .items = { |
@@ -6684,6 +6695,48 @@ static struct hda_channel_mode alc883_3ST_6ch_modes[3] = { | |||
6684 | }; | 6695 | }; |
6685 | 6696 | ||
6686 | /* | 6697 | /* |
6698 | * 2ch mode | ||
6699 | */ | ||
6700 | static struct hda_verb alc883_3ST_ch2_intel_init[] = { | ||
6701 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
6702 | { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
6703 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
6704 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
6705 | { } /* end */ | ||
6706 | }; | ||
6707 | |||
6708 | /* | ||
6709 | * 4ch mode | ||
6710 | */ | ||
6711 | static struct hda_verb alc883_3ST_ch4_intel_init[] = { | ||
6712 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
6713 | { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
6714 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6715 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
6716 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
6717 | { } /* end */ | ||
6718 | }; | ||
6719 | |||
6720 | /* | ||
6721 | * 6ch mode | ||
6722 | */ | ||
6723 | static struct hda_verb alc883_3ST_ch6_intel_init[] = { | ||
6724 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6725 | { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
6726 | { 0x19, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
6727 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6728 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
6729 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
6730 | { } /* end */ | ||
6731 | }; | ||
6732 | |||
6733 | static struct hda_channel_mode alc883_3ST_6ch_intel_modes[3] = { | ||
6734 | { 2, alc883_3ST_ch2_intel_init }, | ||
6735 | { 4, alc883_3ST_ch4_intel_init }, | ||
6736 | { 6, alc883_3ST_ch6_intel_init }, | ||
6737 | }; | ||
6738 | |||
6739 | /* | ||
6687 | * 6ch mode | 6740 | * 6ch mode |
6688 | */ | 6741 | */ |
6689 | static struct hda_verb alc883_sixstack_ch6_init[] = { | 6742 | static struct hda_verb alc883_sixstack_ch6_init[] = { |
@@ -6915,6 +6968,45 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { | |||
6915 | { } /* end */ | 6968 | { } /* end */ |
6916 | }; | 6969 | }; |
6917 | 6970 | ||
6971 | static struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = { | ||
6972 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
6973 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
6974 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
6975 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
6976 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
6977 | HDA_OUTPUT), | ||
6978 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
6979 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
6980 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
6981 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
6982 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
6983 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
6984 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
6985 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
6986 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
6987 | HDA_CODEC_VOLUME("Mic Boost", 0x19, 0, HDA_INPUT), | ||
6988 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
6989 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
6990 | HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT), | ||
6991 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
6992 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
6993 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
6994 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
6995 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
6996 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
6997 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
6998 | { | ||
6999 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
7000 | /* .name = "Capture Source", */ | ||
7001 | .name = "Input Source", | ||
7002 | .count = 2, | ||
7003 | .info = alc883_mux_enum_info, | ||
7004 | .get = alc883_mux_enum_get, | ||
7005 | .put = alc883_mux_enum_put, | ||
7006 | }, | ||
7007 | { } /* end */ | ||
7008 | }; | ||
7009 | |||
6918 | static struct snd_kcontrol_new alc883_fivestack_mixer[] = { | 7010 | static struct snd_kcontrol_new alc883_fivestack_mixer[] = { |
6919 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 7011 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
6920 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 7012 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
@@ -7763,6 +7855,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { | |||
7763 | [ALC883_MITAC] = "mitac", | 7855 | [ALC883_MITAC] = "mitac", |
7764 | [ALC883_CLEVO_M720] = "clevo-m720", | 7856 | [ALC883_CLEVO_M720] = "clevo-m720", |
7765 | [ALC883_FUJITSU_PI2515] = "fujitsu-pi2515", | 7857 | [ALC883_FUJITSU_PI2515] = "fujitsu-pi2515", |
7858 | [ALC883_3ST_6ch_INTEL] = "3stack-6ch-intel", | ||
7766 | [ALC883_AUTO] = "auto", | 7859 | [ALC883_AUTO] = "auto", |
7767 | }; | 7860 | }; |
7768 | 7861 | ||
@@ -7820,6 +7913,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
7820 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), | 7913 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), |
7821 | SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), | 7914 | SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), |
7822 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), | 7915 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), |
7916 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), | ||
7917 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), | ||
7823 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), | 7918 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), |
7824 | {} | 7919 | {} |
7825 | }; | 7920 | }; |
@@ -7858,6 +7953,18 @@ static struct alc_config_preset alc883_presets[] = { | |||
7858 | .need_dac_fix = 1, | 7953 | .need_dac_fix = 1, |
7859 | .input_mux = &alc883_capture_source, | 7954 | .input_mux = &alc883_capture_source, |
7860 | }, | 7955 | }, |
7956 | [ALC883_3ST_6ch_INTEL] = { | ||
7957 | .mixers = { alc883_3ST_6ch_intel_mixer, alc883_chmode_mixer }, | ||
7958 | .init_verbs = { alc883_init_verbs }, | ||
7959 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
7960 | .dac_nids = alc883_dac_nids, | ||
7961 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
7962 | .dig_in_nid = ALC883_DIGIN_NID, | ||
7963 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_intel_modes), | ||
7964 | .channel_mode = alc883_3ST_6ch_intel_modes, | ||
7965 | .need_dac_fix = 1, | ||
7966 | .input_mux = &alc883_3stack_6ch_intel, | ||
7967 | }, | ||
7861 | [ALC883_6ST_DIG] = { | 7968 | [ALC883_6ST_DIG] = { |
7862 | .mixers = { alc883_base_mixer, alc883_chmode_mixer }, | 7969 | .mixers = { alc883_base_mixer, alc883_chmode_mixer }, |
7863 | .init_verbs = { alc883_init_verbs }, | 7970 | .init_verbs = { alc883_init_verbs }, |