aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-04-21 06:44:38 -0400
committerTakashi Iwai <tiwai@suse.de>2011-04-21 06:44:38 -0400
commit6a9a6f233baad76b67a448b39bb55fc064755ba4 (patch)
tree71557def09bb57e2a05d20e939d4824fbad59093 /sound
parentb3c27b51db9112d03864fdef44fa611dd69c1425 (diff)
parent1c7276cfc04b1a5b296b691c2e07297a4f6c19aa (diff)
Merge branch 'fix/hda' into for-linus
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c4
-rw-r--r--sound/pci/hda/patch_realtek.c25
2 files changed, 28 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 430f41db6044..759ade12e758 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -937,6 +937,7 @@ void snd_hda_shutup_pins(struct hda_codec *codec)
937} 937}
938EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); 938EXPORT_SYMBOL_HDA(snd_hda_shutup_pins);
939 939
940#ifdef SND_HDA_NEEDS_RESUME
940/* Restore the pin controls cleared previously via snd_hda_shutup_pins() */ 941/* Restore the pin controls cleared previously via snd_hda_shutup_pins() */
941static void restore_shutup_pins(struct hda_codec *codec) 942static void restore_shutup_pins(struct hda_codec *codec)
942{ 943{
@@ -953,6 +954,7 @@ static void restore_shutup_pins(struct hda_codec *codec)
953 } 954 }
954 codec->pins_shutup = 0; 955 codec->pins_shutup = 0;
955} 956}
957#endif
956 958
957static void init_hda_cache(struct hda_cache_rec *cache, 959static void init_hda_cache(struct hda_cache_rec *cache,
958 unsigned int record_size); 960 unsigned int record_size);
@@ -1329,6 +1331,7 @@ static void purify_inactive_streams(struct hda_codec *codec)
1329 } 1331 }
1330} 1332}
1331 1333
1334#ifdef SND_HDA_NEEDS_RESUME
1332/* clean up all streams; called from suspend */ 1335/* clean up all streams; called from suspend */
1333static void hda_cleanup_all_streams(struct hda_codec *codec) 1336static void hda_cleanup_all_streams(struct hda_codec *codec)
1334{ 1337{
@@ -1340,6 +1343,7 @@ static void hda_cleanup_all_streams(struct hda_codec *codec)
1340 really_cleanup_stream(codec, p); 1343 really_cleanup_stream(codec, p);
1341 } 1344 }
1342} 1345}
1346#endif
1343 1347
1344/* 1348/*
1345 * amp access functions 1349 * amp access functions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 52928d9a72da..d3bd2c10180f 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),