diff options
author | Cezary Rojewski <cezary.rojewski@intel.com> | 2024-02-26 13:44:29 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-03-04 09:17:02 +0100 |
commit | cf9c19df2755d57501ce3922bb22ff0734d8bed5 (patch) | |
tree | 12cc95db52fb08039738a81384419799c1511906 | |
parent | ALSA: hda: Skip i915 initialization on CNL/LKF-based platforms (diff) | |
download | linux-cf9c19df2755d57501ce3922bb22ff0734d8bed5.tar.xz linux-cf9c19df2755d57501ce3922bb22ff0734d8bed5.zip |
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
-rw-r--r-- | sound/soc/codecs/hda.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/hda.c b/sound/soc/codecs/hda.c index d2117e36ddd1..7c6bedeceaa2 100644 --- a/sound/soc/codecs/hda.c +++ b/sound/soc/codecs/hda.c @@ -350,6 +350,11 @@ static int hda_hdev_attach(struct hdac_device *hdev) struct hda_codec *codec = dev_to_hda_codec(&hdev->dev); struct snd_soc_component_driver *comp_drv; + if (hda_codec_is_display(codec) && !hdev->bus->audio_component) { + dev_dbg(&hdev->dev, "no i915, skip registration for 0x%08x\n", hdev->vendor_id); + return -ENODEV; + } + comp_drv = devm_kzalloc(&hdev->dev, sizeof(*comp_drv), GFP_KERNEL); if (!comp_drv) return -ENOMEM; |