diff options
author | ddiaz@cenditel.gob.ve <ddiaz@cenditel.gob.ve> | 2009-09-05 16:58:06 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-09-07 01:32:33 -0400 |
commit | a65cc60f6349fe91539f736dad8fb2398488e431 (patch) | |
tree | 741d4e8b5ffa7277fe204e0bf65eff05dfa109a4 /sound/pci | |
parent | 842ae63800bc2be62085d7ce5b3a2298c014d37a (diff) |
ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
The model clevo-m540r was created with 6-channel and digital support. All
functions verified except spdif. Tested with a VIT D2000 laptop which has:
[lspci extract]
Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio
Controller [8086:284b] (rev 03)
Subsystem: CLEVO/KAPOK Computer Device [1558:5409]
[/proc/asound/card0/codec\#0 header]
Codec: Realtek ALC883
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0883
Subsystem Id: 0x15585409
Revision Id: 0x100002
[Added a comment about HP mute and the model description by tiwai]
Signed-off-by: Dhionel Diaz <ddiaz@cenditel.gob.ve>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f3d186a1e3d5..e58d4c5d6c16 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -232,6 +232,7 @@ enum { | |||
232 | ALC888_3ST_HP, | 232 | ALC888_3ST_HP, |
233 | ALC888_6ST_DELL, | 233 | ALC888_6ST_DELL, |
234 | ALC883_MITAC, | 234 | ALC883_MITAC, |
235 | ALC883_CLEVO_M540R, | ||
235 | ALC883_CLEVO_M720, | 236 | ALC883_CLEVO_M720, |
236 | ALC883_FUJITSU_PI2515, | 237 | ALC883_FUJITSU_PI2515, |
237 | ALC888_FUJITSU_XA3530, | 238 | ALC888_FUJITSU_XA3530, |
@@ -6657,6 +6658,52 @@ static struct hda_channel_mode alc882_3ST_6ch_modes[3] = { | |||
6657 | #define alc883_3ST_6ch_modes alc882_3ST_6ch_modes | 6658 | #define alc883_3ST_6ch_modes alc882_3ST_6ch_modes |
6658 | 6659 | ||
6659 | /* | 6660 | /* |
6661 | * 2ch mode | ||
6662 | */ | ||
6663 | static struct hda_verb alc883_3ST_ch2_clevo_init[] = { | ||
6664 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, | ||
6665 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
6666 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
6667 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
6668 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
6669 | { } /* end */ | ||
6670 | }; | ||
6671 | |||
6672 | /* | ||
6673 | * 4ch mode | ||
6674 | */ | ||
6675 | static struct hda_verb alc883_3ST_ch4_clevo_init[] = { | ||
6676 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6677 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
6678 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
6679 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6680 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
6681 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
6682 | { } /* end */ | ||
6683 | }; | ||
6684 | |||
6685 | /* | ||
6686 | * 6ch mode | ||
6687 | */ | ||
6688 | static struct hda_verb alc883_3ST_ch6_clevo_init[] = { | ||
6689 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6690 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6691 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
6692 | { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
6693 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
6694 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
6695 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
6696 | { } /* end */ | ||
6697 | }; | ||
6698 | |||
6699 | static struct hda_channel_mode alc883_3ST_6ch_clevo_modes[3] = { | ||
6700 | { 2, alc883_3ST_ch2_clevo_init }, | ||
6701 | { 4, alc883_3ST_ch4_clevo_init }, | ||
6702 | { 6, alc883_3ST_ch6_clevo_init }, | ||
6703 | }; | ||
6704 | |||
6705 | |||
6706 | /* | ||
6660 | * 6ch mode | 6707 | * 6ch mode |
6661 | */ | 6708 | */ |
6662 | static struct hda_verb alc882_sixstack_ch6_init[] = { | 6709 | static struct hda_verb alc882_sixstack_ch6_init[] = { |
@@ -8134,6 +8181,22 @@ static struct hda_verb alc883_mitac_verbs[] = { | |||
8134 | { } /* end */ | 8181 | { } /* end */ |
8135 | }; | 8182 | }; |
8136 | 8183 | ||
8184 | static struct hda_verb alc883_clevo_m540r_verbs[] = { | ||
8185 | /* HP */ | ||
8186 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
8187 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
8188 | /* Int speaker */ | ||
8189 | /*{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},*/ | ||
8190 | |||
8191 | /* enable unsolicited event */ | ||
8192 | /* | ||
8193 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
8194 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_MIC_EVENT | AC_USRSP_EN}, | ||
8195 | */ | ||
8196 | |||
8197 | { } /* end */ | ||
8198 | }; | ||
8199 | |||
8137 | static struct hda_verb alc883_clevo_m720_verbs[] = { | 8200 | static struct hda_verb alc883_clevo_m720_verbs[] = { |
8138 | /* HP */ | 8201 | /* HP */ |
8139 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | 8202 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, |
@@ -8670,6 +8733,7 @@ static const char *alc882_models[ALC882_MODEL_LAST] = { | |||
8670 | [ALC888_3ST_HP] = "3stack-hp", | 8733 | [ALC888_3ST_HP] = "3stack-hp", |
8671 | [ALC888_6ST_DELL] = "6stack-dell", | 8734 | [ALC888_6ST_DELL] = "6stack-dell", |
8672 | [ALC883_MITAC] = "mitac", | 8735 | [ALC883_MITAC] = "mitac", |
8736 | [ALC883_CLEVO_M540R] = "clevo-m540r", | ||
8673 | [ALC883_CLEVO_M720] = "clevo-m720", | 8737 | [ALC883_CLEVO_M720] = "clevo-m720", |
8674 | [ALC883_FUJITSU_PI2515] = "fujitsu-pi2515", | 8738 | [ALC883_FUJITSU_PI2515] = "fujitsu-pi2515", |
8675 | [ALC888_FUJITSU_XA3530] = "fujitsu-xa3530", | 8739 | [ALC888_FUJITSU_XA3530] = "fujitsu-xa3530", |
@@ -8776,6 +8840,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
8776 | SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG), | 8840 | SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG), |
8777 | SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720), | 8841 | SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720), |
8778 | SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720), | 8842 | SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720), |
8843 | SND_PCI_QUIRK(0x1558, 0x5409, "Clevo laptop M540R", ALC883_CLEVO_M540R), | ||
8779 | SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC883_LAPTOP_EAPD), | 8844 | SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC883_LAPTOP_EAPD), |
8780 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), | 8845 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), |
8781 | /* SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), */ | 8846 | /* SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), */ |
@@ -9264,6 +9329,21 @@ static struct alc_config_preset alc882_presets[] = { | |||
9264 | .channel_mode = alc883_3ST_2ch_modes, | 9329 | .channel_mode = alc883_3ST_2ch_modes, |
9265 | .input_mux = &alc883_capture_source, | 9330 | .input_mux = &alc883_capture_source, |
9266 | }, | 9331 | }, |
9332 | [ALC883_CLEVO_M540R] = { | ||
9333 | .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, | ||
9334 | .init_verbs = { alc883_init_verbs, alc883_clevo_m540r_verbs }, | ||
9335 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
9336 | .dac_nids = alc883_dac_nids, | ||
9337 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
9338 | .dig_in_nid = ALC883_DIGIN_NID, | ||
9339 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_clevo_modes), | ||
9340 | .channel_mode = alc883_3ST_6ch_clevo_modes, | ||
9341 | .need_dac_fix = 1, | ||
9342 | .input_mux = &alc883_capture_source, | ||
9343 | /* This machine has the hardware HP auto-muting, thus | ||
9344 | * we need no software mute via unsol event | ||
9345 | */ | ||
9346 | }, | ||
9267 | [ALC883_CLEVO_M720] = { | 9347 | [ALC883_CLEVO_M720] = { |
9268 | .mixers = { alc883_clevo_m720_mixer }, | 9348 | .mixers = { alc883_clevo_m720_mixer }, |
9269 | .init_verbs = { alc883_init_verbs, alc883_clevo_m720_verbs }, | 9349 | .init_verbs = { alc883_init_verbs, alc883_clevo_m720_verbs }, |