diff options
-rw-r--r-- | sound/pci/hda/hda_codec.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 18 |
3 files changed, 22 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 5b6c4e3c92ca..748c6a941963 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4864,8 +4864,8 @@ static void hda_power_work(struct work_struct *work) | |||
4864 | spin_unlock(&codec->power_lock); | 4864 | spin_unlock(&codec->power_lock); |
4865 | 4865 | ||
4866 | state = hda_call_codec_suspend(codec, true); | 4866 | state = hda_call_codec_suspend(codec, true); |
4867 | codec->pm_down_notified = 0; | 4867 | if (!codec->pm_down_notified && |
4868 | if (!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { | 4868 | !bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { |
4869 | codec->pm_down_notified = 1; | 4869 | codec->pm_down_notified = 1; |
4870 | hda_call_pm_notify(bus, false); | 4870 | hda_call_pm_notify(bus, false); |
4871 | } | 4871 | } |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 26ad4f0aade3..b7c89dff7066 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -4475,9 +4475,11 @@ int snd_hda_gen_build_controls(struct hda_codec *codec) | |||
4475 | true, &spec->vmaster_mute.sw_kctl); | 4475 | true, &spec->vmaster_mute.sw_kctl); |
4476 | if (err < 0) | 4476 | if (err < 0) |
4477 | return err; | 4477 | return err; |
4478 | if (spec->vmaster_mute.hook) | 4478 | if (spec->vmaster_mute.hook) { |
4479 | snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, | 4479 | snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, |
4480 | spec->vmaster_mute_enum); | 4480 | spec->vmaster_mute_enum); |
4481 | snd_hda_sync_vmaster_hook(&spec->vmaster_mute); | ||
4482 | } | ||
4481 | } | 4483 | } |
4482 | 4484 | ||
4483 | free_kctls(spec); /* no longer needed */ | 4485 | free_kctls(spec); /* no longer needed */ |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 0cbdd87dde6d..2aa2f579b4d6 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -968,6 +968,15 @@ static void ad1884_fixup_hp_eapd(struct hda_codec *codec, | |||
968 | } | 968 | } |
969 | } | 969 | } |
970 | 970 | ||
971 | static void ad1884_fixup_thinkpad(struct hda_codec *codec, | ||
972 | const struct hda_fixup *fix, int action) | ||
973 | { | ||
974 | struct ad198x_spec *spec = codec->spec; | ||
975 | |||
976 | if (action == HDA_FIXUP_ACT_PRE_PROBE) | ||
977 | spec->gen.keep_eapd_on = 1; | ||
978 | } | ||
979 | |||
971 | /* set magic COEFs for dmic */ | 980 | /* set magic COEFs for dmic */ |
972 | static const struct hda_verb ad1884_dmic_init_verbs[] = { | 981 | static const struct hda_verb ad1884_dmic_init_verbs[] = { |
973 | {0x01, AC_VERB_SET_COEF_INDEX, 0x13f7}, | 982 | {0x01, AC_VERB_SET_COEF_INDEX, 0x13f7}, |
@@ -979,6 +988,7 @@ enum { | |||
979 | AD1884_FIXUP_AMP_OVERRIDE, | 988 | AD1884_FIXUP_AMP_OVERRIDE, |
980 | AD1884_FIXUP_HP_EAPD, | 989 | AD1884_FIXUP_HP_EAPD, |
981 | AD1884_FIXUP_DMIC_COEF, | 990 | AD1884_FIXUP_DMIC_COEF, |
991 | AD1884_FIXUP_THINKPAD, | ||
982 | AD1884_FIXUP_HP_TOUCHSMART, | 992 | AD1884_FIXUP_HP_TOUCHSMART, |
983 | }; | 993 | }; |
984 | 994 | ||
@@ -997,6 +1007,12 @@ static const struct hda_fixup ad1884_fixups[] = { | |||
997 | .type = HDA_FIXUP_VERBS, | 1007 | .type = HDA_FIXUP_VERBS, |
998 | .v.verbs = ad1884_dmic_init_verbs, | 1008 | .v.verbs = ad1884_dmic_init_verbs, |
999 | }, | 1009 | }, |
1010 | [AD1884_FIXUP_THINKPAD] = { | ||
1011 | .type = HDA_FIXUP_FUNC, | ||
1012 | .v.func = ad1884_fixup_thinkpad, | ||
1013 | .chained = true, | ||
1014 | .chain_id = AD1884_FIXUP_DMIC_COEF, | ||
1015 | }, | ||
1000 | [AD1884_FIXUP_HP_TOUCHSMART] = { | 1016 | [AD1884_FIXUP_HP_TOUCHSMART] = { |
1001 | .type = HDA_FIXUP_VERBS, | 1017 | .type = HDA_FIXUP_VERBS, |
1002 | .v.verbs = ad1884_dmic_init_verbs, | 1018 | .v.verbs = ad1884_dmic_init_verbs, |
@@ -1008,7 +1024,7 @@ static const struct hda_fixup ad1884_fixups[] = { | |||
1008 | static const struct snd_pci_quirk ad1884_fixup_tbl[] = { | 1024 | static const struct snd_pci_quirk ad1884_fixup_tbl[] = { |
1009 | SND_PCI_QUIRK(0x103c, 0x2a82, "HP Touchsmart", AD1884_FIXUP_HP_TOUCHSMART), | 1025 | SND_PCI_QUIRK(0x103c, 0x2a82, "HP Touchsmart", AD1884_FIXUP_HP_TOUCHSMART), |
1010 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1884_FIXUP_HP_EAPD), | 1026 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1884_FIXUP_HP_EAPD), |
1011 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1884_FIXUP_DMIC_COEF), | 1027 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1884_FIXUP_THINKPAD), |
1012 | {} | 1028 | {} |
1013 | }; | 1029 | }; |
1014 | 1030 | ||