What is a correct
Our goal is to get ALSA to output some 8 channel wav files as purely and directly as possible to the HDMI audio output, so that a connected 7.1 surround sound system can play the audio correctly. We do not want any software mixing or processing, when possible. For many reasons, we are sticking to directly using ALSA, neither Pipewire nor PulseAudio are installed at all.
It is easy to get the audio to output to two channel audio by simply setting the
Where we're stuck is configuring ALSA to output to 8 channels, it seems to be stuck in 2 channels. Once that works, we also need to remap to output to the correct channels. We have tried a few different configurations, but none of them seem to work. I believe this is sort of what we need:
Problems:
Other potentially relevant information:
Can you help with the correct configuration for this? Thank you!
/etc/asound.conf
for an hdmi audio output that needs to 1) output as 7.1 surround sound and 2) allows remapping the output channels?Our goal is to get ALSA to output some 8 channel wav files as purely and directly as possible to the HDMI audio output, so that a connected 7.1 surround sound system can play the audio correctly. We do not want any software mixing or processing, when possible. For many reasons, we are sticking to directly using ALSA, neither Pipewire nor PulseAudio are installed at all.
It is easy to get the audio to output to two channel audio by simply setting the
slave.pcm
to hw:0,3
in the pcm.!default
section of the asound.conf.Where we're stuck is configuring ALSA to output to 8 channels, it seems to be stuck in 2 channels. Once that works, we also need to remap to output to the correct channels. We have tried a few different configurations, but none of them seem to work. I believe this is sort of what we need:
Code:
pcm.surround71 {
type route
slave {
pcm "hw:0,3"
channels 8
# for some reason, can't use period_size, rate, etc. here?
}
ttable {
0.0 1
1.1 1
2.4 1
3.5 1
4.2 1
5.3 1
6.6 1
7.7 1
}
}
# Increase buffer size and period to prevent audio "pausing" we were experiencing.
# Not confident it's strictly needed, but it seems to be to get consistent high quality
# audio output.
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,3"
channels 8
periods 4
# period_time 128000
period_size 2048
buffer_size 8192
rate 44100
}
}
# don't know what to do for this part, how do we combine them (or whatever)?
pcm.!default {
type plug
# slave.pcm surround71 # does not work
# slave.pcm dmixer # works but only outputs to 2 channels
slave.pcm "somehow combine the dmixer and the surround71 I think" # profit?
}
Problems:
- When testing
surround71
in the kiosk-mode browsersurround71
, we don't get any audio, but the browser acts like it's playing - When testing
surround71
usingspeaker-test -c8
to try to force 8 channels, it complains that the channel count is not valid, so the configuration doesn't seem to be picking up the "channels 8" or something.
Other potentially relevant information:
- This is for a simple "wall panel" on an Intel NUC running a docker compose setup. The audio service is an alpine base. Fairly certain the container-based setup is not related to the problem as we've done hours of testing to isolate the problem, but you never know
- We have 8 channel wav and flac files that output correctly to 7.1 - we have verified that the audio files themselves work correctly on a standard surround setup.
- Intel NUC audio device is
hdmi:0,3
,Tiger Lake-LP Smart Sound Technology Audio Controller
(product id0xa0c8
). This verifiably outputs HDMI and surround 7.1 audio, as booting into an Ubuntu Live USB, configuring for 7.1, and playing our audio files works correctly.
Can you help with the correct configuration for this? Thank you!
Last edited: