From: Kai Vehmanen Date: Wed, 2 Aug 2023 15:01:05 +0000 (-0500) Subject: ALSA: hda/i915: extend connectivity check to cover Intel ARL X-Git-Tag: v6.6-rc1~135^2~5^2~69^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f8c530fc458142e0db0185f18153d85c4359203;p=thirdparty%2Fkernel%2Flinux.git ALSA: hda/i915: extend connectivity check to cover Intel ARL Expand the HDA/I915 connectivity check to correctly handle the PCI topology used in some Intel Arrow Lake products. Reviewed-by: Bard Liao Tested-by: "T, Arun" Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230802150105.24604-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai --- diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 2a451ff4fe6ad..b428537f284c7 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -75,14 +75,20 @@ static bool connectivity_check(struct pci_dev *i915, struct pci_dev *hdac) if (bus_a == bus_b) return true; - /* - * on i915 discrete GPUs with embedded HDA audio, the two - * devices are connected via 2nd level PCI bridge - */ bus_a = bus_a->parent; bus_b = bus_b->parent; + + /* connected via parent bus (may be NULL!) */ + if (bus_a == bus_b) + return true; + if (!bus_a || !bus_b) return false; + + /* + * on i915 discrete GPUs with embedded HDA audio, the two + * devices are connected via 2nd level PCI bridge + */ bus_a = bus_a->parent; bus_b = bus_b->parent; if (bus_a && bus_a == bus_b)