[pulseaudio-discuss] Intercom with module-tunnel*new

Tanu Kaskinen tanuk at iki.fi
Mon Jan 23 09:58:33 UTC 2017


On Tue, 2017-01-17 at 11:18 +0100, Michael Renner wrote:
> Moin,
> 
> my new project seems to be easy, but the setup still does not work. On a
> Raspberry Pi (raspbian jessie with backports) runs pulseaudio 7.1.2 on a
> USB sound card. On a notebook I installed ubuntu xenial with Pulseaudio 8.
> 
> Both are in the same network segment, they are supposed to work as
> intercom. TCP access is enabled in /etc/pulse/default.pa on both computers:
> Load-module module-native-protocol-tcp auth-ip-acl = 127.0.0.1;
> 192.168.22.0/24; 10.8.0.0/24 auth-anonymous = 1
> 
> In addition the modules module-tunnel-sink-new and
> module-tunnel-source-new are loaded (192.168.22.84 is the Raspberry Pi,
> 192.168.22.92 the notebook).
> 
> Notebook:
> Load-module module-tunnel-sink-new server = 192.168.22.84
> Load-module module-tunnel-sink-new server = 192.168.22.84
> Raspberry Pi:
> Load-module module-tunnel-source-new-server = 192.168.22.92
> Load-module module-tunnel-sink-new server = 192.168.22.92
> 
> Now it is not clear how I can connect the microphone on one device to
> the loudspeaker on the other device - and vice versa.
> 
> 
> On the notebook I see in the tunnel in pavucontrol under "recording".
> There, I can see the different inputs connected to the notebook (for
> example "Build-in Analog Stereo" and "Webcam Analog Mono"), but it can
> not select anything, it remains "Build-in Analog Atereo". In Playback, I
> also see the tunnel. Again, "Build-in Analog Stereo" is the default
> which can not be changed.
> 
> On the Raspberry Pi I see the tunnel in pavucontrol under "Input
> Devices" (nothing to select) and "Output Devices" (nothing to select).
> Not more. I expect in both mixers a similar (symmetrical) look and the
> possibility to assign the channels freely. So: what is missing?
> 
> Thankful for hints

At least one piece of the puzzle that you didn't find is module-
loopback. That module can be used to take audio from a source and feed
it into a sink. Pavucontrol can't be used to set up loopbacks, so use
the command line:

pactl load-module module-loopback source=name-of-the-source sink=name-of-the-sink

You can use "pactl list sinks" and "pactl list sources" to figure out
the sink and source names (the name is a different thing than the
description that you see in pavucontrol).

You don't need to load a tunnel sink and source at both ends. If you
load a tunnel sink and source in both ends, you'll have four audio
streams going between the machines, while you only need two. There are
several different arrangements that you can choose from - at least in
theory it shouldn't matter much which one you choose:

Arrangement 1 (tunnel sink at both ends):

tunnel sink for the notebook speakers at the Pi end
loopback from the Pi mic to the tunnel sink at the Pi end
tunnel sink for the Pi speakers at the notebook end
loopback from the notebook mic to the tunnel sink at the notebook end

Arrangement 2 (tunnel source at both ends):

tunnel source for the notebook mic at the Pi end
loopback from the tunnel source to the Pi speakers at the Pi end
tunnel source for the Pi mic at the notebook end
loopback from the tunnel source to the notebook speakers at the notebook end

Arrangement 3 (everything at the Pi end):

tunnel sink for the notebook speakers at the Pi end
tunnel source for the notebook mic at the Pi end
loopback from the tunnel source to the Pi speakers at the Pi end
loopback from the Pi mic to the tunnel sink at the Pi end

Arrangement 4 (everything at the notebook end):

tunnel sink for the Pi speakers at the notebook end
tunnel source for the Pi mic at the notebook end
loopback from the tunnel source to the notebook speakers at the notebook end
loopback from the notebook mic to the tunnel sink at the notebook end

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list