[LAU] disabling jack plugin autoconnect or autoconnect in itself

Jari Suominen jari.suominen at helsinki.fi
Tue Aug 3 20:57:50 UTC 2010


fons at kokkinizita.net wrote:
> On Tue, Aug 03, 2010 at 11:26:44PM +0300, Jari Suominen wrote:
> 
>> I'm trying to setup a system where alsa app is outputting its
>> channels to jack. Problem is that it seems that the example code
>> always auto connects the outputs to physical ports through jack,
>> which is not what I would want, especially as the app has more
>> outputs than my soundcard does. I would only want the output ports
>> to appear to jack and then I could patch them with patch bay. Is
>> there some way to accomplish this.
> 
> Remove those parts of the 'example code' that are responsible for
> this undesirable behaviour ? It's not something that can hide 
> itself to any extent.

Well here is the asoundrc I'm using:

pcm.!default {
     type plug
	slave.channels 5
     slave { pcm "jack" channels 5}
}

pcm.jack {
     type jack
     playback_ports {
	0 system:playback_1
	1 system:playback_2
	2 system:playback_2
	3 system:playback_2
	4 system:playback_2
	}
     capture_ports {
         0 alsa_pcm:capture_1
         1 alsa_pcm:capture_2
     }
}

ctl.mixer0 {
     type hw
     card 0
}

it is modified version of online example which is more or less only 
documentation of whole plugin. Now if I remove any system;playback 
inside playback_ports definition, I get an error. If I totally remove 
whole line, (like 4 system;playback_4) that channel won't appear to 
jack. If I'm replacing playback_x to playback_3 or higher I get an error 
as that output doesn't fysically exist. It would be sweet to understand 
which part of my asoundrc controls autoconnect behaviour.


>> Another question, which handles the same problem. Is there any way
>> to have similar kind of functionability as patch bay does, but to
>> the reverse direction. So if someone connects ports a and b, they
>> would be automatically disconnected. Which would solve my first
>> problem and problem with all auto connecting apps.
> 
> You can always watch connections using the callbacks and undo them.
> But in many cases you'd be too late. The real solution is to allow
> apps to 'lock' their ports, but this was removed from Jack some time
> ago.

Is there any ready made app to do this?

Thanks,

..........j


More information about the Linux-audio-user mailing list