|
@@ -111,6 +111,7 @@ struct alc_spec {
|
|
|
void (*power_hook)(struct hda_codec *codec);
|
|
|
#endif
|
|
|
void (*shutup)(struct hda_codec *codec);
|
|
|
+ void (*reboot_notify)(struct hda_codec *codec);
|
|
|
|
|
|
int init_amp;
|
|
|
int codec_variant; /* flag for other variants */
|
|
@@ -773,6 +774,25 @@ static inline void alc_shutup(struct hda_codec *codec)
|
|
|
snd_hda_shutup_pins(codec);
|
|
|
}
|
|
|
|
|
|
+static void alc_reboot_notify(struct hda_codec *codec)
|
|
|
+{
|
|
|
+ struct alc_spec *spec = codec->spec;
|
|
|
+
|
|
|
+ if (spec && spec->reboot_notify)
|
|
|
+ spec->reboot_notify(codec);
|
|
|
+ else
|
|
|
+ alc_shutup(codec);
|
|
|
+}
|
|
|
+
|
|
|
+/* power down codec to D3 at reboot/shutdown; set as reboot_notify ops */
|
|
|
+static void alc_d3_at_reboot(struct hda_codec *codec)
|
|
|
+{
|
|
|
+ snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3);
|
|
|
+ snd_hda_codec_write(codec, codec->core.afg, 0,
|
|
|
+ AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
|
|
|
+ msleep(10);
|
|
|
+}
|
|
|
+
|
|
|
#define alc_free snd_hda_gen_free
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
@@ -818,7 +838,7 @@ static const struct hda_codec_ops alc_patch_ops = {
|
|
|
.suspend = alc_suspend,
|
|
|
.check_power_status = snd_hda_gen_check_power_status,
|
|
|
#endif
|
|
|
- .reboot_notify = alc_shutup,
|
|
|
+ .reboot_notify = alc_reboot_notify,
|
|
|
};
|
|
|
|
|
|
|
|
@@ -4198,24 +4218,14 @@ static void alc_fixup_tpt440_dock(struct hda_codec *codec,
|
|
|
struct alc_spec *spec = codec->spec;
|
|
|
|
|
|
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
|
|
+ spec->shutup = alc_no_shutup; /* reduce click noise */
|
|
|
+ spec->reboot_notify = alc_d3_at_reboot; /* reduce noise */
|
|
|
spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
|
|
|
codec->power_save_node = 0; /* avoid click noises */
|
|
|
snd_hda_apply_pincfgs(codec, pincfgs);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* additional fixup for Thinkpad T440s noise problem */
|
|
|
-static void alc_fixup_tpt440(struct hda_codec *codec,
|
|
|
- const struct hda_fixup *fix, int action)
|
|
|
-{
|
|
|
- struct alc_spec *spec = codec->spec;
|
|
|
-
|
|
|
- if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
|
|
- spec->shutup = alc_no_shutup; /* reduce click noise */
|
|
|
- spec->gen.mixer_nid = 0; /* reduce background noise */
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
static void alc_shutup_dell_xps13(struct hda_codec *codec)
|
|
|
{
|
|
|
struct alc_spec *spec = codec->spec;
|
|
@@ -4606,6 +4616,7 @@ enum {
|
|
|
ALC288_FIXUP_DISABLE_AAMIX,
|
|
|
ALC292_FIXUP_DELL_E7X,
|
|
|
ALC292_FIXUP_DISABLE_AAMIX,
|
|
|
+ ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
|
|
|
ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
|
|
|
ALC275_FIXUP_DELL_XPS,
|
|
|
ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
|
|
@@ -5066,7 +5077,7 @@ static const struct hda_fixup alc269_fixups[] = {
|
|
|
},
|
|
|
[ALC292_FIXUP_TPT440] = {
|
|
|
.type = HDA_FIXUP_FUNC,
|
|
|
- .v.func = alc_fixup_tpt440,
|
|
|
+ .v.func = alc_fixup_disable_aamix,
|
|
|
.chained = true,
|
|
|
.chain_id = ALC292_FIXUP_TPT440_DOCK,
|
|
|
},
|
|
@@ -5169,6 +5180,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
|
|
.chained = true,
|
|
|
.chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
|
|
|
},
|
|
|
+ [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = {
|
|
|
+ .type = HDA_FIXUP_FUNC,
|
|
|
+ .v.func = alc_fixup_disable_aamix,
|
|
|
+ .chained = true,
|
|
|
+ .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
|
|
|
+ },
|
|
|
[ALC292_FIXUP_DELL_E7X] = {
|
|
|
.type = HDA_FIXUP_FUNC,
|
|
|
.v.func = alc_fixup_dell_xps13,
|
|
@@ -5247,11 +5264,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|
|
SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
|
|
|
SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
|
|
|
SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
|
|
|
- SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
|
|
|
- SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
|
|
|
- SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
|
|
|
- SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
|
|
|
- SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
|
|
|
+ SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
|
|
|
+ SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
|
|
|
+ SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
|
|
|
+ SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
|
|
|
+ SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
|
|
|
SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
|
|
|
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
|
|
|
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
|
|
@@ -5358,6 +5375,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK),
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK),
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
|
|
+ SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
|