[pulseaudio-discuss] Problems with splitting surround sound signal and sending over network
Christian Glodt
chris at mind.lu
Mon Jun 6 09:20:52 UTC 2016
Hi,
I'm trying to do the following with a 7.1 surround sound signal:
- play the front-center channel on the left and right channels of a HDMI
output
- stream the 6 {front,side,rear}-{left,right} channels to another system
- (I'm ignoring the lfe channel for now)
The hardware setup is this:
- A Micro-PC running Kodi connected to a TV (which will also act as
center speaker).
- A server system hooked up to audio outputs and amplifiers that drive 6
ceiling-mounted speakers.
I will call the Micro-PC "Client", and the Server "Server" in the
following description.
Please note that the server system plays audio fine on the speakers
using MPD. I'm also not too concerned with the exact channel mappings at
the moment.
I'm running Ubuntu 16.04 on both systems (Pulseaudio package version
1:8.0-0ubuntu3).
I've tried several different approaches to achieve the streaming of the
6 channels from the client to the server system. None of them work so
far, in fact I mostly get failed assertions.
I'd be very glad if someone could point me in the right direction.
Thanks,
Christian Glodt
Here are the details:
Approach 1: tunnel-sink-new + combine-sink
##########################################
In this approach I try the obvious: a remapping, a tunnel-sink and a
combine-sink.
# Server-side configuration (6-channel sink, working fine on server):
load-module module-remap-sink sink_name=living remix=yes
master=alsa_output.USB-Audio-1.analog-surround-71 channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
master_channel_map=front-left,front
-right,side-left,side-right,rear-left,rear-right
sink_properties=device.description=LivingRoom
# Client-side configuration:
load-module module-remap-sink sink_name=hdmi remix=yes channels=2
master=alsa_output.pci-0000_00_1b.0.hdmi-stereo
channel_map=front-center,front-center master_channel_map=left,right
sink_properties=device.description=HDMI-Center-Speaker
load-module module-tunnel-sink-new sink_name=ceiling server=server
sink=living channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
load-module module-combine-sink sink_name=surround slaves=hdmi,ceiling
channels=8
channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
# Result on client:
[tunnel-sink] rtpoll.c: Assertion 'p' failed at pulsecore/rtpoll.c:578,
function pa_rtpoll_item_new_asyncmsgq_read(). Aborting.
Approach 2: null-sink + tunnel-sink-new + loopbacks
###################################################
In this approach I make a null-sink and use loopbacks to connect the
HDMI output and the tunnel-sink to it.
# Server-side configuration (6-channel sink, working fine on server):
load-module module-remap-sink sink_name=living remix=yes
master=alsa_output.USB-Audio-1.analog-surround-71 channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
master_channel_map=front-left,front
-right,side-left,side-right,rear-left,rear-right
sink_properties=device.description=LivingRoom
# Client-side configuration (Kodi plays on 'surround' sink):
load-module module-null-sink sink_name=surround channels=8
channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
load-module module-remap-sink sink_name=hdmi remix=yes channels=2
master=alsa_output.pci-0000_00_1b.0.hdmi-stereo
channel_map=front-center,front-center master_channel_map=left,right
sink_properties=device.description=HDMI-Center-Speaker
load-module module-tunnel-sink-new sink_name=ceiling server=server
sink=living channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
load-module module-loopback source=surround.monitor
sink=alsa_output.pci-0000_00_1b.0.hdmi-stereo channels=2
channel_map=front-center,front-center
load-module module-loopback source=surround.monitor sink=ceiling
channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
# Result on client (same as before):
rtpoll.c: Assertion 'p' failed at pulsecore/rtpoll.c:578, function
pa_rtpoll_item_new_asyncmsgq_read(). Aborting.
Approach 3: null-sink + tunnel-source-new + loopback
####################################################
I read somewhere that I should try a tunnel-source on the server
instead. I use a loopback to connect the tunnel-source to the server's
speaker sink.
Please take note that this does actually play the center channel
correctly on the client side's HDMI output. This time the server-side
fails with an assertion.
# Server-side configuration:
load-module module-remap-sink sink_name=living remix=yes
master=alsa_output.USB-Audio-1.analog-surround-71 channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
master_channel_map=front-left,front
-right,side-left,side-right,rear-left,rear-right
sink_properties=device.description=LivingRoom
load-module module-tunnel-source-new source_name=tv-surround
server=tv-pc-living source=surround.monitor channels=8
channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
load-module module-loopback source=tv-surround sink=living channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
# Client-side configuration:
load-module module-null-sink sink_name=surround channels=8
channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
load-module module-remap-sink sink_name=hdmi remix=yes channels=2
master=alsa_output.pci-0000_00_1b.0.hdmi-stereo
channel_map=front-center,front-center master_channel_map=left,right
sink_properties=device.description=HDMI-Center-Speaker
load-module module-loopback source=surround.monitor
sink=alsa_output.pci-0000_00_1b.0.hdmi-stereo channels=2
channel_map=front-center,front-center
# Result on server:
rtpoll.c: Assertion 'p' failed at pulsecore/rtpoll.c:613, function
pa_rtpoll_item_new_asyncmsgq_write(). Aborting.
Approach 4: null-sink + rtp-send + rtp-recv
###########################################
In this approach I try to use RTP instead of a native Pulseaudio
connection. I get a different assertion failure on the server.
# Server-side configuration:
load-module module-remap-sink sink_name=living remix=yes
master=alsa_output.USB-Audio-1.analog-surround-71 channels=6
channel_map=front-left,front-right,side-left,side-right,rear-left,rear-right
master_channel_map=front-left,front
-right,side-left,side-right,rear-left,rear-right
sink_properties=device.description=LivingRoom
load-module module-rtp-recv sink=living
# Client-side configuration:
load-module module-null-sink sink_name=surround channels=8
channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
load-module module-remap-sink sink_name=hdmi remix=yes channels=2
master=alsa_output.pci-0000_00_1b.0.hdmi-stereo
channel_map=front-center,front-center master_channel_map=left,right
sink_properties=device.description=HDMI-Center-Speaker
load-module module-loopback source=surround.monitor
sink=alsa_output.pci-0000_00_1b.0.hdmi-stereo channels=2
channel_map=front-center,front-center
load-module module-rtp-send source=surround.monitor
# Result on server
E: [alsa-sink-USB Audio] memblockq.c: Assertion 'uchunk->index %
bq->base == 0' failed at pulsecore/memblockq.c:289, function
pa_memblockq_push(). Aborting.
More information about the pulseaudio-discuss
mailing list