From: Takashi Iwai Date: Wed, 27 Jun 2018 07:54:46 +0000 (+0200) Subject: ALSA: hda/hdmi - Don't fall back to generic when i915 binding fails X-Git-Tag: v4.19-rc1~158^2~1^2~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdd49c510021d389bf5979282193e084f328e031;p=thirdparty%2Fkernel%2Fstable.git ALSA: hda/hdmi - Don't fall back to generic when i915 binding fails When i915 component binding fails, it means that HDMI isn't applicable anyway. Although the probe with the generic HDMI parser would still work, it's essentially useless, hence better to be left unbound. This patch mimics the probe_id field at failing the i915 component binding so that the generic HDMI won't be bound after that. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 8a095c16ee65a..993294c8fd0ab 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -84,6 +84,7 @@ struct hda_bus { */ typedef int (*hda_codec_patch_t)(struct hda_codec *); +#define HDA_CODEC_ID_SKIP_PROBE 0x00000001 #define HDA_CODEC_ID_GENERIC_HDMI 0x00000101 #define HDA_CODEC_ID_GENERIC 0x00000201 diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index ed2318f79e3cb..cbf5f4e30027c 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2542,6 +2542,8 @@ static int alloc_intel_hdmi(struct hda_codec *codec) /* requires i915 binding */ if (!codec->bus->core.audio_component) { codec_info(codec, "No i915 binding for Intel HDMI/DP codec\n"); + /* set probe_id here to prevent generic fallback binding */ + codec->probe_id = HDA_CODEC_ID_SKIP_PROBE; return -ENODEV; }