diff options
-rw-r--r-- | pciusb.c | 4 | ||||
-rw-r--r-- | usb.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -122,7 +122,9 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu p = buf + offset + 1; q = strchr(p, '\t'); } - e->module = strcmp(p, "unknown") ? strndup(p,q-p-1) : NULL; + if (!e->module || (e->module && strcmp(e->module, "snd-usb-audio"))) + e->module = strcmp(p, "unknown") ? strndup(p,q-p-1) : NULL; + ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/ e->text = strndup(q+2, strlen(q)-4); if (e->subvendor != 0xffff && e->subdevice != 0xffff && @@ -67,6 +67,9 @@ extern struct pciusb_entries usb_probe(void) { int class_, sub, prot = 0; if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class_, &sub, &prot) == 3) { e->class_ = (class_ * 0x100 + sub) * 0x100 + prot; + if (e->class_ == (0x1*0x100+ 0x01)) /* USB_AUDIO_CLASS*0x100 + USB_SUBCLASS_AUDIO_CONTROL*/ + e->module = "snd-usb-audio"; + } else { fprintf(stderr, "%s %d: unknown ``I'' line\n", proc_usb_path, line); } |