I am trying to do Alexa on raspberry pi. Before I do that, I need to get my speaker and microphone working. Try to keep it simple, I am trying to avoid pulseaudio and stick with ALSA.

So, the speaker is something i plug into the audio jack, and i bought a tiny usb microphone from Amazon for my microphone need.

And here is first strange thing I encounter. When I type "lsusb" the usb microphone is not listed:

Bus 001 Device 004: ID 8086:0808 Intel Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC9512/9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

but when I do dmesg, the hardware does show up:

[    2.308856] usb 1-1.3: New USB device found, idVendor=8086, idProduct=0808
[    2.308877] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.308889] usb 1-1.3: Product: USB PnP Sound Device
[    2.308901] usb 1-1.3: Manufacturer: C-Media Electronics Inc.      
[    2.322012] input: C-Media Electronics Inc.       USB PnP Sound Device as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.2/0003:8086:0808.0001/input/input0
[    2.391718] hid-generic 0003:8086:0808.0001: input,hidraw0: USB HID v1.00 Device [C-Media Electronics Inc.       USB PnP Sound Device] on usb-20980000.usb-1.3/input2

and when i look at /proc/asound/cards

@raspberrypi:~ $ cat /proc/asound/cards
 0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 1 [Device         ]: USB-Audio - USB PnP Sound Device
                      C-Media Electronics Inc. USB PnP Sound Device at usb-20980000.usb-1.3, full spe

aplay-l 's output:

@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and arecord -l also show that the hardware exists

@raspberrypi:~ $ arecord -l **** List of CAPTURE Hardware Devices **** card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0

my problem is that doesn't matter how much i tried to tinker with .asoundrc file, I always encounter "device or resource busy" error when I tried to make microphone to record something:

@raspberrypi:~ $ arecord hello.wav
arecord: main:722: audio open error: Device or resource busy

any idea on how to fix it?

Thanks in advance

  • Any error message in the system log after that arecord error? – CL. Oct 9 '17 at 6:45
  • no error. I end up just clean installed everything and everything "worked" in the sense that arecord shows "1/1" in subdevices and i can record things in arecord. I suspect i messed it up by installing pulseaudio manually. despite i make uninsalled everything, i couldn't restore the status to original states as far as ALSA cards is concerned – Harvey King Oct 11 '17 at 22:54

The device does show up, but it's disguised as

Bus 001 Device 004: ID 8086:0808 Intel Corp. 

(at least that's what happened to me, try running lsusb with and without the dongle plugged in) No idea why they would do that, but it seemed weird seeing an intel device on a raspberry pi. Perhaps they want the system to load the generic drivers for that intel device?

Anyway, it seems to work after being set to default in the rpi default audio device configuration utility AND disbling all the other devices in pavucontrol.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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