aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-04-06 12:12:52 -0400
committerTakashi Iwai <tiwai@suse.de>2010-04-07 08:56:55 -0400
commit7ad7b218f4aae4f395b3b4cef261572556bbd20a (patch)
tree9ef5fd76e531929e1e67b9b70a29ade065e2224a /sound
parentf9700d5a4575e7fb343df10a1d29d425e4b81082 (diff)
ALSA: hda: Add support for Medion WIM2160
This adds support for the Medion WIM2160 soundcard. There's no PCI quirk added because it has the same PCI id as the Medion MD2. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c7730dbb9ddb..2971e48e50ad 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -230,6 +230,7 @@ enum {
230 ALC888_ACER_ASPIRE_7730G, 230 ALC888_ACER_ASPIRE_7730G,
231 ALC883_MEDION, 231 ALC883_MEDION,
232 ALC883_MEDION_MD2, 232 ALC883_MEDION_MD2,
233 ALC883_MEDION_WIM2160,
233 ALC883_LAPTOP_EAPD, 234 ALC883_LAPTOP_EAPD,
234 ALC883_LENOVO_101E_2ch, 235 ALC883_LENOVO_101E_2ch,
235 ALC883_LENOVO_NB0763, 236 ALC883_LENOVO_NB0763,
@@ -8455,6 +8456,42 @@ static struct snd_kcontrol_new alc883_medion_md2_mixer[] = {
8455 { } /* end */ 8456 { } /* end */
8456}; 8457};
8457 8458
8459static struct snd_kcontrol_new alc883_medion_wim2160_mixer[] = {
8460 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
8461 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
8462 HDA_CODEC_MUTE("Speaker Playback Switch", 0x15, 0x0, HDA_OUTPUT),
8463 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT),
8464 HDA_CODEC_VOLUME("Line Playback Volume", 0x08, 0x0, HDA_INPUT),
8465 HDA_CODEC_MUTE("Line Playback Switch", 0x08, 0x0, HDA_INPUT),
8466 { } /* end */
8467};
8468
8469static struct hda_verb alc883_medion_wim2160_verbs[] = {
8470 /* Unmute front mixer */
8471 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
8472 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
8473
8474 /* Set speaker pin to front mixer */
8475 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
8476
8477 /* Init headphone pin */
8478 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8479 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8480 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
8481 {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
8482
8483 { } /* end */
8484};
8485
8486/* toggle speaker-output according to the hp-jack state */
8487static void alc883_medion_wim2160_setup(struct hda_codec *codec)
8488{
8489 struct alc_spec *spec = codec->spec;
8490
8491 spec->autocfg.hp_pins[0] = 0x1a;
8492 spec->autocfg.speaker_pins[0] = 0x15;
8493}
8494
8458static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { 8495static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
8459 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 8496 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
8460 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 8497 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -9164,6 +9201,7 @@ static const char *alc882_models[ALC882_MODEL_LAST] = {
9164 [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", 9201 [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g",
9165 [ALC883_MEDION] = "medion", 9202 [ALC883_MEDION] = "medion",
9166 [ALC883_MEDION_MD2] = "medion-md2", 9203 [ALC883_MEDION_MD2] = "medion-md2",
9204 [ALC883_MEDION_WIM2160] = "medion-wim2160",
9167 [ALC883_LAPTOP_EAPD] = "laptop-eapd", 9205 [ALC883_LAPTOP_EAPD] = "laptop-eapd",
9168 [ALC883_LENOVO_101E_2ch] = "lenovo-101e", 9206 [ALC883_LENOVO_101E_2ch] = "lenovo-101e",
9169 [ALC883_LENOVO_NB0763] = "lenovo-nb0763", 9207 [ALC883_LENOVO_NB0763] = "lenovo-nb0763",
@@ -9818,6 +9856,21 @@ static struct alc_config_preset alc882_presets[] = {
9818 .setup = alc883_medion_md2_setup, 9856 .setup = alc883_medion_md2_setup,
9819 .init_hook = alc_automute_amp, 9857 .init_hook = alc_automute_amp,
9820 }, 9858 },
9859 [ALC883_MEDION_WIM2160] = {
9860 .mixers = { alc883_medion_wim2160_mixer },
9861 .init_verbs = { alc883_init_verbs, alc883_medion_wim2160_verbs },
9862 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
9863 .dac_nids = alc883_dac_nids,
9864 .dig_out_nid = ALC883_DIGOUT_NID,
9865 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
9866 .adc_nids = alc883_adc_nids,
9867 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
9868 .channel_mode = alc883_3ST_2ch_modes,
9869 .input_mux = &alc883_capture_source,
9870 .unsol_event = alc_automute_amp_unsol_event,
9871 .setup = alc883_medion_wim2160_setup,
9872 .init_hook = alc_automute_amp,
9873 },
9821 [ALC883_LAPTOP_EAPD] = { 9874 [ALC883_LAPTOP_EAPD] = {
9822 .mixers = { alc883_base_mixer }, 9875 .mixers = { alc883_base_mixer },
9823 .init_verbs = { alc883_init_verbs, alc882_eapd_verbs }, 9876 .init_verbs = { alc883_init_verbs, alc882_eapd_verbs },