Re: Jack & pulse...knickers in a twist.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Jun 5, 2018 at 12:55 PM, Len Ovens <len@xxxxxxxxxxxxx> wrote:
On Tue, 5 Jun 2018, Mac wrote:

Ok, so I modified my script to:

...

This produces exactly what I'd expect and, so far, appears well behaved and
reproducable.

Good.

But, some questions:

1.) The pulse in/out are labelled front-left, front-right.
The script does not mention these labels, so where did they come from.


You are, of course, correct, for some reason I missed front-left and read front_left.
 
The script does use these labels:
jack_connect system:capture_1 PulseIn:front-left
jack_connect system:capture_2 PulseIn:front-right
jack_connect PulseOut:front-left system:playback_1
jack_connect PulseOut:front-right system:playback_2

We told pulse to create two jack clients: PulseIn and PulseOut. Pulse named the ports front-left and front-right. You can see these ports by looking at qjackctl's Connections window or by typing jack_lsp in a terminal.

(There nothing in the output of aplay -l or -L with these either.)
(And, where does playback_1/_2 come from?)

playback-1/-2 are again jack ports, but in this case they are created by the jack backend or master device rather than a client. So they are called "system:*" However, aside from that, they can be treated like the ports from any other client.

aplay is an alsa utility and so does not show jack ports, jack_lsp will show jack ports (both audio and midi).

2.) Aplay -l or -L lists a bunch of devices. For example PCH is actually capable
of surround sound and there are 2 hdmi devices, and there is spdif as well.
How do I get system:xxxx to show more of the on board outputs?

system will show only one device. If you are sure they are all in sync, it may be possible to create an alsa multi virtual card... see:
https://alsa.opensrc.org/TwoCardsAsOne
http://www.jrigg.co.uk/linuxaudio/ice1712multi.html
and others.

I will need to digest those a bit.
 
The second link above gives some of the troubles that may be encountered with this method. However, this is the only way to get them all to be "system:" ports.

There is another way to do the same thing that seems to be (in my experience) more robust. I use zita-ajbridge in the form of zita-a2j for inputs and zita-j2a for outputs. Zita-ajbridge does not care if the devices are synced or not. However, in this case the port client will have a different name besides system. I normally choose the name of the device:
zita-j2a -j PCH,1-out -d hw:PCH,1 -r 44100 -p 128 -n 2 &

this gives me a port like:
PCH,1-out:playback_1

Now, when you mention using suround, I also realize you would want your pulse-jack bridge to have more than 2 ports. So you would change the channels=value to 4,5 or 6 depending on how many channels you need in the:
pactl load-module module-jack-sink client_name=PulseOut channels=2 connect=no
line. Pulse will conveniently label them in suround like terms. (jack and zita will assume a multi channel audio card meant for mutitrack recording where channels are used as a number of mono sources)


I added  channels=3 and it did as expected, created PulseOut:front-left front_right aux0.

The piece I don't see is, assuming there is a device with 5 outputs, how do you get jack to create playback_3, _4 etc.

(I get aplay doesn't show jack, but, for example aplay -L lists (this is a shortened list):

front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Front speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct hardware device without any conversions

How does jack decide to only do 2 playback_1,_2?

I take it there is something else in alsa startup that says provide for example surround71


zita-j2a will also allow more than two channels with the -c parameter. It is ok to use a large number here as zita-j2a will only use as many ports as there are actual DACs.

I've used zita-lrx, but that was with a firewire device.
 
The whole thing is really very much like connecting a group of stereo componants together. each program or utility is like a box. Jack shows the plugs on each box and you use a (virtual) wire to connect the boxes as you wish. The maker of each box decides what to label their plugs and the owner is expected to figure out what they want to do with them.


_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux