Re: [linux-audio-user] Quattro and JACK

From: <metafor@email-addr-hidden>
Date: Wed Feb 09 2005 - 13:32:18 EET

hi jason

i am sorry to tell you, but the quattro is a nightmare
under linux. that's the bad thing, the good is that it's possible
to get it working with jack and quite low latency, between 5-10ms

i've struggled for a few month until i finally found a solution.
you need to compile a 2.4 low-latency patched kernel, i think
the 2.4.25 is a good choice as it worked for me. and then use
the latest alsa-drivers (not the one from the kernel-source) together
with jack, i took both from cvs, but this was in octobre, so i think
most of the changes are probably already in the official release.

this worked for me, at least i can use jack now together with
pd and other audio-software, duplex mode is still somehow buggy.
but so far i don't need it.

for 2.6 kernel i don't know, i just know that in octobre it was not
working. and there are rumours it's still not. but probably someone
on this list knows more about the quattro and 2.6

low-latency-kernel-howto:
http://www.djcj.org/LAU/guide/Low_latency-Mini-HOWTO.php3

Jason Hanggi wrote:

>I'm new to this whole linux sound thing, and I'd like
>to get my M-Audio Quattro USB working. sorry if this
>email is a little long, i just want to go ahead and
>put most of my information up now, so you all aren't
>asking for it later.
>
>so far, i can play from XMMS using it's ALSA driver, I
>can send/receive midi data. i can refer to it as
>quattro1, quattro2, etc, as outlined in the standard
>.asoundrc (which i'll put at the end). i haven't even
>touched recording yet
>
>there's two problems i'm having.
>
>1) when i do a
>$ aplay --device quattro1 test.wav
>I can hear it, but it's choppy and it get this:
>
>Playing WAVE 'test.wav' : Signed 16 bit Little Endian,
>Rate 44100 Hz, Stereo
>underrun!!! (at least 0.079 ms long)
>underrun!!! (at least 0.038 ms long)
>underrun!!! (at least 0.046 ms long)
>underrun!!! (at least 0.039 ms long)
>...
>
>same if i just use aplay --device hw:1
>
>when I try --device quattro I get
>aplay: set_params:837: Channels count non available
>
>the second problem I'm having, is I can't get the
>Quattro to work under JACK.
>If I try duplex mode, I get this in my message window:
>22:07:32.554 /usr/bin/jackstart -R -dalsa -dhw:1
>-r48000 -p1024 -n2 -i2 -o2
>22:07:32.627 JACK was started with PID=3974 (0xf86).
>back from read, ret = 1 errno == Success
>jackd 0.94.0
>Copyright 2001-2003 Paul Davis and others.
>jackd comes with ABSOLUTELY NO WARRANTY
>This is free software, and you are welcome to
>redistribute it
>under certain conditions; see the file COPYING for
>details
>loading driver ..
>apparent rate = 48000
>creating alsa driver ...
>hw:1|hw:1|1024|2|48000|2|2|nomon|swmeter|rt|32bit
>control device hw:1
>configuring for 48000Hz, period = 1024 frames, buffer
>= 2 periods
>Couldn't open hw:1 for 32bit samples trying 24bit
>instead
>Couldn't open hw:1 for 32bit samples trying 24bit
>instead
>could not start playback (Broken pipe)
>DRIVER NT: could not start driver
>cannot start driver
>22:07:33.937 JACK was stopped successfully.
>22:07:35.861 Could not connect to JACK server as
>client.
>
>if I only set for playback, then I get a bunch of
>clicking and a bunch of XRUN callbacks.
>
>if anyone could help me out, I'd really appreciate it.
>thanks!
>
>here's some info:
>
>$ more /proc/asound/cards
>0 [AudioPCI ]: ENS1371 - Ensoniq AudioPCI
> Ensoniq AudioPCI ENS1371 at
>0x1080, irq 11
>1 [Quattro ]: USB-Audio - USB Audio Quattro
> M Audio USB Audio Quattro at
>usb-00:07.2-2, full speed
>
>$ more .asoundrc
># quattro1 is pcm0 which has a maximum sample rate of
>44100 and 16
># bit stereo
>
> pcm.quattro1 {
> type hw
> card 1
> device 0
> }
>
> ctl.quattro1 {
> type hw
> card 1
> }
>
># quattro2 is pcm1 which has a maximum sample rate of
>96000 and 24
># bit stereo
>
> pcm.quattro2 {
> type hw
> card 1
> device 1
> }
>
> ctl.quattro2 {
> type hw
> card 1
> }
>
>
>#----
>
>#
># compose 4 channels from two channel x two devices,
>hw:2,1 and
># hw:2,2
># assuming that hw:2,1 and hw:2,2 give the same
>condition, 24_3LE/96k
>#
>
>pcm.quattro {
> type multi;
>
> slaves.a.pcm "hw:1,0";
> slaves.a.channels 2;
> slaves.b.pcm "hw:1,1";
> slaves.b.channels 2;
>
> bindings.0.slave a;
> bindings.0.channel 0;
> bindings.1.slave a;
> bindings.1.channel 1;
> bindings.2.slave b;
> bindings.2.channel 0;
> bindings.3.slave b;
> bindings.3.channel 1;
>}
>
>ctl.quattro {
> type hw;
> card 1;
>}
>
>
>#
># Remap 4 channels as interleaved.
># Use plug instead of route here, since 24_3LE is
>unlikely supported
># by applications.
>#
># arecord -r 44100 -c 4 -f s16_le -D q4 -d 5
>/home/xxx/q4.wav
>
>pcm.q4 {
> type plug;
> slave.pcm "quattro";
> ttable.0.0 1;
> ttable.1.1 1;
> ttable.2.2 1;
> ttable.3.3 1;
>}
>
>
>
>ctl.q4 {
> type hw;
> card 1;
>}
>
>#
># Use route plugin for applications that do support
>24_3LE
># This lowers latency which the plug plugin introduces
>due to
># resampling.
>#
># arecord -r 44100 -c 4 -f s16_le -D q4b -d 5
>/home/xxx/q41.wav
>
>
>
>pcm.q4b {
> type route;
> slave.pcm "quattro";
> ttable.0.0 1;
> ttable.1.1 1;
> ttable.2.2 1;
> ttable.3.3 1;
>
>}
>
>ctl.q4b {
> type hw;
> card 1;
>}
>
>
>
>
>
>
Received on Wed Feb 9 16:15:09 2005

This archive was generated by hypermail 2.1.8 : Wed Feb 09 2005 - 16:15:10 EET