<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 12:55 PM, Len Ovens <span dir="ltr"><<a href="mailto:len@ovenwerks.net" target="_blank">len@ovenwerks.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 5 Jun 2018, Mac wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Ok, so I modified my script to:<br>
</blockquote>
<br>
...<span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
This produces exactly what I'd expect and, so far, appears well behaved and<br>
reproducable.<br>
</blockquote>
<br></span>
Good.<span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
But, some questions:<br>
<br>
1.) The pulse in/out are labelled front-left, front-right.<br>
The script does not mention these labels, so where did they come from.<br>
</blockquote>
<br></span></blockquote><div><br></div><div>You are, of course, correct, for some reason I missed front-left and read front_left.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"></span>
The script does use these labels:<span class="gmail-"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
jack_connect system:capture_1 PulseIn:front-left<br>
jack_connect system:capture_2 PulseIn:front-right<br>
jack_connect PulseOut:front-left system:playback_1<br>
jack_connect PulseOut:front-right system:playback_2<br>
</blockquote>
<br></span>
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.<span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
(There nothing in the output of aplay -l or -L with these either.)<br>
(And, where does playback_1/_2 come from?)<br>
</blockquote>
<br></span>
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.<br>
<br>
aplay is an alsa utility and so does not show jack ports, jack_lsp will show jack ports (both audio and midi).<span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2.) Aplay -l or -L lists a bunch of devices. For example PCH is actually capable<br>
of surround sound and there are 2 hdmi devices, and there is spdif as well.<br>
How do I get system:xxxx to show more of the on board outputs?<br>
</blockquote>
<br></span>
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:<br>
<a href="https://alsa.opensrc.org/TwoCardsAsOne" rel="noreferrer" target="_blank">https://alsa.opensrc.org/TwoCa<wbr>rdsAsOne</a><br>
<a href="http://www.jrigg.co.uk/linuxaudio/ice1712multi.html" rel="noreferrer" target="_blank">http://www.jrigg.co.uk/linuxau<wbr>dio/ice1712multi.html</a><br>
and others.<br>
<br></blockquote><div>I will need to digest those a bit.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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.<br>
<br>
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:<br>
zita-j2a -j PCH,1-out -d hw:PCH,1 -r 44100 -p 128 -n 2 &<br>
<br>
this gives me a port like:<br>
PCH,1-out:playback_1<br>
<br>
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:<span class="gmail-"><br>
pactl load-module module-jack-sink client_name=PulseOut channels=2 connect=no<br></span>
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)<br>
<br></blockquote><div><br></div><div>I added  <span class="gmail-">channels=3 and it did as expected, created PulseOut:front-left front_right aux0.</span></div><div><span class="gmail-"><br></span></div><div><span class="gmail-">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.</span></div><div><span class="gmail-"><br></span></div><div><span class="gmail-">(I get aplay doesn't show jack, but, for example aplay -L lists (this is a shortened list):</span></div><div><span class="gmail-"><br></span></div><div><span class="gmail-">front:CARD=PCH,DEV=0<br>    HDA Intel PCH, ALC892 Analog<br>    Front speakers<br>surround71:CARD=PCH,DEV=0<br>    HDA Intel PCH, ALC892 Analog<br>    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers</span></div><div><span class="gmail-">hw:CARD=PCH,DEV=0<br>    HDA Intel PCH, ALC892 Analog<br>    Direct hardware device without any conversions<br>hw:CARD=PCH,DEV=1<br>    HDA Intel PCH, ALC892 Digital<br>    Direct hardware device without any conversions<br><br></span></div><div><span class="gmail-">How does jack decide to only do 2 playback_1,_2?</span></div><div><span class="gmail-"><br></span></div><div><span class="gmail-">I take it there is something else in alsa startup that says provide for example <span class="gmail-">surround71</span><br></span></div><div><span class="gmail-"><br></span></div><div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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.<br>
<br></blockquote><div>I've used zita-lrx, but that was with a firewire device.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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.<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote></div><br></div></div>