[kwlug-disc] USB Microphone not working on Linux

Khalid Baheyeldin kb at 2bits.com
Sun May 7 22:08:09 EDT 2017


I want to record something on my laptop (audio only).

I plugged in an external headphones, and I can record using:

$ arecord -t wav -f cd | lame - out.mp3

And play it back successfully using:

$ lame --mp3input --decode out.mp3 - | aplay

Lame is just used to compress the audio stream.

But when I plug in a USB microphone, it does not become the default device,
nor does it work when explicitly specified on the arecord command line:

$ arecord -t wav -f cd -D hw:1,0 | lame - out.mp3

arecord: main:722: audio open error: Device or resource busy

When checking which process has this device open, it turns out to be
pulseaudio itself:

$ fuser /dev/snd/controlC1
/dev/snd/controlC1:  23708

$ ps -ef | grep 23708
kbahey   23708  1987  0 20:08 ?        00:00:28 /usr/bin/pulseaudio --start
--log-target=syslog

All this is despite Linux recognizing the device:

[28358.940193] usb 6-2: new full-speed USB device number 5 using uhci_hcd
[28359.135232] usb 6-2: New USB device found, idVendor=046d, idProduct=0a03
[28359.135241] usb 6-2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[28359.135246] usb 6-2: Product: Logitech USB Microphone
[28359.135250] usb 6-2: Manufacturer: Logitech

And in pavucontrol, the microphone is shown, and the blue bar shows that it
is picking up sound when I speak near it, or when I type on the keyboard.

I could forsake the command line and use Audacity, but there is no way to
configure the USB mic in it. Under Preferences -> Devices -> Recording, the
options are only 'default' and 'pulse'. That is all.

I searched online, but nothing helped.

Any help appreciated.
-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20170507/0896e087/attachment.htm>


More information about the kwlug-disc mailing list