Commit 369166ac authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

udev ALSA: use vendor name if available

parent d54c2b59
...@@ -490,15 +490,17 @@ static char *alsa_get_name (struct udev_device *dev) ...@@ -490,15 +490,17 @@ static char *alsa_get_name (struct udev_device *dev)
static char *alsa_get_cat (struct udev_device *dev) static char *alsa_get_cat (struct udev_device *dev)
{ {
char *name; const char *vnd;
unsigned card, device;
if (alsa_get_device (dev, &card, &device)) dev = udev_device_get_parent (dev);
if (dev == NULL)
return NULL; return NULL;
if (asprintf (&name, _("Card %u"), card) == -1) vnd = udev_device_get_property_value (dev, "ID_VENDOR_FROM_DATABASE");
name = NULL; if (vnd == NULL)
return name; /* FIXME: USB may take time to settle... the parent device */
vnd = udev_device_get_property_value (dev, "ID_BUS");
return vnd ? strdup (vnd) : NULL;
} }
int OpenALSA (vlc_object_t *obj) int OpenALSA (vlc_object_t *obj)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment