[PlanetCCRMA] USB (& firewire) interface

Oded Ben-Tal oded at ccrma.Stanford.EDU
Tue May 11 10:28:45 PDT 2010


> please can you attach your asoundrc file so we can see how you did it?

Note that most of the comments in there are no longer relevant - I changed 
things from the original version I got from somewhere.
I think the important part is where it defines pcm.quattro as a composite 
device.
with this defined I can do
export MUS_ALSA_DEVICE=quattro
which means sndlib can play 4 channels.

hope that helps
Oded
-------------- next part --------------
# quattro1 is pcm0 which has a maximum sample rate of 44100 and 16
# bit stereo

   	pcm.quattro1 {
             	type hw
                card Quattro
		device 0
     	}
 
      	ctl.quattro1 {
             	type hw
             	card Quattro
     	}
	
# quattro2 is pcm1 which has a maximum sample rate of 96000 and 24
# bit stereo

     	pcm.quattro2 {
             	type hw
                card Quattro
		device 1
     	}
 
      	ctl.quattro2 {
             	type hw
             	card Quattro
     	}


#----	

#
# compose 4 channels from two channel x two devices, hw:0,0 and 
# hw:0,1
# assuming that hw:0,0 and hw:0,1 give the same condition, 24_3LE/96k
# Oded: FC8 second quattro stereo device seems to only work if USB audio is
# defined as the first audio device.
# 

pcm.quattro {
        type multi;

        slaves.a.pcm "hw:Quattro,0";
        slaves.a.channels 2;
        slaves.b.pcm "hw:Quattro,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 Quattro;
}


#
# 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 
# ??should ttable.x.x 1->0 ??
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 0;
}

#
# 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 0;
}

#----





More information about the PlanetCCRMA mailing list