Page 1 of 1

Tell Cadence to use external interface only if detected

Posted: Mon May 09, 2016 10:40 pm
by paul
Is there a way to tell Cadence to start Jack with my external interface if it is present, and otherwise with the internal sound card?
Every time I turn the computer on away from home I have no audio unless I restart manually the whole thing. It would be nice to automate it, can it be done maybe with a script?

Re: Tell Cadence to use external interface only if detected

Posted: Mon May 09, 2016 11:35 pm
by Shupacabras
edit your alsa-base.conf

my configuration is

# ALSA portion
options snd cards_limit=2
alias snd-card-0 snd-hda
alias snd-card-2 snd-emu10k1
options snd-hda index=0
options snd-emu10k1 index=2

# OSS/Free portion
alias sound-slot-0 snd-hda
alias sound-slot-2 snd-emu10k1

sorry my bad english

Re: Tell Cadence to use external interface only if detected

Posted: Thu May 12, 2016 9:44 pm
by paul
Shupacabras wrote:edit your alsa-base.conf

my configuration is

# ALSA portion
options snd cards_limit=2
alias snd-card-0 snd-hda
alias snd-card-2 snd-emu10k1
options snd-hda index=0
options snd-emu10k1 index=2

# OSS/Free portion
alias sound-slot-0 snd-hda
alias sound-slot-2 snd-emu10k1

sorry my bad english
Is there a way to do this with Jack instead of Alsa?

Re: Tell Cadence to use external interface only if detected

Posted: Fri May 13, 2016 3:14 pm
by varpa
As far as I know there is no way to tell Cadence which interface to use via the command line. Hence I use qjackctl to start jack instead of cadence. You can define presets in qjackctl for your different interfaces. Then I use a shell script to check which interface is available and start qjackctl with the appropriate preset. This is my script:
preset=alsa #default preset
# Stop jackdbus
jack_control stop
# If firewire device present use that
if [[ -e /dev/fw1 ]]; then
preset=firewire
fi
# Start Qjackctl if not started
if [[ `ps -o pid= -C qjackctl` == "" ]]; then
qjackctl -s -p $preset &
fi