Message ID | 20240802-hdmi-audio-hp-wrongpins-v1-1-8d8ba10d77f8@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ALSA: hda: Manally set pins to correct HP firmware settings | expand |
On Sat, 03 Aug 2024 01:50:11 +0200, Steven 'Steve' Kendall wrote: > > In recent HP UEFI firmware (likely v2.15 and above, tested on 2.27), > these pins are incorrectly set for HDMI/DP audio. Tested on > HP MP9 G4 Retail System AMS. Pins for the ports set to escalating values > (0x70, 80, 90) to have differing default associations, though in my > testing setting all pins to 0x70 also worked as suggested by the first > link below. Tested audio with two monitors connected via DisplayPort. > > Link: https://forum.manjaro.org/t/intel-cannon-lake-pch-cavs-conexant-cx20632-no-sound-at-hdmi-or-displayport/133494 > Link: https://bbs.archlinux.org/viewtopic.php?id=270523 > Signed-off-by: Steven 'Steve' Kendall <skend@chromium.org> I suppose it can be rather added to force_connect_list[] table like a few other HP models, instead? Something like below. Or, maybe we can apply with vendor HP (103c) in the case of Kaybelake. I got another report indicating a same issue, but with the ID 103c:83e2. thanks, Takashi -- 8< -- --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1989,6 +1989,7 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid) } static const struct snd_pci_quirk force_connect_list[] = { + SND_PCI_QUIRK(0x103c, 0x83ef, "HP MP9 G4 Retail System AMS", 1), SND_PCI_QUIRK(0x103c, 0x870f, "HP", 1), SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1), SND_PCI_QUIRK(0x103c, 0x8711, "HP", 1),
On 8/3/2024 1:50 AM, Steven 'Steve' Kendall wrote: > In recent HP UEFI firmware (likely v2.15 and above, tested on 2.27), > these pins are incorrectly set for HDMI/DP audio. Tested on > HP MP9 G4 Retail System AMS. Pins for the ports set to escalating values > (0x70, 80, 90) to have differing default associations, though in my > testing setting all pins to 0x70 also worked as suggested by the first > link below. Tested audio with two monitors connected via DisplayPort. > > Link: https://forum.manjaro.org/t/intel-cannon-lake-pch-cavs-conexant-cx20632-no-sound-at-hdmi-or-displayport/133494 > Link: https://bbs.archlinux.org/viewtopic.php?id=270523 > Signed-off-by: Steven 'Steve' Kendall <skend@chromium.org> > --- > sound/pci/hda/patch_hdmi.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c > index 707d203ba652..dfcbd41097f8 100644 > --- a/sound/pci/hda/patch_hdmi.c > +++ b/sound/pci/hda/patch_hdmi.c > @@ -3115,6 +3115,25 @@ static int patch_i915_hsw_hdmi(struct hda_codec *codec) > enable_silent_stream); > } > > +static const struct snd_pci_quirk kaby_hdmi_list[] = { I see that Takashi gave some other suggestion, but in case there is decision to proceed with this patch, change kaby_hdmi_list to kbl_hdmi_list. > + SND_PCI_QUIRK(0x103c, 0x83ef, "HP MP9 G4 Retail System AMS", 1), > + {} > +}; > + > +static int patch_i915_kaby_hdmi(struct hda_codec *codec) and same here, kaby -> kbl or maybe even consider cnl, as both linked issues seem to be reported on devices with Cannon Lake audio controller?
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 707d203ba652..dfcbd41097f8 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -3115,6 +3115,25 @@ static int patch_i915_hsw_hdmi(struct hda_codec *codec) enable_silent_stream); } +static const struct snd_pci_quirk kaby_hdmi_list[] = { + SND_PCI_QUIRK(0x103c, 0x83ef, "HP MP9 G4 Retail System AMS", 1), + {} +}; + +static int patch_i915_kaby_hdmi(struct hda_codec *codec) +{ + const struct snd_pci_quirk *q; + + q = snd_pci_quirk_lookup(codec->bus->pci, kaby_hdmi_list); + if (q && q->value) { + /* Recent HP firmware assigns incorrect pins, corrected here */ + snd_hda_codec_set_pincfg(codec, 0x05, 0x18560070); + snd_hda_codec_set_pincfg(codec, 0x06, 0x18560080); + snd_hda_codec_set_pincfg(codec, 0x07, 0x18560090); + } + return patch_i915_hsw_hdmi(codec); +} + static int patch_i915_glk_hdmi(struct hda_codec *codec) { /* @@ -4620,7 +4639,7 @@ HDA_CODEC_ENTRY(0x80862807, "Haswell HDMI", patch_i915_hsw_hdmi), HDA_CODEC_ENTRY(0x80862808, "Broadwell HDMI", patch_i915_hsw_hdmi), HDA_CODEC_ENTRY(0x80862809, "Skylake HDMI", patch_i915_hsw_hdmi), HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI", patch_i915_hsw_hdmi), -HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_hsw_hdmi), +HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_kaby_hdmi), HDA_CODEC_ENTRY(0x8086280c, "Cannonlake HDMI", patch_i915_glk_hdmi), HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_glk_hdmi), HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),
In recent HP UEFI firmware (likely v2.15 and above, tested on 2.27), these pins are incorrectly set for HDMI/DP audio. Tested on HP MP9 G4 Retail System AMS. Pins for the ports set to escalating values (0x70, 80, 90) to have differing default associations, though in my testing setting all pins to 0x70 also worked as suggested by the first link below. Tested audio with two monitors connected via DisplayPort. Link: https://forum.manjaro.org/t/intel-cannon-lake-pch-cavs-conexant-cx20632-no-sound-at-hdmi-or-displayport/133494 Link: https://bbs.archlinux.org/viewtopic.php?id=270523 Signed-off-by: Steven 'Steve' Kendall <skend@chromium.org> --- sound/pci/hda/patch_hdmi.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) --- base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b change-id: 20240802-hdmi-audio-hp-wrongpins-f88606f8d3ab Best regards,