From a1c36775940216eba70f3268119c39ee0d981ed6 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 5 Apr 2024 17:09:31 -0700 Subject: [PATCH] sof_remove: unload `snd_sof_intel_hda_common` before `soundwire_intel` 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 65951c4d0 ("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 https://github.com/thesofproject/sof-test/pull/1156 for more info. --- tools/kmod/sof_remove.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kmod/sof_remove.sh b/tools/kmod/sof_remove.sh index b7e30d48..2f56226f 100755 --- a/tools/kmod/sof_remove.sh +++ b/tools/kmod/sof_remove.sh @@ -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 #------------------------------------------- # SoundWire/SOF parts @@ -133,7 +134,6 @@ remove_module snd_sof_intel_hda_sdw_bpt #------------------------------------------- # platform drivers - take2 #------------------------------------------- -remove_module snd_sof_intel_hda_common remove_module snd_sof_intel_hda remove_module snd_sof_intel_ipc remove_module snd_sof_xtensa_dsp