Re: jack: interface selection has no effect

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

 



On Mon, 11 Aug 2014, Max wrote:
On 08/10/2014 03:53 AM, Len Ovens wrote:
On Sat, 9 Aug 2014, Max wrote:

selecting a different interface in qjackctl has no effect.  i
can't use the external soundcard, because jack stays always with
the internal one. any ideas what causes this symptom?

i am running pulse on top of jack like this:
http://trac.jackaudio.org/wiki/WalkThrough/User/PulseOnJack

Len, thanks for trying to help me out - appreciated. But I am more
confused than before.

That is the hardest way to do it.

to do what?

Pulse on jack.

qjackctl expects (as installed) to use jackdbus.

i have no jackdbus package in my apt sources available, what's that?

It is a part of jackd2. Normally if you have jackd2 you also have jackdbus.

Then, if you use qjackctl to start jack first thing in the session before you run anything else or start jackd through a script. Then whatever device you have set up should get picked up by jackdbus. If you run something that needs jack first, chances are it will start jackd for you and once it is running, qjackctl has no control over it and can not stop and restart it. My personal feeling is that debian/ubuntu etc. should package jackd2 and jackdbus seperate so jackd is not available in a jackdbus system to cause problems. A script that takes the same commandline as jackd and then calls jack_control with the right parameters could be included instead.

Using jackdbus, and installing pulseaudio-module-jack, should besides installing module-jack-sink and module-jack-source also install module-jackdbus-detect which will auto-load the other two modules for you when jackdbus is detected as running.

Personally, I have a script like:

----------autojack----------8<---------
#! /bin/bash
# start jack and midi

DELAY=1
DRIVER=alsa
DEV=hw:0
RATE=48000
FRAME=2048
PERIOD=2

#sleep $DELAY

jack_control ds $DRIVER dps device $DEV dps rate $RATE dps period $FRAME \
        dps nperiods $PERIOD start

sleep $DELAY

a2jmidid -e &

sleep $DELAY

sleep $DELAY

pulseaudio -k

----------------------------8<------------------

The last line restarts pulseaudio because upstart seems to think it has to start pulse first :P And I don't want my system too far off stock because I try to help those with a stock system. This gets started by:
~/.config/autostart/AutoJack.desktop
But I could have put it in /etc/xdg/autostart for system wide use.

---------AutoJack.desktop-------8<--------------
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=AutoJack
Comment=Jackdbus starter
Exec=autojack
StartupNotify=false
Terminal=false
Hidden=false

-------------------------------8<---------------

jack_lsp shows:
system:capture_1
system:capture_2
... (the rest of my system listing skipped)
system:playback_9
system:playback_10
PulseAudio JACK Sink:front-left
PulseAudio JACK Sink:front-right
PulseAudio JACK Source:front-left
PulseAudio JACK Source:front-right
a2j:Midi Through [14] (capture): Midi Through Port-0
a2j:Midi Through [14] (playback): Midi Through Port-0
a2j:Ensoniq AudioPCI [16] (capture): ES1370
a2j:Ensoniq AudioPCI [16] (playback): ES1370

qjackctl is configured for the same card and start settings, the options tab has Execute script on startup: pulseaudio -k and Execute script after startup: a2jmidid -e &, but really I never use qjackctl to start and stop jackd as it runs from session start to stop. I use qjackctl for the patchbay (connections) and logging. In the Misc. tab I have qjackctl set for Enable D-Bus interface and I have Stop JACK audio server on application exit unchecked so that stopping qjackctl does not stop jackdbus.

I use this project:

http://www.ovenwerks.net/software/index.html

To control jack latency on the fly and to disconnect pulseaudio if I think it might interfere with what I am doing. It also sets the CPU governor and allows me to stop cron so there is no sudden net/disk activity in the middle of a take.

From pavucontrol, on the Configuration tab, I set any audio card profiles
to "Off". I probably should just set pulse not to use the alsa-sink/sourse modules, but so far I have been too lazy to do so.

In my opinion this is the proper way to get jack and pulse to play nice.

If one is using jackd1 Then everything changes because it is not dbus controlable (at least out of the box, I hear there is a patch)

Then the link you have above can be used and qjackctl can have the D-Bus interface turned off. However, there is more work to turn the pulse-jack bridge off and on on the fly as there are two modules to (un)load. Also, jackd has to be started with qjackctl if you wish to use that as the controler. Unless you want to add:
Execute script on Shutdown: killall -9 jackd
To your qjackctl setup.

I can not recommend jackd2 or jackd1 as one being better than the other. I think there are situations where one or the other shines. However, in the case where pulse and dbus are already in use, I would choose jackdbus as the most compatible version of jack to use. I do not know if jackd can safely be removed/-x/renamed or not when using jackdbus... that is something I should experiment with though :)

--
Len Ovens
www.ovenwerks.net

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://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