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

ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module #5245

Open
wants to merge 1 commit into
base: topic/sof-dev
Choose a base branch
from

Conversation

terry182
Copy link

In enviornment without KMOD requesting module may fail to load snd-hda-codec-hdmi, resulting in HDMI audio not usable. Add softdep to loading HDMI codec module first to ensure we can load it correctly.

In enviornment without KMOD requesting module may fail to load
snd-hda-codec-hdmi, resulting in HDMI audio not usable.
Add softdep to loading HDMI codec module first to ensure we can load it
correctly.

Signed-off-by: Terry Cheong <[email protected]>
@terry182 terry182 requested a review from bardliao as a code owner November 19, 2024 01:49
@@ -263,6 +263,7 @@ int hda_codec_i915_exit(struct snd_sof_dev *sdev)
}
EXPORT_SYMBOL_NS(hda_codec_i915_exit, SND_SOC_SOF_HDA_AUDIO_CODEC_I915);

MODULE_SOFTDEP("pre: snd-hda-codec-hdmi");
Copy link
Collaborator

Choose a reason for hiding this comment

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

In such environment I think this should be handled by a conf file in /etc/modprobe.d with content

options snd_sof_intel_hda softdep pre: snd-hda-codec-hdmi

Btw, what does "In environment without KMOD requesting module may fail to load snd-hda-codec-hdmi" means in practice? What kind of environment is this refers to? Can you detail the issue?

Copy link
Author

Choose a reason for hiding this comment

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

In such environment I think this should be handled by a conf file in /etc/modprobe.d with content

I would argue this is more ideal. If I understand correctly, when CONFIG_SND_HDA_CODEC_HDMI is enabled, during init the driver should always try to probe snd-hda-codec-hdmi through request_codec_module. Adding softdep behind the gated part is correctly stating the soft dependency. Just my 2 cents.

Is there anything I am missing here that could break things?

What kind of environment is this refers to? Can you detail the issue?

In Android environment, kernel module request is blocked as a whole by SELinux. i.e. request_module will always get blocked by SELinux.

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.

4 participants