aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com.tw>2008-05-27 06:05:31 -0400
committerTakashi Iwai <tiwai@suse.de>2008-05-27 09:56:21 -0400
commit6dda9f4a95905f2b38e79e3737da5e25397e6acb (patch)
tree0434dd0ca776f373386e6a4f093914c0e3c216ed
parentabbc9d1b25637b1948a4718fa8f7b257233136bc (diff)
[ALSA] hda - Add ALC663 support
Added the support of ALC663 codec, including specific models for ASUS M51VA, ASUS G71V, ASUS H13 and ASUS G50V. Signed-off-by: Kailang Yang <kailang@realtek.com.tw> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt6
-rw-r--r--sound/pci/hda/patch_realtek.c289
2 files changed, 291 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index e59569462cb9..f48939e97aba 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -845,7 +845,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
845 ALC269 845 ALC269
846 basic Basic preset 846 basic Basic preset
847 847
848 ALC662 848 ALC662/663
849 3stack-dig 3-stack (2-channel) with SPDIF 849 3stack-dig 3-stack (2-channel) with SPDIF
850 3stack-6ch 3-stack (6-channel) 850 3stack-6ch 3-stack (6-channel)
851 3stack-6ch-dig 3-stack (6-channel) with SPDIF 851 3stack-6ch-dig 3-stack (6-channel) with SPDIF
@@ -853,6 +853,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
853 lenovo-101e Lenovo laptop 853 lenovo-101e Lenovo laptop
854 eeepc-p701 ASUS Eeepc P701 854 eeepc-p701 ASUS Eeepc P701
855 eeepc-ep20 ASUS Eeepc EP20 855 eeepc-ep20 ASUS Eeepc EP20
856 m51va ASUS M51VA
857 g71v ASUS G71V
858 h13 ASUS H13
859 g50v ASUS G50V
856 auto auto-config reading BIOS (default) 860 auto auto-config reading BIOS (default)
857 861
858 ALC882/885 862 ALC882/885
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b0a2a262ece2..c659588e26d3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -163,6 +163,10 @@ enum {
163 ALC662_LENOVO_101E, 163 ALC662_LENOVO_101E,
164 ALC662_ASUS_EEEPC_P701, 164 ALC662_ASUS_EEEPC_P701,
165 ALC662_ASUS_EEEPC_EP20, 165 ALC662_ASUS_EEEPC_EP20,
166 ALC663_ASUS_M51VA,
167 ALC663_ASUS_G71V,
168 ALC663_ASUS_H13,
169 ALC663_ASUS_G50V,
166 ALC662_AUTO, 170 ALC662_AUTO,
167 ALC662_MODEL_LAST, 171 ALC662_MODEL_LAST,
168}; 172};
@@ -13251,6 +13255,23 @@ static struct hda_input_mux alc662_eeepc_capture_source = {
13251 }, 13255 },
13252}; 13256};
13253 13257
13258static struct hda_input_mux alc663_capture_source = {
13259 .num_items = 3,
13260 .items = {
13261 { "Mic", 0x0 },
13262 { "Front Mic", 0x1 },
13263 { "Line", 0x2 },
13264 },
13265};
13266
13267static struct hda_input_mux alc663_m51va_capture_source = {
13268 .num_items = 2,
13269 .items = {
13270 { "Ext-Mic", 0x0 },
13271 { "D-Mic", 0x9 },
13272 },
13273};
13274
13254#define alc662_mux_enum_info alc_mux_enum_info 13275#define alc662_mux_enum_info alc_mux_enum_info
13255#define alc662_mux_enum_get alc_mux_enum_get 13276#define alc662_mux_enum_get alc_mux_enum_get
13256#define alc662_mux_enum_put alc882_mux_enum_put 13277#define alc662_mux_enum_put alc882_mux_enum_put
@@ -13431,6 +13452,44 @@ static struct snd_kcontrol_new alc662_eeepc_ep20_mixer[] = {
13431 { } /* end */ 13452 { } /* end */
13432}; 13453};
13433 13454
13455static struct snd_kcontrol_new alc663_m51va_mixer[] = {
13456 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
13457 HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
13458 HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
13459 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
13460 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
13461 HDA_CODEC_MUTE("DMic Playback Switch", 0x23, 0x9, HDA_INPUT),
13462 { } /* end */
13463};
13464
13465static struct snd_kcontrol_new alc663_g71v_mixer[] = {
13466 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
13467 HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
13468 HDA_CODEC_VOLUME("Front Playback Volume", 0x03, 0x0, HDA_OUTPUT),
13469 HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
13470 HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
13471
13472 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
13473 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
13474 HDA_CODEC_VOLUME("i-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
13475 HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
13476 { } /* end */
13477};
13478
13479static struct snd_kcontrol_new alc663_g50v_mixer[] = {
13480 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
13481 HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
13482 HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
13483
13484 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
13485 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
13486 HDA_CODEC_VOLUME("i-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
13487 HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
13488 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
13489 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
13490 { } /* end */
13491};
13492
13434static struct snd_kcontrol_new alc662_chmode_mixer[] = { 13493static struct snd_kcontrol_new alc662_chmode_mixer[] = {
13435 { 13494 {
13436 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 13495 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -13501,6 +13560,11 @@ static struct hda_verb alc662_init_verbs[] = {
13501 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, 13560 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
13502 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, 13561 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
13503 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, 13562 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
13563
13564 /* always trun on EAPD */
13565 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
13566 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
13567
13504 { } 13568 { }
13505}; 13569};
13506 13570
@@ -13571,6 +13635,43 @@ static struct hda_verb alc662_auto_init_verbs[] = {
13571 { } 13635 { }
13572}; 13636};
13573 13637
13638static struct hda_verb alc663_m51va_init_verbs[] = {
13639 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
13640 {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
13641 {0x21, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Headphone */
13642
13643 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
13644
13645 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
13646 {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
13647 {}
13648};
13649
13650static struct hda_verb alc663_g71v_init_verbs[] = {
13651 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
13652 /* {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, */
13653 /* {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, */ /* Headphone */
13654
13655 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
13656 {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
13657 {0x21, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Headphone */
13658
13659 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC880_FRONT_EVENT},
13660 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC880_MIC_EVENT},
13661 {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC880_HP_EVENT},
13662 {}
13663};
13664
13665static struct hda_verb alc663_g50v_init_verbs[] = {
13666 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
13667 {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
13668 {0x21, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Headphone */
13669
13670 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
13671 {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
13672 {}
13673};
13674
13574/* capture mixer elements */ 13675/* capture mixer elements */
13575static struct snd_kcontrol_new alc662_capture_mixer[] = { 13676static struct snd_kcontrol_new alc662_capture_mixer[] = {
13576 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), 13677 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
@@ -13692,6 +13793,125 @@ static void alc662_eeepc_ep20_inithook(struct hda_codec *codec)
13692 alc662_eeepc_ep20_automute(codec); 13793 alc662_eeepc_ep20_automute(codec);
13693} 13794}
13694 13795
13796static void alc663_m51va_speaker_automute(struct hda_codec *codec)
13797{
13798 unsigned int present;
13799 unsigned char bits;
13800
13801 present = snd_hda_codec_read(codec, 0x21, 0,
13802 AC_VERB_GET_PIN_SENSE, 0)
13803 & AC_PINSENSE_PRESENCE;
13804 bits = present ? HDA_AMP_MUTE : 0;
13805 snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
13806 HDA_AMP_MUTE, bits);
13807}
13808
13809static void alc663_m51va_mic_automute(struct hda_codec *codec)
13810{
13811 unsigned int present;
13812
13813 present = snd_hda_codec_read(codec, 0x18, 0,
13814 AC_VERB_GET_PIN_SENSE, 0)
13815 & AC_PINSENSE_PRESENCE;
13816 snd_hda_codec_write_cache(codec, 0x22, 0, AC_VERB_SET_AMP_GAIN_MUTE,
13817 0x7000 | (0x00 << 8) | (present ? 0 : 0x80));
13818 snd_hda_codec_write_cache(codec, 0x23, 0, AC_VERB_SET_AMP_GAIN_MUTE,
13819 0x7000 | (0x00 << 8) | (present ? 0 : 0x80));
13820 snd_hda_codec_write_cache(codec, 0x22, 0, AC_VERB_SET_AMP_GAIN_MUTE,
13821 0x7000 | (0x09 << 8) | (present ? 0x80 : 0));
13822 snd_hda_codec_write_cache(codec, 0x23, 0, AC_VERB_SET_AMP_GAIN_MUTE,
13823 0x7000 | (0x09 << 8) | (present ? 0x80 : 0));
13824}
13825
13826static void alc663_m51va_unsol_event(struct hda_codec *codec,
13827 unsigned int res)
13828{
13829 switch (res >> 26) {
13830 case ALC880_HP_EVENT:
13831 alc663_m51va_speaker_automute(codec);
13832 break;
13833 case ALC880_MIC_EVENT:
13834 alc663_m51va_mic_automute(codec);
13835 break;
13836 }
13837}
13838
13839static void alc663_m51va_inithook(struct hda_codec *codec)
13840{
13841 alc663_m51va_speaker_automute(codec);
13842 alc663_m51va_mic_automute(codec);
13843}
13844
13845static void alc663_g71v_hp_automute(struct hda_codec *codec)
13846{
13847 unsigned int present;
13848 unsigned char bits;
13849
13850 present = snd_hda_codec_read(codec, 0x21, 0,
13851 AC_VERB_GET_PIN_SENSE, 0)
13852 & AC_PINSENSE_PRESENCE;
13853 bits = present ? HDA_AMP_MUTE : 0;
13854 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
13855 HDA_AMP_MUTE, bits);
13856 snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
13857 HDA_AMP_MUTE, bits);
13858}
13859
13860static void alc663_g71v_front_automute(struct hda_codec *codec)
13861{
13862 unsigned int present;
13863 unsigned char bits;
13864
13865 present = snd_hda_codec_read(codec, 0x15, 0,
13866 AC_VERB_GET_PIN_SENSE, 0)
13867 & AC_PINSENSE_PRESENCE;
13868 bits = present ? HDA_AMP_MUTE : 0;
13869 snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
13870 HDA_AMP_MUTE, bits);
13871}
13872
13873static void alc663_g71v_unsol_event(struct hda_codec *codec,
13874 unsigned int res)
13875{
13876 switch (res >> 26) {
13877 case ALC880_HP_EVENT:
13878 alc663_g71v_hp_automute(codec);
13879 break;
13880 case ALC880_FRONT_EVENT:
13881 alc663_g71v_front_automute(codec);
13882 break;
13883 case ALC880_MIC_EVENT:
13884 alc662_eeepc_mic_automute(codec);
13885 break;
13886 }
13887}
13888
13889static void alc663_g71v_inithook(struct hda_codec *codec)
13890{
13891 alc663_g71v_front_automute(codec);
13892 alc663_g71v_hp_automute(codec);
13893 alc662_eeepc_mic_automute(codec);
13894}
13895
13896static void alc663_g50v_unsol_event(struct hda_codec *codec,
13897 unsigned int res)
13898{
13899 switch (res >> 26) {
13900 case ALC880_HP_EVENT:
13901 alc663_m51va_speaker_automute(codec);
13902 break;
13903 case ALC880_MIC_EVENT:
13904 alc662_eeepc_mic_automute(codec);
13905 break;
13906 }
13907}
13908
13909static void alc663_g50v_inithook(struct hda_codec *codec)
13910{
13911 alc663_m51va_speaker_automute(codec);
13912 alc662_eeepc_mic_automute(codec);
13913}
13914
13695#ifdef CONFIG_SND_HDA_POWER_SAVE 13915#ifdef CONFIG_SND_HDA_POWER_SAVE
13696#define alc662_loopbacks alc880_loopbacks 13916#define alc662_loopbacks alc880_loopbacks
13697#endif 13917#endif
@@ -13714,14 +13934,24 @@ static const char *alc662_models[ALC662_MODEL_LAST] = {
13714 [ALC662_LENOVO_101E] = "lenovo-101e", 13934 [ALC662_LENOVO_101E] = "lenovo-101e",
13715 [ALC662_ASUS_EEEPC_P701] = "eeepc-p701", 13935 [ALC662_ASUS_EEEPC_P701] = "eeepc-p701",
13716 [ALC662_ASUS_EEEPC_EP20] = "eeepc-ep20", 13936 [ALC662_ASUS_EEEPC_EP20] = "eeepc-ep20",
13937 [ALC663_ASUS_M51VA] = "m51va",
13938 [ALC663_ASUS_G71V] = "g71v",
13939 [ALC663_ASUS_H13] = "h13",
13940 [ALC663_ASUS_G50V] = "g50v",
13717 [ALC662_AUTO] = "auto", 13941 [ALC662_AUTO] = "auto",
13718}; 13942};
13719 13943
13720static struct snd_pci_quirk alc662_cfg_tbl[] = { 13944static struct snd_pci_quirk alc662_cfg_tbl[] = {
13945 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS G71V", ALC663_ASUS_G71V),
13946 SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA),
13947 SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V),
13721 SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), 13948 SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG),
13722 SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), 13949 SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701),
13723 SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), 13950 SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20),
13724 SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo", ALC662_LENOVO_101E), 13951 SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo", ALC662_LENOVO_101E),
13952 SND_PCI_QUIRK(0x1854, 0x2000, "ASUS H13-2000", ALC663_ASUS_H13),
13953 SND_PCI_QUIRK(0x1854, 0x2001, "ASUS H13-2001", ALC663_ASUS_H13),
13954 SND_PCI_QUIRK(0x1854, 0x2002, "ASUS H13-2002", ALC663_ASUS_H13),
13725 {} 13955 {}
13726}; 13956};
13727 13957
@@ -13809,7 +14039,53 @@ static struct alc_config_preset alc662_presets[] = {
13809 .unsol_event = alc662_eeepc_ep20_unsol_event, 14039 .unsol_event = alc662_eeepc_ep20_unsol_event,
13810 .init_hook = alc662_eeepc_ep20_inithook, 14040 .init_hook = alc662_eeepc_ep20_inithook,
13811 }, 14041 },
13812 14042 [ALC663_ASUS_M51VA] = {
14043 .mixers = { alc663_m51va_mixer, alc662_capture_mixer},
14044 .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },
14045 .num_dacs = ARRAY_SIZE(alc662_dac_nids),
14046 .dac_nids = alc662_dac_nids,
14047 .dig_out_nid = ALC662_DIGOUT_NID,
14048 .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
14049 .channel_mode = alc662_3ST_2ch_modes,
14050 .input_mux = &alc663_m51va_capture_source,
14051 .unsol_event = alc663_m51va_unsol_event,
14052 .init_hook = alc663_m51va_inithook,
14053 },
14054 [ALC663_ASUS_G71V] = {
14055 .mixers = { alc663_g71v_mixer, alc662_capture_mixer},
14056 .init_verbs = { alc662_init_verbs, alc663_g71v_init_verbs },
14057 .num_dacs = ARRAY_SIZE(alc662_dac_nids),
14058 .dac_nids = alc662_dac_nids,
14059 .dig_out_nid = ALC662_DIGOUT_NID,
14060 .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
14061 .channel_mode = alc662_3ST_2ch_modes,
14062 .input_mux = &alc662_eeepc_capture_source,
14063 .unsol_event = alc663_g71v_unsol_event,
14064 .init_hook = alc663_g71v_inithook,
14065 },
14066 [ALC663_ASUS_H13] = {
14067 .mixers = { alc663_m51va_mixer, alc662_capture_mixer},
14068 .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },
14069 .num_dacs = ARRAY_SIZE(alc662_dac_nids),
14070 .dac_nids = alc662_dac_nids,
14071 .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
14072 .channel_mode = alc662_3ST_2ch_modes,
14073 .input_mux = &alc663_m51va_capture_source,
14074 .unsol_event = alc663_m51va_unsol_event,
14075 .init_hook = alc663_m51va_inithook,
14076 },
14077 [ALC663_ASUS_G50V] = {
14078 .mixers = { alc663_g50v_mixer, alc662_capture_mixer},
14079 .init_verbs = { alc662_init_verbs, alc663_g50v_init_verbs },
14080 .num_dacs = ARRAY_SIZE(alc662_dac_nids),
14081 .dac_nids = alc662_dac_nids,
14082 .dig_out_nid = ALC662_DIGOUT_NID,
14083 .num_channel_mode = ARRAY_SIZE(alc662_3ST_6ch_modes),
14084 .channel_mode = alc662_3ST_6ch_modes,
14085 .input_mux = &alc663_capture_source,
14086 .unsol_event = alc663_g50v_unsol_event,
14087 .init_hook = alc663_g50v_inithook,
14088 },
13813}; 14089};
13814 14090
13815 14091
@@ -14108,11 +14384,17 @@ static int patch_alc662(struct hda_codec *codec)
14108 if (board_config != ALC662_AUTO) 14384 if (board_config != ALC662_AUTO)
14109 setup_preset(spec, &alc662_presets[board_config]); 14385 setup_preset(spec, &alc662_presets[board_config]);
14110 14386
14111 spec->stream_name_analog = "ALC662 Analog"; 14387 if (codec->vendor_id == 0x10ec0663) {
14388 spec->stream_name_analog = "ALC663 Analog";
14389 spec->stream_name_digital = "ALC663 Digital";
14390 } else {
14391 spec->stream_name_analog = "ALC662 Analog";
14392 spec->stream_name_digital = "ALC662 Digital";
14393 }
14394
14112 spec->stream_analog_playback = &alc662_pcm_analog_playback; 14395 spec->stream_analog_playback = &alc662_pcm_analog_playback;
14113 spec->stream_analog_capture = &alc662_pcm_analog_capture; 14396 spec->stream_analog_capture = &alc662_pcm_analog_capture;
14114 14397
14115 spec->stream_name_digital = "ALC662 Digital";
14116 spec->stream_digital_playback = &alc662_pcm_digital_playback; 14398 spec->stream_digital_playback = &alc662_pcm_digital_playback;
14117 spec->stream_digital_capture = &alc662_pcm_digital_capture; 14399 spec->stream_digital_capture = &alc662_pcm_digital_capture;
14118 14400
@@ -14151,6 +14433,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = {
14151 .patch = patch_alc883 }, 14433 .patch = patch_alc883 },
14152 { .id = 0x10ec0662, .rev = 0x100101, .name = "ALC662 rev1", 14434 { .id = 0x10ec0662, .rev = 0x100101, .name = "ALC662 rev1",
14153 .patch = patch_alc662 }, 14435 .patch = patch_alc662 },
14436 { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 },
14154 { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, 14437 { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 },
14155 { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, 14438 { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 },
14156 { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 }, 14439 { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 },