Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined function error for snd_hda_device_is_hdmi #4671

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

charleskeepax
Copy link

As snd_hda_device_is_hdmi is now used in hdac_hda.c an additional select is required to ensure the function is built into the kernel.

Fixes: 9c0dfcd ("ASoC: hdac_hda: Conditionally register dais for HDMI and Analog")

@charleskeepax
Copy link
Author

Hm... this does seem to result in a bunch of HDA stuff getting plopped into the components string for the card, which I am not sure if that is intentional. Perhaps this needs further investigation, but I guess at least to report the patch linked in the fixes tag does cause build failures with certain Kconfigs.

plbossart
plbossart previously approved these changes Oct 27, 2023
@ujfalusi
Copy link
Collaborator

ujfalusi commented Oct 27, 2023

I wonder why 5762a2e is not doing it's thing? I have encountered the compilation issue and fixed it with the
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) in the header.

It should compile, strange.

@charleskeepax
Copy link
Author

Yeah that patch does appear to fix the issue I think that must have been some weird build caching or something on my side, closing.

@charleskeepax
Copy link
Author

Apologies, it seems my testing last week was off (accidentally still had my fix in the tree), that patch doesn't fix the problem. The problem is that the Kconfig symbol used in the ifdef is not the one that gates the building of function. Incoming patch to fix.

@charleskeepax charleskeepax reopened this Oct 30, 2023
@charleskeepax charleskeepax changed the title ASoC: hdac_hda: Add missing select for HDA_CODEC_HDMI Fix undefined function error for snd_hda_device_is_hdmi Oct 30, 2023
@ujfalusi
Copy link
Collaborator

ujfalusi commented Oct 30, 2023

Apologies, it seems my testing last week was off (accidentally still had my fix in the tree), that patch doesn't fix the problem. The problem is that the Kconfig symbol used in the ifdef is not the one that gates the building of function. Incoming patch to fix.

Right, it should be CONFIG_SND_HDA_CODEC_HDMI, I have no idea how it was swapped...

If you do the update, can you please use fixup! ALSA: hda/hdmi: Add helper function to check if a device is HDMI codec as commit title so we can squash it before sending the patch upstream?

Copy link
Collaborator

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charleskeepax, can you change the commit title to
fixup! ALSA: hda/hdmi: Add helper function to check if a device is HDMI codec

I'm absolutely certain that I had CONFIG_SND_HDA_CODEC_HDMI when I tested this to fix the compile error, but the applied patch says otherwise.

@charleskeepax
Copy link
Author

Yeah no problem will update the title.

…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]>
@plbossart plbossart merged commit 31685a6 into thesofproject:topic/sof-dev Oct 30, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants