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

sof_remove: unload snd_sof_intel_hda_common before soundwire_intel #1182

Merged
merged 1 commit into from
May 1, 2024

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Apr 25, 2024

Fixes this failure with older kernel like the 6.5 kernels distributed by Ubuntu:

 ERROR: Module soundwire_intel is in use by: snd_sof_intel_hda_common

Fixes commit 65951c4 ("kmod: fix hda-sdw-bpt dependency") which unloaded all soundwire drivers earlier as a block. This is not a problem with 6.9-ish kernels where snd_sof_intel_hda_common and soundwire_intel can apparently be unloaded in any order but it is a problem with older kernels.

So, unload snd_sof_intel_hda_common before soundwire modules to be compatible with any kernel.

See #1156 for more info.

@marc-hb marc-hb marked this pull request as ready for review April 26, 2024 00:32
@marc-hb marc-hb requested review from plbossart and a team as code owners April 26, 2024 00:32
@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 26, 2024

Known ALSABAT failure in https://sof-ci.01.org/softestpr/PR1182/build356/devicetest/index.html

Everything else green.

@@ -120,6 +120,7 @@ remove_module snd_soc_hda_codec
# platform drivers
#-------------------------------------------
remove_module snd_sof_intel_hda_generic
remove_module snd_sof_intel_hda_common
Copy link
Member

Choose a reason for hiding this comment

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

I am pretty sure this does not work if you have snd_sof_intel_hda_sdw_bpt in use.

See thesofproject/linux@af779a3#diff-117faa254cc1264b915358fff9c601a8b15e7545c3, the BPT stuff depends on the hda_common stuff.

so if you want to deal with older kernels, you can add this line and ignore errors, and keep it line 136 where it was.

Fixes this failure with older kernel like the 6.5 kernels distributed by
Ubuntu:

 ERROR: Module soundwire_intel is in use by: snd_sof_intel_hda_common

Fixes commit 65951c4 ("kmod: fix hda-sdw-bpt dependency") which
unloaded all soundwire drivers earlier as a block. This is not a problem
with 6.9-ish kernels where snd_sof_intel_hda_common and soundwire_intel
can apparently be unloaded in any order but it is a problem with older
kernels.

So, unload `snd_sof_intel_hda_common` before soundwire modules to be
compatible with any kernel.

See thesofproject#1156 for more info.
@marc-hb marc-hb force-pushed the hda-common-before-sdw branch from a1c3677 to 15e83e4 Compare April 30, 2024 21:49
@marc-hb
Copy link
Collaborator Author

marc-hb commented May 1, 2024

Pretty bad looking but isolated and unrelated crash of ba-lnlm-rvp-sdw-01 in https://sof-ci.01.org/softestpr/PR1182/build370/devicetest/index.html?model=LNLM_SDW_AIOC&testcase=multiple-pause-resume-50

Everything else 100% green.

@marc-hb marc-hb merged commit 47af510 into thesofproject:main May 1, 2024
6 of 7 checks passed
@marc-hb marc-hb deleted the hda-common-before-sdw branch May 1, 2024 00:16
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.

2 participants