Pi Zero W - trouble with a usb soundcard

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Posts: 1
Joined: Mon Oct 11, 2021 11:39 am

Pi Zero W - trouble with a usb soundcard

Post by newToDieting »

I'm running the most current DietPi version with all apt upgrades installed on Raspberry Pi Zero W.

I have a USB soundcard which run on Raspbian after these instructions: https://raspberrypi.stackexchange.com/q ... as-default.

I have used dietpi-config to set the card as the default audio device (the utility correctly sees the card whenever it's inserted and shows it as a plugged in device on the bottom at hw:1,0 as Device USB Audio)

However, afterwards the soundcard doesn't produce any sound.

aplay -l && arecord -l results in

Code: Select all

aplay: device_list:274: no soundcards found...
arecord: device_list:274: no soundcards found...
cat /proc/asound/cards shows

Code: Select all

1 [Device         ]: USB-Audio - USB PnP Sound Device
                      C-Media Electronics Inc. USB PnP Sound Device at usb-20980000.usb-1.2, full spe
cat /proc/asound/modules shows 1 snd_usb_audio

amixer -c 1 shows Invalid card number.

/usr/share/alsa/alsa.conf has defaults.ctl.card 1 and defaults.pcm.card 1

during the process of using dietpi-config to change the audio device an error shows up:

Code: Select all

[  OK  ] DietPi-Set_hardware | rm /var/lib/alsa/asound.state
alsa-lib parser.c:2179:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "USB-Audio" "USB Mixer" "USB8086:0808" "" ""
Hardware is initialized using a generic method
I have tried rebooting, cold booting, going through dietpi-config multiple times, but nothing seems to work.
User avatar
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: Pi Zero W - trouble with a usb soundcard

Post by MichaIng »

aplay -l shows "no soundcards found..." while at the same time cat /proc/asound/cards shows it? Those should use the exactly same information, so either both show it or both not. Can you replicate the same behaviour with both commands or is the connection probably flaky?

Do not touch /usr/share/alsa/alsa.conf, this is a defaults/fallback configuration and reverted on every ALSA package upgrade. dietpi-config set the default audio device via /etc/asound.conf, where you can tinker with or create an override .conf file in /etc/alsa/conf.d/ (create if missing).

After a reboot, as onboard audio should then be disabled, I'd actually expect the correct card number to be 0, as long as you do not have an KMS video driver enabled.

Please also check for kernel errors and related messages:

Code: Select all

dmesg -l emerg,alert,crit,err
dmesg | grep -E 'audio|sound|snd'
Post Reply