ALSA no dmix device

This forum is for discussion about general software issues.

ALSA no dmix device

Postby MrMuesli » Fri Feb 10, 2023 10:28 am

Hi there,

I'm unable to get dmix working on a pure ALSA setup. As far as I understand the Arch Wiki and the Alsa Documentation itself, a dmix device should be created out of the box, but aplay just lists my soundcard:

$this->bbcode_second_pass_code('', '$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 [HiFiBerry DAC+ HiFi pcm512x-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
')

$this->bbcode_second_pass_code('', 'aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dacplus, HiFiBerry DAC+ HiFi pcm512x-hifi-0
Default Audio Device
')

I've tried adding a system wide asound.conf with the following settings:

$this->bbcode_second_pass_code('', 'pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0666

slave {
pcm "hw:0"
channels 2
}
}

ctl.dmixer {
type hw
card 0
device 0
}
')

A dmix device still isn't created. alsactl restore gives the following error:

$this->bbcode_second_pass_code('', '
alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
')

Using an older guide on the HifiBerry Website as base I've also added
$this->bbcode_second_pass_code('', '
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
')
to my config.txt, to no avail.

Kernel: 6.1.10-2-rpi-ARCH
alsa-lib: 6.1.10-2-rpi-ARCH

If you have any pointers or suggestions, I'd be happy to hear them!
MrMuesli
 
Posts: 3
Joined: Fri Feb 10, 2023 10:07 am

Re: ALSA no dmix device

Postby solskogen » Fri Feb 10, 2023 10:39 am

Does it help if you install pulseaudio (and reboot)?
solskogen
 
Posts: 215
Joined: Mon Nov 18, 2013 10:41 am

Re: ALSA no dmix device

Postby MrMuesli » Fri Feb 10, 2023 7:31 pm

Yeah, I thought about skipping PulseAudio and going the PipeWire route, but damn is that a badly documented project. I guess I'll give PulseAudio a try.
MrMuesli
 
Posts: 3
Joined: Fri Feb 10, 2023 10:07 am

Re: ALSA no dmix device

Postby graysky » Fri Feb 10, 2023 8:48 pm

I could be wrong but I believe there is a setting you can enabled in /boot/config.txt for this. Check the README or search...
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: ALSA no dmix device

Postby MrMuesli » Sat Feb 11, 2023 10:13 am

That would be:

$this->bbcode_second_pass_code('', 'dtoverlay=i2s-mmap')
But according to upstream this particular property seems to be out of date since 2017. For posterity's sake I've tried enabling it nonethess without success. I've activated

$this->bbcode_second_pass_code('', 'dtparam=i2s=on')
instead.

My hunch is a kernel regression or some buggy firmware. I got it semi-working with PulseAudio, but I'd really prefer to use ALSA directly without the overhead. So I'll try switching to aarch64 first and if that doesn't work, downgrading the kernel.
MrMuesli
 
Posts: 3
Joined: Fri Feb 10, 2023 10:07 am


Return to General

Who is online

Users browsing this forum: No registered users and 27 guests