sodcalculator

10 Tech How-To

Raspberry Pi USB Microphone Not Detected: Fix It

Guide 10-43987 · Updated · Step by step

If your Raspberry Pi isn’t detecting a USB microphone, the problem is almost always a software configuration issue, not a hardware failure. This guide walks you through the exact commands and steps to find the device, fix common detection issues, and get your mic working on Raspberry Pi OS (Bookworm and earlier).

Why USB Mics Fail on Raspberry Pi

The Raspberry Pi runs a Linux-based operating system, and USB audio devices are handled by the kernel’s ALSA (Advanced Linux Sound Architecture) subsystem. When you plug in a microphone, the system should create a new ALSA device node. If it doesn’t appear, the causes usually fall into one of these categories:

  • Power issues: The Pi’s USB ports can’t supply enough current for some microphones, especially older models or those with built-in LED rings.
  • Driver conflicts: The default USB audio driver may not match your mic’s chipset, or another driver has claimed the device.
  • Configuration errors: The mic is detected by the kernel but not set as the default input device, so applications still use the built-in (or non-existent) sound card.
  • Hardware incompatibility: Some cheap USB mics use chipsets that are not fully supported by the Linux kernel.

Step 1: Check If the Pi Sees the Device

Open a terminal and run the following command to list all USB devices:

lsusb

Look for an entry with a name like “USB Audio Device” or the manufacturer of your microphone. If you see it, the hardware is connected and powered. If not, try a different USB port, a powered USB hub, or a different cable.

Next, check if ALSA recognizes it as an audio device:

arecord -l

This lists all capture (recording) devices. If your mic appears here, it’s ready to use. If you get an error like no soundcards found, the kernel hasn’t loaded the right driver.

Step 2: Identify the Card and Device Number

If your mic appears in arecord -l, you’ll see output like:

card 1: Microphone [USB Microphone], device 0: USB Audio [USB Audio]

Here, card 1 and device 0 are the identifiers you need. You can test recording directly using:

arecord -D plughw:1,0 -d 5 test.wav

This records 5 seconds from card 1, device 0. Play it back with aplay test.wav to verify it works. If you hear your voice, the mic is functional—you just need to make it the default.

Step 3: Set the Default Input Device

To make your USB mic the default for all applications, you need to edit the ALSA configuration file. Create or edit ~/.asoundrc (or /etc/asound.conf for system-wide changes):

nano ~/.asoundrc

Add the following, replacing 1 with your card number and 0 with your device number:

pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
}

Save the file and restart the ALSA service or reboot. After this, arecord -d 5 test.wav should use your USB mic by default.

Step 4: Fix Driver and Power Issues

If lsusb shows the device but arecord -l doesn’t, the kernel driver may not be loading. Try these fixes in order:

  1. Reboot with the mic plugged in—some drivers load only at boot.
  2. Update the kernel and firmware: sudo apt update && sudo apt upgrade and then sudo rpi-update (use with caution).
  3. Add the device to the snd-usb-audio module’s ignore list if it’s being claimed by another driver. Check with dmesg | grep audio for clues.
  4. Use a powered USB hub—many USB mics draw more than 100mA, and the Pi’s USB ports may not provide enough stable power.
  5. Try a different USB port—on the Pi 4 and 5, the blue ports are USB 3.0 and provide more power.

Step 5: Test with Applications

Once the mic is set as default, test it in your target application. For video calls, check the audio settings in the app—some apps (like Zoom or Teams) have their own device selection. For Python projects using PyAudio, you may need to specify the device index explicitly. Use python3 -c "import pyaudio; p=pyaudio.PyAudio(); print(p.get_default_input_device_info())" to verify.

If the mic still isn’t working, check the input volume with alsamixer. Press F4 to view capture devices, then use the arrow keys to raise the mic level. Make sure it’s not muted (MM at the bottom means muted—press M to unmute).

Common Problems and Misconceptions

  • “My mic works on Windows but not on Pi”—This is normal. Windows has different drivers, and the Linux kernel may not support the chipset. Check the chipset name in lsusb and search for known issues.
  • “I plugged it in and it should just work”—Most USB mics do work out of the box, but the default input device is often the HDMI audio or the headphone jack, so you must change the default.
  • “The mic has a mute button but no sound”—The mute button on the mic itself may not be recognized by ALSA. Use alsamixer to unmute at the software level.
  • “I’m using a USB hub and it still doesn’t work”—Make sure the hub is powered (has its own power adapter), not a passive hub.

Frequently Asked Questions

How do I know if my USB mic is compatible with Raspberry Pi?

Check the chipset using lsusb. Common compatible chipsets include C-Media (e.g., CM108) and Realtek. If you see an unknown vendor/product ID, search for it online. Most generic “USB Audio Device” mics work fine.

Why does my mic show up but there’s no sound in recordings?

This is usually a volume issue. Run alsamixer, press F4, and ensure the capture volume is turned up and not muted. Also check that the correct input device is selected in your recording app.

Can I use a USB microphone with a USB hub?

Yes, but use a powered hub if the mic draws more power than the Pi’s port provides. A passive hub may cause intermittent detection or no detection at all.

What is the difference between arecord and parecord?

arecord is part of ALSA and works directly with the kernel. parecord is for PulseAudio, a sound server that sits on top of ALSA. If your system uses PipeWire (newer Raspberry Pi OS), you may need to use pw-record or check the PipeWire configuration.

How do I make the USB mic the default for all users?

Edit /etc/asound.conf instead of ~/.asoundrc. This applies the configuration system-wide, so all users and services use the USB mic by default.

My mic worked before but stopped after an update—what happened?

Kernel updates can change the order of sound cards or introduce new drivers. Re-run arecord -l to see if the card number changed, and update your ~/.asoundrc accordingly. If the device is missing entirely, check dmesg for errors and consider rolling back the update.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →