Skip to content

Commit cf9c19d

Browse files
crojewsk-inteltiwai
authored andcommitted
ASoC: codecs: hda: Skip HDMI/DP registration if i915 is missing
If i915 does not support given platform but the hardware i.e.: HDAudio codec is still there, the codec-probing procedure will succeed for such device but the follow up initialization will always end up with -ENODEV. While bus could filter out address '2' which Intel's HDMI/DP codecs always enumerate on, more robust approach is to check for i915 presence before registering display codecs. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240226124432.1203798-3-cezary.rojewski@intel.com
1 parent bd6e4c4 commit cf9c19d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sound/soc/codecs/hda.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ static int hda_hdev_attach(struct hdac_device *hdev)
350350
struct hda_codec *codec = dev_to_hda_codec(&hdev->dev);
351351
struct snd_soc_component_driver *comp_drv;
352352

353+
if (hda_codec_is_display(codec) && !hdev->bus->audio_component) {
354+
dev_dbg(&hdev->dev, "no i915, skip registration for 0x%08x\n", hdev->vendor_id);
355+
return -ENODEV;
356+
}
357+
353358
comp_drv = devm_kzalloc(&hdev->dev, sizeof(*comp_drv), GFP_KERNEL);
354359
if (!comp_drv)
355360
return -ENOMEM;

0 commit comments

Comments
 (0)