mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
udev: make sure we get events only for sound devices
This commit is contained in:
parent
f732c23d95
commit
ce7bd05ca5
1 changed files with 5 additions and 0 deletions
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue