diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-26 09:05:39 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-26 09:05:39 -0400 |
commit | 31d44b57c508971c083ce038d7c5ededd09cea01 (patch) | |
tree | 249689625896d65894f56763c22f726e39fde5ec /sound/pci | |
parent | 885f42e1f466c36e3663d912a831e940f01a112b (diff) | |
parent | 1c7276cfc04b1a5b296b691c2e07297a4f6c19aa (diff) |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 25 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 |
3 files changed, 31 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2b6019390489..fb07def1586f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1000,6 +1000,7 @@ void snd_hda_shutup_pins(struct hda_codec *codec) | |||
1000 | } | 1000 | } |
1001 | EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); | 1001 | EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); |
1002 | 1002 | ||
1003 | #ifdef SND_HDA_NEEDS_RESUME | ||
1003 | /* Restore the pin controls cleared previously via snd_hda_shutup_pins() */ | 1004 | /* Restore the pin controls cleared previously via snd_hda_shutup_pins() */ |
1004 | static void restore_shutup_pins(struct hda_codec *codec) | 1005 | static void restore_shutup_pins(struct hda_codec *codec) |
1005 | { | 1006 | { |
@@ -1016,6 +1017,7 @@ static void restore_shutup_pins(struct hda_codec *codec) | |||
1016 | } | 1017 | } |
1017 | codec->pins_shutup = 0; | 1018 | codec->pins_shutup = 0; |
1018 | } | 1019 | } |
1020 | #endif | ||
1019 | 1021 | ||
1020 | static void init_hda_cache(struct hda_cache_rec *cache, | 1022 | static void init_hda_cache(struct hda_cache_rec *cache, |
1021 | unsigned int record_size); | 1023 | unsigned int record_size); |
@@ -1394,6 +1396,7 @@ static void purify_inactive_streams(struct hda_codec *codec) | |||
1394 | } | 1396 | } |
1395 | } | 1397 | } |
1396 | 1398 | ||
1399 | #ifdef SND_HDA_NEEDS_RESUME | ||
1397 | /* clean up all streams; called from suspend */ | 1400 | /* clean up all streams; called from suspend */ |
1398 | static void hda_cleanup_all_streams(struct hda_codec *codec) | 1401 | static void hda_cleanup_all_streams(struct hda_codec *codec) |
1399 | { | 1402 | { |
@@ -1405,6 +1408,7 @@ static void hda_cleanup_all_streams(struct hda_codec *codec) | |||
1405 | really_cleanup_stream(codec, p); | 1408 | really_cleanup_stream(codec, p); |
1406 | } | 1409 | } |
1407 | } | 1410 | } |
1411 | #endif | ||
1408 | 1412 | ||
1409 | /* | 1413 | /* |
1410 | * amp access functions | 1414 | * amp access functions |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 81f0c5c401b5..e631874a3e32 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -14869,6 +14869,23 @@ static void alc269_fixup_hweq(struct hda_codec *codec, | |||
14869 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); | 14869 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); |
14870 | } | 14870 | } |
14871 | 14871 | ||
14872 | static void alc271_fixup_dmic(struct hda_codec *codec, | ||
14873 | const struct alc_fixup *fix, int action) | ||
14874 | { | ||
14875 | static struct hda_verb verbs[] = { | ||
14876 | {0x20, AC_VERB_SET_COEF_INDEX, 0x0d}, | ||
14877 | {0x20, AC_VERB_SET_PROC_COEF, 0x4000}, | ||
14878 | {} | ||
14879 | }; | ||
14880 | unsigned int cfg; | ||
14881 | |||
14882 | if (strcmp(codec->chip_name, "ALC271X")) | ||
14883 | return; | ||
14884 | cfg = snd_hda_codec_get_pincfg(codec, 0x12); | ||
14885 | if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED) | ||
14886 | snd_hda_sequence_write(codec, verbs); | ||
14887 | } | ||
14888 | |||
14872 | enum { | 14889 | enum { |
14873 | ALC269_FIXUP_SONY_VAIO, | 14890 | ALC269_FIXUP_SONY_VAIO, |
14874 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 14891 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -14877,6 +14894,7 @@ enum { | |||
14877 | ALC269_FIXUP_ASUS_G73JW, | 14894 | ALC269_FIXUP_ASUS_G73JW, |
14878 | ALC269_FIXUP_LENOVO_EAPD, | 14895 | ALC269_FIXUP_LENOVO_EAPD, |
14879 | ALC275_FIXUP_SONY_HWEQ, | 14896 | ALC275_FIXUP_SONY_HWEQ, |
14897 | ALC271_FIXUP_DMIC, | ||
14880 | }; | 14898 | }; |
14881 | 14899 | ||
14882 | static const struct alc_fixup alc269_fixups[] = { | 14900 | static const struct alc_fixup alc269_fixups[] = { |
@@ -14930,7 +14948,11 @@ static const struct alc_fixup alc269_fixups[] = { | |||
14930 | .v.func = alc269_fixup_hweq, | 14948 | .v.func = alc269_fixup_hweq, |
14931 | .chained = true, | 14949 | .chained = true, |
14932 | .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 | 14950 | .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 |
14933 | } | 14951 | }, |
14952 | [ALC271_FIXUP_DMIC] = { | ||
14953 | .type = ALC_FIXUP_FUNC, | ||
14954 | .v.func = alc271_fixup_dmic, | ||
14955 | }, | ||
14934 | }; | 14956 | }; |
14935 | 14957 | ||
14936 | static struct snd_pci_quirk alc269_fixup_tbl[] = { | 14958 | static struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -14939,6 +14961,7 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
14939 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 14961 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
14940 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), | 14962 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
14941 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 14963 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
14964 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), | ||
14942 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), | 14965 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
14943 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), | 14966 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), |
14944 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), | 14967 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c391bfb95e09..75b7155b1645 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -3408,6 +3408,9 @@ static int get_connection_index(struct hda_codec *codec, hda_nid_t mux, | |||
3408 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; | 3408 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; |
3409 | int i, nums; | 3409 | int i, nums; |
3410 | 3410 | ||
3411 | if (!(get_wcaps(codec, mux) & AC_WCAP_CONN_LIST)) | ||
3412 | return -1; | ||
3413 | |||
3411 | nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); | 3414 | nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); |
3412 | for (i = 0; i < nums; i++) | 3415 | for (i = 0; i < nums; i++) |
3413 | if (conn[i] == nid) | 3416 | if (conn[i] == nid) |