ALSA: hda/realtek: Improve fixup for HP Spectre x360 15-df0xxx
commit 434591b2a77def0e78abfa38e5d7c4bca954e68a upstream. On HP Spectre x360 15-df0xxx, after system boot with plugged headset, the headset mic are not detected. Moving pincfg and DAC's config to single fixup function fix this. [ The actual bug in the original code was that it used a chain to ALC286_FIXUP_SPEAKER2_TO_DAC1, and it contains not only the DAC1 route fix but also another chain to ALC269_FIXUP_THINKPAD_ACPI. I thought the latter one is harmless for non-Thinkpad, but it doesn't seem so; it contains again yet another chain to ALC269_FIXUP_SKI_IGNORE, and this might be bad for some machines, including this HP machine. -- tiwai ] Signed-off-by: Elia Devito <eliadevito@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210619204105.5682-1-eliadevito@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
ea824a31a3
commit
37e179c028
@@ -6347,6 +6347,24 @@ static void alc_fixup_no_int_mic(struct hda_codec *codec,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
|
||||||
|
const struct hda_fixup *fix, int action)
|
||||||
|
{
|
||||||
|
static const hda_nid_t conn[] = { 0x02 };
|
||||||
|
static const struct hda_pintbl pincfgs[] = {
|
||||||
|
{ 0x14, 0x90170110 }, /* rear speaker */
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (action) {
|
||||||
|
case HDA_FIXUP_ACT_PRE_PROBE:
|
||||||
|
snd_hda_apply_pincfgs(codec, pincfgs);
|
||||||
|
/* force front speaker to DAC1 */
|
||||||
|
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* for hda_fixup_thinkpad_acpi() */
|
/* for hda_fixup_thinkpad_acpi() */
|
||||||
#include "thinkpad_helper.c"
|
#include "thinkpad_helper.c"
|
||||||
|
|
||||||
@@ -8124,13 +8142,8 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||||||
.chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
|
.chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
|
||||||
},
|
},
|
||||||
[ALC285_FIXUP_HP_SPECTRE_X360] = {
|
[ALC285_FIXUP_HP_SPECTRE_X360] = {
|
||||||
.type = HDA_FIXUP_PINS,
|
.type = HDA_FIXUP_FUNC,
|
||||||
.v.pins = (const struct hda_pintbl[]) {
|
.v.func = alc285_fixup_hp_spectre_x360,
|
||||||
{ 0x14, 0x90170110 }, /* enable top speaker */
|
|
||||||
{}
|
|
||||||
},
|
|
||||||
.chained = true,
|
|
||||||
.chain_id = ALC285_FIXUP_SPEAKER2_TO_DAC1,
|
|
||||||
},
|
},
|
||||||
[ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
|
[ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
|
||||||
.type = HDA_FIXUP_FUNC,
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
Reference in New Issue
Block a user