aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-04-15 04:11:12 -0400
committerTakashi Iwai <tiwai@suse.de>2011-04-19 10:45:31 -0400
commit6981d184376e74391c23c116a068f8d1305f0e57 (patch)
tree2e8712c25075073871380c8f1e4961367cdb3df7
parent9ce24a7ea9c257b02151d9a31fc30afad89a5966 (diff)
ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec
Acer laptops with ALC271x needs a magic initialization for digital-mic to make it working with mono streams (and PulseAudio). Added a fix-up applied to Acer with ALC271x generically. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d9f1ef7dac2e..30c4409211f2 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -14868,6 +14868,23 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
14868 alc_write_coef_idx(codec, 0x1e, coef | 0x80); 14868 alc_write_coef_idx(codec, 0x1e, coef | 0x80);
14869} 14869}
14870 14870
14871static void alc271_fixup_dmic(struct hda_codec *codec,
14872 const struct alc_fixup *fix, int action)
14873{
14874 static struct hda_verb verbs[] = {
14875 {0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
14876 {0x20, AC_VERB_SET_PROC_COEF, 0x4000},
14877 {}
14878 };
14879 unsigned int cfg;
14880
14881 if (strcmp(codec->chip_name, "ALC271X"))
14882 return;
14883 cfg = snd_hda_codec_get_pincfg(codec, 0x12);
14884 if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED)
14885 snd_hda_sequence_write(codec, verbs);
14886}
14887
14871enum { 14888enum {
14872 ALC269_FIXUP_SONY_VAIO, 14889 ALC269_FIXUP_SONY_VAIO,
14873 ALC275_FIXUP_SONY_VAIO_GPIO2, 14890 ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -14876,6 +14893,7 @@ enum {
14876 ALC269_FIXUP_ASUS_G73JW, 14893 ALC269_FIXUP_ASUS_G73JW,
14877 ALC269_FIXUP_LENOVO_EAPD, 14894 ALC269_FIXUP_LENOVO_EAPD,
14878 ALC275_FIXUP_SONY_HWEQ, 14895 ALC275_FIXUP_SONY_HWEQ,
14896 ALC271_FIXUP_DMIC,
14879}; 14897};
14880 14898
14881static const struct alc_fixup alc269_fixups[] = { 14899static const struct alc_fixup alc269_fixups[] = {
@@ -14929,7 +14947,11 @@ static const struct alc_fixup alc269_fixups[] = {
14929 .v.func = alc269_fixup_hweq, 14947 .v.func = alc269_fixup_hweq,
14930 .chained = true, 14948 .chained = true,
14931 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 14949 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
14932 } 14950 },
14951 [ALC271_FIXUP_DMIC] = {
14952 .type = ALC_FIXUP_FUNC,
14953 .v.func = alc271_fixup_dmic,
14954 },
14933}; 14955};
14934 14956
14935static struct snd_pci_quirk alc269_fixup_tbl[] = { 14957static struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -14938,6 +14960,7 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = {
14938 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 14960 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
14939 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 14961 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
14940 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 14962 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
14963 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
14941 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), 14964 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
14942 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), 14965 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
14943 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), 14966 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),