I have a microphone that I connected via USB. When I do dmesg it shows

[37830.040274] usb 5-1: new full speed USB device using uhci_hcd and address 4

How do I find out what /dev/??? identifier has been associated with the device? I want to record something using XVidCap and need to set the microphone for it to work.

PS: I'm on Ubuntu 11.04

link|improve this question

Please migrate to unix.stackexchange.com – 9000 Jul 11 '11 at 18:09
feedback

migrated from stackoverflow.com Jul 11 '11 at 18:25

This question came from our site for professional and enthusiast programmers.

5 Answers

up vote 1 down vote accepted

You can always output ls /dev > devs.txt then connect your device, do it again ls /dev > devs2.txt then run a diff devs.txt devs2.txt and see what shows up.

link|improve this answer
Hmm.. I really like the idea. Very smart. Unfortunately they seem to be identical. – Frank Vilea Jul 11 '11 at 18:11
try find /dev instead - there are subdirectories. USB is in a subdirectory on one of the machines i use. – Tom Anderson Jul 11 '11 at 21:46
feedback

Could be worth poking around in /sys/bus/usb/devices/5-1/, but i can't immediately find a way to get from there to the name in /dev.

link|improve this answer
feedback

It is usually set up as /dev/dsp1 what do you see in yours? Also see if lsusb --verbose | less yields you any useful output. More detailed output may be present in /var/log/messages when you attached the USB device and your computer identified it.

link|improve this answer
That's an old OSS name and isn't relevant on a modern system with ALSA sound. – TomH Jul 11 '11 at 19:33
feedback

As Tom Anderson already mentioned, the information is available in /sys. There's /sys/bus/usb/devices//product /sys/bus/usb/devices//manufacturer

link|improve this answer
Thanks Andreas, I see the device in /sys/bus/usb/devices/5-1. Where can I obtain the /dev/ identifier from there? There is a file dev that has the number 189:516. Does this somehow help? – Frank Vilea Jul 11 '11 at 18:39
feedback

If linux has recognised it and is able to handle it then any devices would be under /dev/snd but you don't really want to be accessing the device directly on an ALSA based system.

Instead you should use the ALSA libaries and/or command line tools to access the device.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.