Page 1 of 1

Combined audio sink Analog + HDMI

Posted: Wed Oct 09, 2019 1:12 pm
by matzrm

working on pi4, I follow the instructions to have 3 devices card adding this inside config.txt:

Code: Select all

snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0
On reboot with aplay -l I can check that now I have three audio cards.

Now, with I setted the pulseaudio /etc/pulse/ in this way:

Code: Select all

load-module module-alsa-sink device=hw:2,0 sink_name=analog0
load-module module-alsa-sink device=hw:1,0 sink_name=hdmi1
load-module module-alsa-sink device=hw:0,0 sink_name=hdmi0
load-module module-combine-sink sink_name=combined slaves=analog0,hdmi0
set-default-sink combined

load-module module-native-protocol-unix auth-anonymous=1

using paplay foo.wav I can hear the sound only from HDMI.

What's the mistake?

Re: Combined audio sink Analog + HDMI

Posted: Wed Oct 09, 2019 2:17 pm
by matzrm
Also restoring the default pulseaudio configuration I can't play audio from analog device.

With paplay I get this

Code: Select all

sudo paplay -d alsa_output.platform-soc_audio.analog-mono.3 miniTurnixPI/audio/notify.wav

Failed to drain stream: Timeout

while with aplay (and pulseaudio stopped) I get:

Code: Select all

aplay -D hw:CARD=Headphones,DEV=0 miniTurnixPI/audio/notify.wav

Playing WAVE 'miniTurnixPI/audio/notify.wav' : Float 32 bit Little Endian, Rate 44100 Hz, Mono
aplay: set_params:1339: Sample format non available
Available formats:
- U8
- S16_LE