ALSA: hda: i915: Allow xe as match for i915_component_master_match
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 9 Oct 2023 11:54:32 +0000 (13:54 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 19 Oct 2023 12:55:34 +0000 (14:55 +0200)
Xe is a new driver for intel GPU's that shares the sound related code
with i915.

The modprobe mechanism is being replaced by the -EPROBE_DEFER mechanism,
so we don't need to add a modprobe xe call. Adding this would have
required a telepathy module to correctly guess whether to load i915 or
xe.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231009115437.99976-9-maarten.lankhorst@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_i915.c

index ffa35d7a367c002aa5e67ef6a5f70f860c037a48..0765e5350e7bafa1272c0b199c8e1572ab32c656 100644 (file)
@@ -115,7 +115,8 @@ static int i915_component_master_match(struct device *dev, int subcomponent,
        hdac_pci = to_pci_dev(bus->dev);
        i915_pci = to_pci_dev(dev);
 
-       if (!strcmp(dev->driver->name, "i915") &&
+       if ((!strcmp(dev->driver->name, "i915") ||
+                !strcmp(dev->driver->name, "xe")) &&
            subcomponent == I915_COMPONENT_AUDIO &&
            connectivity_check(i915_pci, hdac_pci))
                return 1;