summaryrefslogtreecommitdiff
path: root/lib/igt_aux.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@kernel.org>2022-04-13 10:26:48 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-05-18 11:51:45 +0200
commitbc200c9aa672552e6992634b4aaf93a99ce64da3 (patch)
treed50675b6224187ca14e5dbb6ae4606179fde70ee /lib/igt_aux.h
parent7c3ceb08b633a66f77f42e596593de394da5dccc (diff)
tests/core_hotunplug: properly finish processes using audio devices
Before unloading or unbinding an audio driver, all processes that are using it must be terminated. The current logic seeks only for alsactl, but ignore other processes, including pulseaudio. Make the logic more general, extending it to any processes that could have an open device under /dev/snd. It should be noticed that some distros like Fedora and openSUSE are now migrating from pulseaudio into pipewire-pulse. Right now, there's no standard distribution-agnostic way to request pipewire-pulse to stop using audio devices, but there's a new patch upstream that will make things easier: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/6ad6300ec657c88322a8cd6f3548261d3dc05359 Which should be available for pipewire-pulse versions 0.3.50 and upper. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r--lib/igt_aux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 2f7efd9c..fad1039a 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -325,6 +325,7 @@ bool igt_allow_unlimited_files(void);
int igt_is_process_running(const char *comm);
int igt_terminate_process(int sig, const char *comm);
void igt_lsof(const char *dpath);
+int igt_lsof_kill_audio_processes(void);
#define igt_hweight(x) \
__builtin_choose_expr(sizeof(x) == 8, \