Re: [LAU] ALSA doesn't speak to JACKD

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: lau <linux-audio-user@...>
Date: Sunday, October 25, 2009 - 9:53 pm

Greetings, HamRadio.

Anyone here have perhaps some more hints to get alsa route its output
to jackd?
Thanks in advance for answering.

I decided to try to figure out a good way, because my live performance
hardware is also my all-purpose PC :-)  So far it seems to be working
very well, and because of some of the below, I think my latency has not

My first step was to identify the alphanumeric name (as opposed to the
number!) of the sound device I want to use for everything.  This is
done thusly:
$ cat /proc/asound/cards

I received the following from the above:
 0 [HD2            ]: Prodigy71HD2 - Audiotrak Prodigy
                      Audiotrak Prodigy HD2 at 0xef80, irq 10

You should have at least two items, because both your motherboard and
your Edirol are active.  If not, your Edirol is not configured
completely to work with ALSA, and I'm afraid I cannot help :-)  Anyway,
providing that both your motherboard sound and your Edirol are visible
as items in /proc/asound/cards, you will have one alphanumeric name per
sound system; the ones you want are in the square brackets [].  So my
card's ALSA name is "HD2".

My second step was to test Jack applications using this alphanumeric
name.  In qjackctl setup, in the "Interface:" field, usually it reads
either (default) or a numeric device number, e.g., hw:0.  
In my case, I set this field to read hw:HD2.  Suddenly all
sound on the machine began behaving a bit better.  I don't know
entirely why, but I suspect the numeric-to-alphanumeric translation in
ALSA either runs slow or gets confused or both.  No matter;
alphanumeric is far better, the numerics do definitely get confused
when USB audio is plugged in et cetera.  I ran in AVLinux just like
this for a while; AVLinux gives me an MPlayer which will do Jack, which
is nice, but some annoyances remained.

My third step was to get the ALSA2Jack plugin in.  This is a module for
ALSA, which permits it to send output to Jack.  The idea is that I need
two audio data paths.  The first is for general latency-irrelevant
applications, jack-incompatible, which will run
App-->ALSA-->Jack-->ALSAdevice.  The second is for
latency-critical applications, which will run
App-->Jack--ALSAdevice.  If we set up the ALSA2Jack plugin's virtual
device, as default audio device, and tell Jack to run all of its output
direct to the ALSA sound device of explicit choice, we should get the
best of both worlds.

So.  This being AVLinux (Debian), I had to install package
"libasound2-plugins", to get the ALSA2Jack plugin in.

The last step was to vary Ray's .asoundrc a bit.  I am using the
below.  The only significant change, is the ALSA mixer is set to point
to the alphanumeric name of my ALSA sound device.  Probably should
reboot after changing it, just in case.  On the other hand I use it as
an /etc/asound.conf, which is just a bit different; I don't like the
idea of sound configs changing at login, I want them nailed to the wall
at boot :-)


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

pcm.jack {
    type jack

    playback_ports {
    0 alsa_pcm:playback_1
    1 alsa_pcm:playback_2

    capture_ports {
    0 alsa_pcm:capture_1
    1 alsa_pcm:capture_2

ctl.mixer0 {
    type hw
    card HD2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] ALSA doesn't speak to JACKD, HamRadio, (Sun Oct 25, 12:03 pm)
Re: [LAU] ALSA doesn't speak to JACKD, Ray Rashif, (Sun Oct 25, 3:02 pm)
Re: [LAU] ALSA doesn't speak to JACKD, Jonathan E. Brickman, (Sun Oct 25, 9:53 pm)
Re: [LAU] ALSA doesn't speak to JACKD, Pablo Fernandez, (Sun Oct 25, 10:51 pm)
Re: [LAU] ALSA doesn't speak to JACKD, Esben Stien, (Tue Oct 27, 8:40 pm)
Re: [LAU] ALSA doesn't speak to JACKD, Jonathan E. Brickman, (Tue Oct 27, 11:55 pm)
[LAU] ALSA to pulseaudio, Jonathan E. Brickman, (Tue Oct 27, 11:14 pm)
Re: [LAU] ALSA to pulseaudio, Esben Stien, (Wed Oct 28, 10:19 pm)
Re: [LAU] ALSA to pulseaudio, Paul Davis, (Wed Oct 28, 2:29 am)
Re: [LAU] ALSA to pulseaudio, , (Wed Oct 28, 5:26 pm)
Re: [LAU] ALSA doesn't speak to JACKD, Jonathan E. Brickman, (Mon Oct 26, 12:33 am)
Re: [LAU] ALSA doesn't speak to JACKD, HamRadio, (Tue Oct 27, 6:55 pm)