1

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

1

6 Answers 6

2

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.

2
  • Hmm.. I really like the idea. Very smart. Unfortunately they seem to be identical. Jul 11, 2011 at 18:11
  • 1
    try find /dev instead - there are subdirectories. USB is in a subdirectory on one of the machines i use. Jul 11, 2011 at 21:46
1

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.

1

#lsblk

Sample Output:

sda      8:0    1   7.3G  0 disk
ââsda1   8:1    1   243M  0 part
ââsda2   8:2    1     1K  0 part
ââsda5   8:5    1     7G  0 part /
sdd      8:48   0   1.8T  0 disk
ââsdd1   8:49   0   1.8T  0 part
0

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.

1
  • That's an old OSS name and isn't relevant on a modern system with ALSA sound.
    – TomH
    Jul 11, 2011 at 19:33
0

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

1
  • 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? Jul 11, 2011 at 18:39
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .