[igt-dev] [PATCH i-g-t] lib/kmod: Unload snd_hdmi_lpe_audio

Ville Syrjala
2018-10-25T10:21:49Z

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Unload the snd_hdmi_lpe_audio module. Otherwise i915 can't be unloaded.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_kmod.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index b2f4f884b137..22c260210e3d 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -333,6 +333,17 @@ igt_i915_driver_unload(void)
}
}

+ if (igt_kmod_is_loaded("snd_hdmi_lpe_audio")) {
+ igt_terminate_process(SIGTERM, "alsactl");
+
+ if (igt_kmod_unload("snd_hdmi_lpe_audio", 0)) {
+ igt_warn("Could not unload snd_hdmi_lpe_audio\n");
+ igt_kmod_list_loaded();
+ igt_lsof("/dev/snd");
+ return IGT_EXIT_FAILURE;
+ }
+ }
+
/* gen5 */
if (igt_kmod_is_loaded("intel_ips"))
igt_kmod_unload("intel_ips", 0);
--
2.18.1