<div dir="ltr"><div>Ok, so I modified my script to:</div><div><br></div><div>#!/bin/bash<br>set -x<br>killall -9 jackd jackdbus<br>jack_control ds alsa dps capture none dps playback none<br>jack_control dps device hw:PCH<br>jack_control dps rate 48000<br>jack_control dps nperiods 2<br>jack_control dps period 256<br>jack_control start<br>pactl unload-module module-udev-detect<br>pactl unload-module module-alsa-card<br>pactl unload-module module-jackdbus-detect<br>pactl load-module module-jack-sink client_name=PulseOut channels=2 connect=no<br>pactl load-module module-jack-source client_name=PulseIn channels=2 connect=no<br><br>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>set +x</div><div><br></div><div>This produces exactly what I'd expect and, so far, appears well behaved and reproducable.</div><div><br></div><div>But, some questions:</div><div><br></div><div>1.) The pulse in/out are labelled front-left, front-right.</div><div>The script does not mention these labels, so where did they come from.</div><div>(There nothing in the output of aplay -l or -L with these either.)</div><div>(And, where does playback_1/_2 come from?)<br></div><div><br></div><div>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.</div><div>How do I get system:xxxx to show more of the on board outputs?</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 4, 2018 at 3:46 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 4 Jun 2018, Mac wrote:<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ok, so I'm trying to set this up so I control things with a script file.<br>
<br>
I have a script that sets various parameters with jack_control.<br>
<br>
I was attempting to start my own paulse audio sink/source, but when I do I get 2<br>
sinks/sources, and (I'm guessing) pulse is confused as to the default<br>
connections.<br>
So, when, for example, I start a browser and youtube, it doesn't play.<br>
</blockquote>
<br></span>
:)<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I did some googling, but, none of the files they say to change are on this<br>
system. So, where is the paulse auto start configured and started? It does show<br>
up in ps aux, so something is doing it.<br>
</blockquote>
<br></span>
I wuld not (and do not) change any system settings as this will produce errors when pulse is upgraded by apt.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The script:<br>
<br>
#!/bin/bash<br>
jack_control start<br>
jack_control ds alsa dps capture none dps playback none<br>
jack_control dps device hw:PCH<br>
jack_control dps rate 48000<br>
jack_control dps nperiods 2<br>
jack_control dps period 256<br>
</blockquote>
<br></span>
I personally would start the script with:<br>
killall -9 jackd jackdbus<br>
<br>
That gets rid of any jack processes started by someone else.<br>
<br>
Next thing is that you need to move the jack_control start line to the end of your jack_control lines otherwise the settings after that will not be used.<br>
<br>
So:<br>
#!/bin/bash<br>
killall -9 jackd jackdbus<span class=""><br>
jack_control ds alsa dps capture none dps playback none<br>
jack_control dps device hw:PCH<br>
jack_control dps rate 48000<br>
jack_control dps nperiods 2<br>
jack_control dps period 256<br></span>
jack_control start<br>
<br>
Then I remove pulse's connection to anything alsa:<br>
pactl unload-module module-udev-detect<br>
pactl unload-module module-alsa-card<br>
<br>
Those two lines mean that the only output pulse can find is jack and so pulse defaults to the jack bridge all the time. Removing any path to an alsa device also allows jack to run in freewheel mode without crashing because pulse will try to use an alsa device for sync :P<br>
<br>
In my case, I also unload the jackdetect module because I want my jack-pa bridge to be specific:<br>
pactl unload-module module-jackdbus-detect<br>
<br>
Then in place of the above module I do:<br>
pactl load-module module-jack-sink client_name=PulseOut channels=2 connect=no<br>
pactl load-module module-jack-source client_name=PulseIn channels=2 connect=no<br>
<br>
I use the connect=no because my outputs are not always 1 and 2 they may be 9 and 10 if I am using s/pdif.<br>
<br>
Then I use jack_connect to connect what ports I do want<br>
<br>
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_9<br>
jack_connect PulseOut:front-right system:playback_10<br>
<br>
I have shown one config only in my case the last line might look more like:<br>
jack_connect PulseOut:front-right ${device}:playback_${o_port_r}<br>
(well actually most of the above lines would have variables inserted)<br>
<br>
<br>
--<br>
Len Ovens<br>
<a href="http://www.ovenwerks.net" rel="noreferrer" target="_blank">www.ovenwerks.net</a><br>
<br>
</blockquote></div><br></div>