Skip to content

Commit

Permalink
fixup! ALSA: hda/hdmi: Add helper function to check if a device is HD…
Browse files Browse the repository at this point in the history
…MI codec

Whether patch_hdmi.c is build into the kernel is controlled by
SND_HDA_CODEC_HDMI, not SND_SOC_SOF_HDA_AUDIO_CODEC, update the if def
to check this symbol to avoid undefined function issues:

ERROR: modpost: "snd_hda_device_is_hdmi" [sound/soc/codecs/snd-soc-hdac-hda.ko] undefined!

Fixes: 5762a2e ("ALSA: hda/hdmi: Add helper function to check if a device is HDMI codec")
Signed-off-by: Charles Keepax <[email protected]>
  • Loading branch information
charleskeepax authored and plbossart committed Oct 30, 2023
1 parent 7ee6471 commit 31685a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/sound/hdaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ bool snd_hdac_check_power_state(struct hdac_device *hdac,
unsigned int snd_hdac_sync_power_state(struct hdac_device *hdac,
hda_nid_t nid, unsigned int target_state);

#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI)
bool snd_hda_device_is_hdmi(struct hdac_device *hdev);
#else
static inline bool snd_hda_device_is_hdmi(struct hdac_device *hdev)
Expand Down

0 comments on commit 31685a6

Please sign in to comment.