udev: make sure we get events only for sound devices

This commit is contained in:
Lennart Poettering 2010-01-13 19:41:44 +01:00 committed by Colin Guthrie
parent f732c23d95
commit ce7bd05ca5

View file

@ -639,6 +639,11 @@ int pa__init(pa_module *m) {
goto fail; 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; errno = 0;
if (udev_monitor_enable_receiving(u->monitor) < 0) { if (udev_monitor_enable_receiving(u->monitor) < 0) {
pa_log("Failed to enable monitor: %s", pa_cstrerror(errno)); pa_log("Failed to enable monitor: %s", pa_cstrerror(errno));