From: RĂ©mi Denis-Courmont Date: Sat, 13 Feb 2010 20:37:37 +0000 (+0200) Subject: udev ALSA: don't be reliant on device node path, use kernel path X-Git-Tag: 1.1.0-ff~89 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=26b5b697bd055842e538438d4a128be113148c6b;p=vlc udev ALSA: don't be reliant on device node path, use kernel path --- diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c index 7168684b4c..c65c771e85 100644 --- a/modules/services_discovery/udev.c +++ b/modules/services_discovery/udev.c @@ -439,12 +439,13 @@ int OpenV4L (vlc_object_t *obj) static int alsa_get_device (struct udev_device *dev, unsigned *restrict pcard, unsigned *restrict pdevice) { - const char *node = udev_device_get_devnode (dev); + const char *node = udev_device_get_devpath (dev); char type; + node = strrchr (node, '/'); if (node == NULL) return -1; - if (sscanf (node, "/dev/snd/pcmC%uD%u%c", pcard, pdevice, &type) < 3) + if (sscanf (node, "/pcmC%uD%u%c", pcard, pdevice, &type) < 3) return -1; if (type != 'c') return -1;