Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4e3040b authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Optimize audio component check in patch_hdmi.c



The audio component is enabled only when CONFIG_SND_HDA_I915 is set.
Give a dummy macro for allowing the compiler optimize out the relevant
codes when this Kconfig isn't set.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c83d1b37
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -152,8 +152,12 @@ struct hdmi_spec {
	struct i915_audio_component_audio_ops i915_audio_ops;
	struct i915_audio_component_audio_ops i915_audio_ops;
};
};


#ifdef CONFIG_SND_HDA_I915
#define codec_has_acomp(codec) \
#define codec_has_acomp(codec) \
	((codec)->bus->core.audio_component != NULL)
	((codec)->bus->core.audio_component != NULL)
#else
#define codec_has_acomp(codec)	false
#endif


struct hdmi_audio_infoframe {
struct hdmi_audio_infoframe {
	u8 type; /* 0x84 */
	u8 type; /* 0x84 */