<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Pablo, many thanks; you have just solved a problem for me :-)&nbsp; A few of
my system-generic audio was coming out distorted.&nbsp; So here is what I
have now.&nbsp; So far, I have not been able to detect any reduction in
latency or other performance, when compared to using jack-only audio.<br>
<br>
My first step was to identify the alphanumeric name (as opposed to the
number!) of the sound device I want to use for everything.&nbsp; This is
done thusly:<br>
<blockquote><tt>$ cat /proc/asound/cards</tt><br>
</blockquote>
I received the following from the above:<br>
<blockquote><tt>&nbsp;0 [HD2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]: Prodigy71HD2 - Audiotrak Prodigy
HD2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Audiotrak Prodigy HD2 at 0xef80, irq 10<br>
  <br>
  </tt></blockquote>
You should have at least one item representing your sound card.&nbsp; If
not, your card is not configured
completely to work with ALSA, and I'm afraid I cannot help :-)&nbsp; Anyway,
providing that your desired device is listed in /proc/asound/cards, it
will have an alphanumeric name; the one you want is in the square
brackets [].&nbsp; So my
card's ALSA name is "HD2".<br>
<br>
My second step was to test Jack applications using this alphanumeric
name.&nbsp; In qjackctl setup, in the "Interface:" field, usually it reads
either <tt>(default)</tt> or a numeric device number, e.g., <tt>hw:0</tt>.&nbsp;&nbsp;
In my case, I set this field to read <tt>hw:HD2</tt>.&nbsp; Suddenly all
sound on the machine began behaving a bit better.&nbsp; I don't know
entirely why, but I suspect the numeric-to-alphanumeric translation in
ALSA either runs slow or gets confused or both.&nbsp; No matter;
alphanumeric is far better, the numerics do definitely get confused
when USB audio is plugged in et cetera.&nbsp; 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. <br>
<br>
My third step was to get the ALSA2Jack plugin in.&nbsp; This is a module for
ALSA, which permits it to send output to Jack.&nbsp; The idea is that we
need
two audio data paths.&nbsp; The first is for general latency-irrelevant
applications, jack-incompatible, which will run
App--&gt;ALSA--&gt;Jack--&gt;ALSAdevice.&nbsp; The second is for
latency-critical applications, which will run
App--&gt;Jack--&gt;ALSAdevice.&nbsp; 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.<br>
<br>
So.&nbsp; This being AVLinux (Debian), I then had to install package
"libasound2-plugins", to get the ALSA2Jack plugin in.&nbsp; Found it in
Synaptic.<br>
<br>
The last step was to implement an ALSA configuration file handling
ALSA2Jack and also the Jack device IDs.&nbsp; I am now using the
below.&nbsp; The only significant change you will need, is the ALSA mixer
should be set to point
directly to the alphanumeric name of my ALSA sound device.&nbsp; Probably
should
reboot after changing it, just in case.&nbsp; On the other hand, unlike many
who use ~/.asoundrc, 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 :-)<br>
<br>
J.E.B.<br>
<br>
<tt>pcm.!default {<br>
&nbsp;&nbsp;&nbsp; type plug<br>
&nbsp;&nbsp;&nbsp; slave { pcm "jack" }<br>
}<br>
<br>
pcm.jack {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type jack<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; playback_ports {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 system:playback_1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 system:playback_2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; capture_ports {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 system:capture_1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 system:capture_2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
}<br>
<br>
ctl.mixer0 {<br>
&nbsp;&nbsp;&nbsp; type hw<br>
&nbsp;&nbsp;&nbsp; card HD2<br>
}<br>
</tt><br>
</body>
</html>