diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 412629d02dbb..8491b046a9f4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -155,6 +155,7 @@ enum { | |||
155 | ALC882_W2JC, | 155 | ALC882_W2JC, |
156 | ALC882_TARGA, | 156 | ALC882_TARGA, |
157 | ALC882_ASUS_A7J, | 157 | ALC882_ASUS_A7J, |
158 | ALC882_ASUS_A7M, | ||
158 | ALC885_MACPRO, | 159 | ALC885_MACPRO, |
159 | ALC885_MBP3, | 160 | ALC885_MBP3, |
160 | ALC885_IMAC24, | 161 | ALC885_IMAC24, |
@@ -5022,6 +5023,22 @@ static struct snd_kcontrol_new alc882_asus_a7j_mixer[] = { | |||
5022 | { } /* end */ | 5023 | { } /* end */ |
5023 | }; | 5024 | }; |
5024 | 5025 | ||
5026 | static struct snd_kcontrol_new alc882_asus_a7m_mixer[] = { | ||
5027 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
5028 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
5029 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
5030 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
5031 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
5032 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
5033 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
5034 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
5035 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | ||
5036 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
5037 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
5038 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
5039 | { } /* end */ | ||
5040 | }; | ||
5041 | |||
5025 | static struct snd_kcontrol_new alc882_chmode_mixer[] = { | 5042 | static struct snd_kcontrol_new alc882_chmode_mixer[] = { |
5026 | { | 5043 | { |
5027 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 5044 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -5373,6 +5390,24 @@ static struct hda_verb alc882_asus_a7j_verbs[] = { | |||
5373 | { } /* end */ | 5390 | { } /* end */ |
5374 | }; | 5391 | }; |
5375 | 5392 | ||
5393 | static struct hda_verb alc882_asus_a7m_verbs[] = { | ||
5394 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
5395 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
5396 | |||
5397 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
5398 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
5399 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
5400 | |||
5401 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */ | ||
5402 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | ||
5403 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */ | ||
5404 | |||
5405 | {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ | ||
5406 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */ | ||
5407 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | ||
5408 | { } /* end */ | ||
5409 | }; | ||
5410 | |||
5376 | static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) | 5411 | static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) |
5377 | { | 5412 | { |
5378 | unsigned int gpiostate, gpiomask, gpiodir; | 5413 | unsigned int gpiostate, gpiomask, gpiodir; |
@@ -5563,6 +5598,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
5563 | SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ | 5598 | SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ |
5564 | SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), | 5599 | SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), |
5565 | SND_PCI_QUIRK(0x1043, 0x060d, "Asus A7J", ALC882_ASUS_A7J), | 5600 | SND_PCI_QUIRK(0x1043, 0x060d, "Asus A7J", ALC882_ASUS_A7J), |
5601 | SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_ASUS_A7M), | ||
5566 | SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG), | 5602 | SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG), |
5567 | SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), | 5603 | SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), |
5568 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC), | 5604 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC), |
@@ -5683,6 +5719,19 @@ static struct alc_config_preset alc882_presets[] = { | |||
5683 | .need_dac_fix = 1, | 5719 | .need_dac_fix = 1, |
5684 | .input_mux = &alc882_capture_source, | 5720 | .input_mux = &alc882_capture_source, |
5685 | }, | 5721 | }, |
5722 | [ALC882_ASUS_A7M] = { | ||
5723 | .mixers = { alc882_asus_a7m_mixer, alc882_chmode_mixer }, | ||
5724 | .init_verbs = { alc882_init_verbs, alc882_eapd_verbs, | ||
5725 | alc880_gpio1_init_verbs, | ||
5726 | alc882_asus_a7m_verbs }, | ||
5727 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
5728 | .dac_nids = alc882_dac_nids, | ||
5729 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
5730 | .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes), | ||
5731 | .channel_mode = alc880_threestack_modes, | ||
5732 | .need_dac_fix = 1, | ||
5733 | .input_mux = &alc882_capture_source, | ||
5734 | }, | ||
5686 | }; | 5735 | }; |
5687 | 5736 | ||
5688 | 5737 | ||