[pulseaudio-discuss] patch: fix JACK source/sink backwards

Tanu Kaskinen tanuk at iki.fi
Tue Jul 28 23:14:28 PDT 2015


On Wed, Jul 29, 2015, at 08:44, Andrew Kelley wrote:
> Screenshot of problem: http://i.imgur.com/ENpSCoG.png

I see no problem there.

> I believe by default the PulseAudio JACK Sink and PulseAudio JACK Source
> are switched around.
> 
> In PulseAudio lingo, "Sink" means an output device, and "Source" means an
> input device. Yet, the Sink is registered as a readable client and the
> Source is registered as a writable client, which is backwards.

It's not backwards. Let's say that we have a music player that connects
to pulseaudio. The user wants the audio from the music player to go to
the speakers, and the speakers are under the control of jack. Inside
PulseAudio there needs to be a sink where the music player's playback
stream can connect. When the audio gets from the player to the sink, the
next problem is to get the audio from the sink to the speakers, which
are represented by two input ports in jack. In jack, audio flows from
output ports to input ports, so PulseAudio needs to create two output
ports. So, the audio flow becomes: music player -> (pulseaudio sink ->
jack output ports) -> jack input ports. The part in parentheses
represents the part that the jack sink module in PulseAudio implements.

> I think this happened because when you register a port,
> JackPortIsOutput/JackPortIsInput is relative to the server, not the
> client.
> See:
> https://github.com/jackaudio/example-clients/blob/master/simple_client.c#L121
> 
> Indeed, applications are happily outputting to PulseAudio, but they go
> silent when I turn the JACK server on. This is explained by my hypothesis
> above.

There is some other explanation for the silence. Do the applications get
automatically moved to the jack sink?

-- 
Tanu


More information about the pulseaudio-discuss mailing list