diff options
author | Claudio Matsuoka <cmatsuoka@gmail.com> | 2007-07-06 06:10:01 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-07-20 05:11:43 -0400 |
commit | cd1e3b40429c172b29c04a9c777be2ca1ac012e0 (patch) | |
tree | cb8768ec682b616d15edde2819ca3bac8df6d8f6 /sound | |
parent | 1624cb9a35d4276c8ea0d939d580a6945ac72ac1 (diff) |
[ALSA] hda-codec - Fix HP Nettle 5.1 output
Fixed HP Nettle 6ch/8ch channel routing based on ALC883 sixstack and
swapping rear and center/LFE in verbs and mixer settings.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index acaf8c39eea6..33c6fafd358f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -172,6 +172,7 @@ enum { | |||
172 | ALC883_LENOVO_101E_2ch, | 172 | ALC883_LENOVO_101E_2ch, |
173 | ALC883_LENOVO_NB0763, | 173 | ALC883_LENOVO_NB0763, |
174 | ALC888_LENOVO_MS7195_DIG, | 174 | ALC888_LENOVO_MS7195_DIG, |
175 | ALC888_HP_NETTLE, | ||
175 | ALC883_AUTO, | 176 | ALC883_AUTO, |
176 | ALC883_MODEL_LAST, | 177 | ALC883_MODEL_LAST, |
177 | }; | 178 | }; |
@@ -6024,6 +6025,46 @@ static struct snd_kcontrol_new alc883_medion_md2_mixer[] = { | |||
6024 | { } /* end */ | 6025 | { } /* end */ |
6025 | }; | 6026 | }; |
6026 | 6027 | ||
6028 | static struct snd_kcontrol_new alc888_hp_nettle_mixer[] = { | ||
6029 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
6030 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
6031 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0e, 0x0, HDA_OUTPUT), | ||
6032 | HDA_BIND_MUTE("Surround Playback Switch", 0x0e, 2, HDA_INPUT), | ||
6033 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0d, 1, 0x0, HDA_OUTPUT), | ||
6034 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0d, 2, 0x0, HDA_OUTPUT), | ||
6035 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0d, 1, 2, HDA_INPUT), | ||
6036 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0d, 2, 2, HDA_INPUT), | ||
6037 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
6038 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | ||
6039 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
6040 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
6041 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
6042 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
6043 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
6044 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
6045 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | ||
6046 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
6047 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
6048 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | ||
6049 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
6050 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
6051 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
6052 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
6053 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
6054 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
6055 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
6056 | { | ||
6057 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
6058 | /* .name = "Capture Source", */ | ||
6059 | .name = "Input Source", | ||
6060 | .count = 2, | ||
6061 | .info = alc883_mux_enum_info, | ||
6062 | .get = alc883_mux_enum_get, | ||
6063 | .put = alc883_mux_enum_put, | ||
6064 | }, | ||
6065 | { } /* end */ | ||
6066 | }; | ||
6067 | |||
6027 | static struct snd_kcontrol_new alc883_chmode_mixer[] = { | 6068 | static struct snd_kcontrol_new alc883_chmode_mixer[] = { |
6028 | { | 6069 | { |
6029 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 6070 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -6155,6 +6196,14 @@ static struct hda_verb alc888_lenovo_ms7195_verbs[] = { | |||
6155 | { } /* end */ | 6196 | { } /* end */ |
6156 | }; | 6197 | }; |
6157 | 6198 | ||
6199 | static struct hda_verb alc888_hp_nettle_verbs[] = { | ||
6200 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */ | ||
6201 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x02}, /* Rear : output 2 (0x0e) */ | ||
6202 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x01}, /* CLFE : output 1 (0x0d) */ | ||
6203 | {0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, /* Side : output 3 (0x0f) */ | ||
6204 | { } | ||
6205 | }; | ||
6206 | |||
6158 | /* toggle front-jack and RCA according to the hp-jack state */ | 6207 | /* toggle front-jack and RCA according to the hp-jack state */ |
6159 | static void alc888_lenovo_ms7195_front_automute(struct hda_codec *codec) | 6208 | static void alc888_lenovo_ms7195_front_automute(struct hda_codec *codec) |
6160 | { | 6209 | { |
@@ -6397,6 +6446,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { | |||
6397 | [ALC883_LENOVO_101E_2ch] = "lenovo-101e", | 6446 | [ALC883_LENOVO_101E_2ch] = "lenovo-101e", |
6398 | [ALC883_LENOVO_NB0763] = "lenovo-nb0763", | 6447 | [ALC883_LENOVO_NB0763] = "lenovo-nb0763", |
6399 | [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig", | 6448 | [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig", |
6449 | [ALC888_HP_NETTLE] = "hp-nettle", | ||
6400 | [ALC883_AUTO] = "auto", | 6450 | [ALC883_AUTO] = "auto", |
6401 | }; | 6451 | }; |
6402 | 6452 | ||
@@ -6431,7 +6481,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
6431 | SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch), | 6481 | SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch), |
6432 | SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), | 6482 | SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), |
6433 | SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763), | 6483 | SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763), |
6434 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 6484 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC888_HP_NETTLE), |
6435 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), | 6485 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), |
6436 | {} | 6486 | {} |
6437 | }; | 6487 | }; |
@@ -6616,6 +6666,19 @@ static struct alc_config_preset alc883_presets[] = { | |||
6616 | .unsol_event = alc883_lenovo_ms7195_unsol_event, | 6666 | .unsol_event = alc883_lenovo_ms7195_unsol_event, |
6617 | .init_hook = alc888_lenovo_ms7195_front_automute, | 6667 | .init_hook = alc888_lenovo_ms7195_front_automute, |
6618 | }, | 6668 | }, |
6669 | [ALC888_HP_NETTLE] = { | ||
6670 | .mixers = { alc888_hp_nettle_mixer, alc883_chmode_mixer }, | ||
6671 | .init_verbs = { alc883_init_verbs, alc888_hp_nettle_verbs }, | ||
6672 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
6673 | .dac_nids = alc883_dac_nids, | ||
6674 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
6675 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
6676 | .adc_nids = alc883_adc_nids, | ||
6677 | .dig_in_nid = ALC883_DIGIN_NID, | ||
6678 | .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), | ||
6679 | .channel_mode = alc883_sixstack_modes, | ||
6680 | .input_mux = &alc883_capture_source, | ||
6681 | }, | ||
6619 | }; | 6682 | }; |
6620 | 6683 | ||
6621 | 6684 | ||