You are here

Add new comment

rncbc's picture

Actually, JACK needs and takes exclusive control of the sound device, so while jackd is up and running you cannot have that device to any other use.

The other way around is also true: jackd won't start if any one single application is still using the same device for sound.

There's one trick in ALSA that let's you get away with this blockade: the dmix device may come to the rescue, so that you can have jackd and other plain ALSA applications share a sound device through software mixing. There's some caveats with this dmix thing, but you can try whether it works or is acceptable for you.

Follow this suggested instructions:

1) Edit or add the following to your ~/,asoundrc file:

pcm.!default {
    type plug
    slave.pcm "plugdmix"
}

pcm.plugdmix  {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 44100
    }
    bindings {
        0 0
        1 1
    }
}

pcm.dsp0
{
    type plug
    slave.pcm "plugdmix"
}

ctl.plugdmix {
    type hw
    card 0
}

2) Now use the new plugdmix pseudo device as your playback device (ie. Output Device in QjackCtl server settings). You can set your previous device name hw:0 as your capture device (ie. Input Device).

3) Make sure you use 44100 as your sample rate (rate) and 1024 as your frames per period (period_size).

Try it out :)