[PATCH] HAX sound: Disable probing sna_hda with DG1

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 27 23:52:42 UTC 2020


Audio component in i915 is not hooked up yet.
---
 sound/hda/hdac_i915.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index 454474ac5716..fbca4bf53a47 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -128,6 +128,26 @@ static bool i915_gfx_present(void)
 	return pci_dev_present(ids);
 }
 
+static bool dg1_gfx_present(void)
+{
+	static const struct pci_device_id ids[] = {
+		{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4905),
+		  .class = PCI_BASE_CLASS_DISPLAY << 16,
+		  .class_mask = 0xff << 16 },
+		{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4906),
+		  .class = PCI_BASE_CLASS_DISPLAY << 16,
+		  .class_mask = 0xff << 16 },
+		{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4907),
+		  .class = PCI_BASE_CLASS_DISPLAY << 16,
+		  .class_mask = 0xff << 16 },
+		{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4908),
+		  .class = PCI_BASE_CLASS_DISPLAY << 16,
+		  .class_mask = 0xff << 16 },
+		{}
+	};
+	return pci_dev_present(ids);
+}
+
 /**
  * snd_hdac_i915_init - Initialize i915 audio component
  * @bus: HDA core bus
@@ -148,6 +168,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
 	if (!i915_gfx_present())
 		return -ENODEV;
 
+	if (dg1_gfx_present())
+		return -ENODEV;
+
 	err = snd_hdac_acomp_init(bus, NULL,
 				  i915_component_master_match,
 				  sizeof(struct i915_audio_component) - sizeof(*acomp));
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list