<div dir="ltr"><div><div><div><div><div>Hi Georg,<br><br></div>Thanks a lot for your help. <br></div>I tested your suggestion : instead of pushing the audio into a "tunnel-sink" on the source unit, I pull the audio from a "tunnel-source" on the destination unit. And it works !<br><br></div>On my source/main unit, I now only have null-sinks. I can do all the routing I want between them using module-loopback. <br></div>On the destination unit (raspberry PI), I now have tunnel-sources pulling the data from the main unit, and I have module-loopbacks that forward the audio to the ALSA outputs.<br><br></div>It is however not clear to me why my configuration based on tunnel-sink at the source side did not work. Does the tunnel need to be on the unit with the ALSA hardware ? ( That could make sense. )<br><div><br></div><div>Best regards,<br><br></div><div>Olivier<br></div><div><div><br><div><br><br><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 14, 2015 at 6:37 PM, Georg Chini <span dir="ltr"><<a href="mailto:georg@chini.tk" target="_blank">georg@chini.tk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<div>On 14.10.2015 17:18, Olivier Delbeke
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi all,<br>
<br>
I'm struggling with a pulseaudio configuration that I expected
to be working out-of-the box (as it seems very simple).<br>
<br>
I have : <br>
* a null-sink "mynullsink"<br>
* a tunnel-sink "mytunnel"<br>
* a module-loopback to connect "mynullsink.monitor" to
"mytunnel"<br>
<br>
Content of /etc/pulse/<a href="http://default.pa" target="_blank">default.pa</a> is here (full
content): <br>
load-module
module-native-protocol-unix
<br>
load-module
module-suspend-on-idle
<br>
load-module module-null-sink
sink_name=mynullsink
<br>
load-module module-tunnel-sink sink_name=mytunnel
server=tcp:<a href="http://192.168.100.3:4713" target="_blank">192.168.100.3:4713</a>
sink=remotesink<br>
<br>
Playing a wav file directly to the tunnel works fine, all the
time : <br>
paplay sample1.wav -d mytunnel <br>
=> audio sent correctly through the tunnel <br>
However, I can see with "pacmd list-sinks" that
"mytunnel" has a "current latency" of 0ms. Normal ?<br>
<br>
To connect the null-sink and the tunnel, I do this (with
either pactl or pacmd) :<br>
pacmd load-module module-loopback source=mynullsink.monitor
sink=mytunnel<br>
=> The module is correctly loaded (as I can see with
"pacmd list-modules")<br>
<br>
But playing audio to the null-sink does not work (i.e., no
sound is forwarded to the tunnel by the loopback) : <br>
paplay sample1.wav -d mynullsink<br>
=> NO AUDIO. NO ERROR MESSAGE. VOLUMES AT 100%. STATE
RUNNING<br>
<br>
With pulseaudio 6.0, I see that the latency calculated by the
module-loopback is increased by 10s every 10s :<br>
D: [pulseaudio] module-loopback.c: Loopback overall latency is
21552.00 ms + 0.00 ms + 0.00 ms = 21552.00 ms<br>
D: [pulseaudio] module-loopback.c: Should buffer 0 bytes,
buffered at minimum 0 bytes<br>
D: [pulseaudio] module-loopback.c: [mytunnel] Updated sampling
rate to 48000 Hz.<br>
D: [pulseaudio] module-loopback.c: Loopback overall latency is
31524.00 ms + 0.00 ms + 0.00 ms = 31524.00 ms<br>
D: [pulseaudio] module-loopback.c: Should buffer 0 bytes,
buffered at minimum 0 bytes<br>
D: [pulseaudio] module-loopback.c: [mytunnel] Updated sampling
rate to 48000 Hz.<br>
<br>
With pulseaudio 4.0, the latency moves around 250ms, but there
is also no audio.<br>
<br>
There seems to be a very unexpected workaround : loading the
loopback module twice ! When I do that, I get audio, but it's
slightly disturbed (sounds like an old vinyl record). <br>
<br>
What is happening ? Does anyone have a hint ?<br>
Why can't I chain a null sink to a tunnel sink using a
loopback module ?<br>
<br>
Thank you and best regards,<br>
<br>
</div>
Olivier<br>
</div>
<br>
<br>
</blockquote>
<br></div></div>
Hi Olivier,<br>
<br>
I wonder if you also loaded module-native-protocol-tcp somewhere. I
think you need<br>
it for tunneling. Did you try to use a standard <a href="http://default.pa" target="_blank">default.pa</a>?<br>
<br>
A while ago I tried a similar setup, but instead of tunnel_sink I
used tunnel_source:<br>
<br>
On the source machine (my local network is <a href="http://192.168.255.0/24" target="_blank">192.168.255.0/24</a>):
<br>
<br>
load-module module-native-protocol-tcp
auth-ip-acl='127.0.0.1;<a href="http://192.168.255.0/24" target="_blank">192.168.255.0/24</a>'
<br>
load-module module-null-sink sink_name=my_sink channels=2 rate=44100
<br>
<br>
Then I played the stream back to my_sink.
<br>
<br>
On the destination machine:
<br>
<br>
load-module module-tunnel-source server=192.168.255.x
source_name=remote_source source=my_sink.monitor
<br>
load-module module-loopback source=remote_source<br>
<br>
This worked fine and has the advantage that you can easily connect
(or re-connect) the<br>
same stream from multiple clients. Maybe you can try it this way.<br>
<br>
Regards<span class="HOEnZb"><font color="#888888"><br>
Georg<br>
<br>
<br>
</font></span></div>
<br>_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
<br></blockquote></div><br></div>