[LAU] Kmix + jackd strange behaviour

Rui Nuno Capela rncbc at rncbc.org
Thu Oct 30 11:09:42 EDT 2008


Crypto wrote:
> On Thursday 30 October 2008 11:04:38 Rui Nuno Capela wrote:
> 
>> this device list, assuming you're referring to the qjackctl setup
>> drop-down menu as shown by the [>] button on the right to interface and
>> input/output device entry fields and "alsa" is the selected driver, is
>> just the enumeration of all alsa_pcm devices available in your system.
>>
>> this list is not created by qjackctl. it is indeed queried by qjackctl
>> to the alsa control layer and is built everytime you pop the menu up, so
>> it doesn't matter at all whether you restart qjackctl or not.
>>
>> otoh, i suspect that it is amarok, which you must ensure that its xine
>> engine is sure having jack as its output plugin, that needs to be reset
>> or recycled whenever you restart jackd (via qjackctl).
>>
>> byee
> 
> Ah, I have found it. It is a matter of confusion ;-) And, unfortunately, it IS 
> a problem in qjackctl. Maybe it is a feature though ;-)
> 
> I have had a look at the .jackdrc file which in my case contains a single 
> line:
> 
> /usr/bin/jackd -R -dalsa -dhw:1 -r48000 -p128 -n2 -Phw:0,0 -S -o2 -Xseq
> 
> This is the line that jackd gets on startup when launched by qjackctl.
> 
> It is set to -d hw:1 which means output to hw:1 (my external USB device).
> 
> The tricky thing is the -P parameter. 
> 
> It means: -P --playback Provide playback ports. Optionally set device 
> (default: none)
> 
> It is wrongly set to hw0:0 which is the onboard sound of my notebook.
> 
> Why is that?
> 
> Look in qjackctl: one can select from the "Audio" menu to have duplex 
> or "Playback only" or "Capture only".
> 
> If You - as I did - select "Playback only", then the menus for "Input Device" 
> and "Output Device" are greyed out and cannot be selected. I thought that the 
> ONLY relevant device, that is, the device for audio output in this case, is 
> then selected ONLY by the menu "Interface".
> 
> Unfortunately, the values of the menu "Output device" is still saved in 
> the .jackdrc file and therefore sent to jackd.
> 
> So: if the "Output Device" is greyed out and/or one has not been set before to 
> the correct output port (in my case: external USB card), then the wrong 
> output device will be placed in the .jackrc file and sent to jackd.
> 
> It is easy to circumvent this, though: 
> 
> -> Select "duplex" in the top menu,
> -> Set both "Output device" and "Input device" (just in case) to the desired 
> ports, in my case that is external USB audio device,
> -> revert top menu to "Playback only" and select external USB device (again) 
> in the "Interface" menu
> -> start jackd, which will save new .jackdrc file which now looks like this:
> 
> /usr/bin/jackd -R -dalsa -dhw:1,0 -r48000 -p128 -n2 -Phw:1,0 -S -o2 -Xseq
> 
> It contains the -P option which now outputs to hw:1,0 which is external USB 
> audio correctly.
> 
> Suggestion for improvement: Leave out the "Interface" menu on top and switch 
> interfaces only by "Input Device" and "Output Device". Grey out (make 
> unselectable) the Device which is not relevant, i.e. if chosing "Capture 
> Only" grey out "Output Device", but make sure that the output device is not 
> placed in the jackdrc file. And vice versa.
> 
> It seems to me like the three interface menus are treated differently. Maybe 
> there was a good reason to include the -P option in the jackdrc-file?
> 

a) qjackctl doesn't read ~/.jackdrc whatsoever. only writes to it as 
seen convenient and iif you choose to (erm... might be the factory 
hardcoded default btw:); see Setup/Misc/Save JACK audio server 
configuration option.

b) however it is perfectly possible that the ~/.jackdrc file is being 
read behind the scenes, when auto-starting jackd and that is indeed 
tried upon the first jack_client_open() call which should just happen 
for most modern jack enabled applications _and_ provided that jackd is 
not already running.

c) qjackctl has two modes of operation: it can start and control the 
jackd server (server state goes "Started" in main display) or go into 
simple client mode (server state is "Active" in main display); the 
server parameters setup tab only serves to the former mode and has no 
effect on the latter (which might then have been driven by ~/.jackdrc 
without qjackctl intervention)

d) you can and should use qjackctl to start jackd in the first place and 
maybe want to stay that way. therefore, get rid of your currently 
existing ~/.jackdrc file; killall jackd, run qjackctl and setup all 
parameters as you wish and then start jackd from qjackctl from then ever 
after. run amarok and enjoy...

e) ardour2 has also the mighty effect to (over)write ~/.jackdrc as well, 
so don't blame qjackctl on that alone :))

byee
-- 
rncbc aka Rui Nuno Capela
rncbc at rncbc.org




More information about the Linux-audio-user mailing list