From 9b37dce4223aaf7a5f48b04b52c89b46ad97cf73 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 13 Jan 2010 19:41:44 +0100 Subject: udev: make sure we get events only for sound devices --- src/modules/module-udev-detect.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/module-udev-detect.c') diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c index 7508d9a7..58635a54 100644 --- a/src/modules/module-udev-detect.c +++ b/src/modules/module-udev-detect.c @@ -639,6 +639,11 @@ int pa__init(pa_module *m) { goto fail; } + if (udev_monitor_filter_add_match_subsystem_devtype(u->monitor, "sound", NULL) < 0) { + pa_log("Failed to subscribe to sound devices."); + goto fail; + } + errno = 0; if (udev_monitor_enable_receiving(u->monitor) < 0) { pa_log("Failed to enable monitor: %s", pa_cstrerror(errno)); -- cgit