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: khz, MattKingUSA

paul
Established Member
Posts: 201
Joined: Wed May 07, 2014 9:50 pm
Location: Germany

Tell Cadence to use external interface only if detected

Postby paul » Mon May 09, 2016 10:40 pm

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: 62
Joined: Fri Jun 08, 2012 11:12 pm

Re: Tell Cadence to use external interface only if detected

Postby Shupacabras » Mon May 09, 2016 11:35 pm

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: 201
Joined: Wed May 07, 2014 9:50 pm
Location: Germany

Re: Tell Cadence to use external interface only if detected

Postby paul » Thu May 12, 2016 9:44 pm

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: 436
Joined: Fri Feb 25, 2011 6:40 pm

Re: Tell Cadence to use external interface only if detected

Postby varpa » Fri May 13, 2016 3:14 pm

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


Return to “KXStudio Discussion”

Who is online

Users browsing this forum: aicram and 1 guest