aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-11-22 05:52:52 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:01:43 -0500
commit56bb0cab1c1698544e61409e3727f2b6bc205501 (patch)
treebb590ff7ea372f8d1e2214b50af7ac1a2f69d530 /sound/pci/hda/patch_realtek.c
parent9fb62c9f23d437241051e27a11de568361a4745d (diff)
[ALSA] hda-codec - Add asus-laptop model for ALC861 (ALC660)
Added a new model 'asus-laptop' for ASUS F2*/F3* laptops with ALC861 (equivalent with ALC660) codec chip. Also fixed the model for PCI SSID 1043:1338. Corresponding to ALSA bug#2480. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c40
1 files changed, 36 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index aeb408cbe1ef..60f199459ad4 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -101,6 +101,7 @@ enum {
101 ALC861_UNIWILL_M31, 101 ALC861_UNIWILL_M31,
102 ALC861_TOSHIBA, 102 ALC861_TOSHIBA,
103 ALC861_ASUS, 103 ALC861_ASUS,
104 ALC861_ASUS_LAPTOP,
104 ALC861_AUTO, 105 ALC861_AUTO,
105 ALC861_MODEL_LAST, 106 ALC861_MODEL_LAST,
106}; 107};
@@ -6901,9 +6902,17 @@ static struct snd_kcontrol_new alc861_asus_mixer[] = {
6901 .private_value = ARRAY_SIZE(alc861_asus_modes), 6902 .private_value = ARRAY_SIZE(alc861_asus_modes),
6902 }, 6903 },
6903 { } 6904 { }
6904}; 6905};
6906
6907/* additional mixer */
6908static snd_kcontrol_new_t alc861_asus_laptop_mixer[] = {
6909 HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT),
6910 HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT),
6911 HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x23, 0x0, HDA_OUTPUT),
6912 HDA_CODEC_MUTE("PC Beep Playback Switch", 0x23, 0x0, HDA_OUTPUT),
6913 { }
6914};
6905 6915
6906
6907/* 6916/*
6908 * generic initialization of ADC, input mixers and output mixers 6917 * generic initialization of ADC, input mixers and output mixers
6909 */ 6918 */
@@ -7153,6 +7162,12 @@ static struct hda_verb alc861_asus_init_verbs[] = {
7153 { } 7162 { }
7154}; 7163};
7155 7164
7165/* additional init verbs for ASUS laptops */
7166static struct hda_verb alc861_asus_laptop_init_verbs[] = {
7167 { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x45 }, /* HP-out */
7168 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2) }, /* mute line-in */
7169 { }
7170};
7156 7171
7157/* 7172/*
7158 * generic initialization of ADC, input mixers and output mixers 7173 * generic initialization of ADC, input mixers and output mixers
@@ -7530,8 +7545,11 @@ static struct hda_board_config alc861_cfg_tbl[] = {
7530 { .modelname = "asus", .config = ALC861_ASUS}, 7545 { .modelname = "asus", .config = ALC861_ASUS},
7531 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393, 7546 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393,
7532 .config = ALC861_ASUS }, 7547 .config = ALC861_ASUS },
7548 { .modelname = "asus-laptop", .config = ALC861_ASUS_LAPTOP },
7549 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1335,
7550 .config = ALC861_ASUS_LAPTOP }, /* ASUS F2/F3 */
7533 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338, 7551 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338,
7534 .config = ALC861_ASUS }, 7552 .config = ALC861_ASUS_LAPTOP }, /* ASUS F2/F3 */
7535 { .modelname = "auto", .config = ALC861_AUTO }, 7553 { .modelname = "auto", .config = ALC861_AUTO },
7536 {} 7554 {}
7537}; 7555};
@@ -7626,7 +7644,21 @@ static struct alc_config_preset alc861_presets[] = {
7626 .adc_nids = alc861_adc_nids, 7644 .adc_nids = alc861_adc_nids,
7627 .input_mux = &alc861_capture_source, 7645 .input_mux = &alc861_capture_source,
7628 }, 7646 },
7629}; 7647 [ALC861_ASUS_LAPTOP] = {
7648 .mixers = { alc861_toshiba_mixer, alc861_asus_laptop_mixer },
7649 .init_verbs = { alc861_asus_init_verbs,
7650 alc861_asus_laptop_init_verbs },
7651 .num_dacs = ARRAY_SIZE(alc861_dac_nids),
7652 .dac_nids = alc861_dac_nids,
7653 .dig_out_nid = ALC861_DIGOUT_NID,
7654 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
7655 .channel_mode = alc883_3ST_2ch_modes,
7656 .need_dac_fix = 1,
7657 .num_adc_nids = ARRAY_SIZE(alc861_adc_nids),
7658 .adc_nids = alc861_adc_nids,
7659 .input_mux = &alc861_capture_source,
7660 },
7661};
7630 7662
7631 7663
7632static int patch_alc861(struct hda_codec *codec) 7664static int patch_alc861(struct hda_codec *codec)