Tell Cadence to use external interface only if detected

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
paul
Established Member
Posts: 226
Joined: Wed May 07, 2014 9:50 pm
Location: UK
Has thanked: 1 time
Been thanked: 1 time

Tell Cadence to use external interface only if detected

Post 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?
Keep on rocking in the free world!
User avatar
Shupacabras
Established Member
Posts: 116
Joined: Fri Jun 08, 2012 11:12 pm

Re: Tell Cadence to use external interface only if detected

Post 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
paul
Established Member
Posts: 226
Joined: Wed May 07, 2014 9:50 pm
Location: UK
Has thanked: 1 time
Been thanked: 1 time

Re: Tell Cadence to use external interface only if detected

Post 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?
Keep on rocking in the free world!
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: Tell Cadence to use external interface only if detected

Post 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
Post Reply