My configuration:
Raspberry Pi 3B (Linux raspberrypi 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7l GNU/Linux)
----------------------------------------
aplay-l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 [HifiBerry Digi HiFi wm8804-spdif-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
------------------
cat /etc/asound.conf
pcm.hifiberry {
type hw card 0
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hifiberry"
channels 2
}
}
ctl.dmixer {
type hw
card 0
}
--------------------
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
iec958
IEC958 (S/PDIF) Digital Audio Output
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
hifiberry
default
dmixer
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi, HifiBerry Digi HiFi wm8804-spdif-0
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi, HifiBerry Digi HiFi wm8804-spdif-0
Hardware device with all software conversions
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_digi, HifiBerry Digi HiFi wm8804-spdif-0
Default Audio Device
iec958:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi, HifiBerry Digi HiFi wm8804-spdif-0
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi, HifiBerry Digi HiFi wm8804-spdif-0
Direct sample mixing device
usbstream:CARD=sndrpihifiberry
snd_rpi_hifiberry_digi
USB Stream Output
------------------
/boot/config.txt
[all]
dtoverlay=hifiberry-digi
dtoverlay=i2s-mmap
Problem:
aplay -D dmixer /usr/share/sounds/alsa/Front_Right.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1349: Channels count non available
aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Right.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1349: Channels count non available
Also, I can't play from multiple sources at the same time. What may be the problem?