<br><br><div class="gmail_quote">On Sun, Oct 7, 2012 at 4:03 PM,  <span dir="ltr"><<a href="mailto:grekimj@acousticrefuge.com" target="_blank">grekimj@acousticrefuge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

First, what I would like to do is pick which channel I send audio to on the RME 9632 card. <br>
My RME card is device 0.  <br>
When I call this function:  snd_pcm_open(&handle,device,SND_PCM_STREAM_PLAYBACK,0)<br>
<br>
And set device = plughw:0,0   I get playback across all the RME outputs.<br>
(Just using hw:0,0  without the "plug" prefix does not work for some reason which may or may not matter.)<br></blockquote><div><br>with ALSA, devices named "hw:..." can only be configured in ways that match the hardware capabilities of the device. no configuration that requires the driver or libasound to resample, reformat etc. etc. are allowed. note that this includes the number of channels, so if the h/w has N 
channels you cannot configure it for anything other than N channels.<br><br>"plughw:..." devices are much more flexible and will use the full capabilities (such as they are) of the driver and libasound to provide a much broader configuration space. <br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, how do I access the subdevices/channels?  <br>
When I run aplay -l I only see 1/1 subdevices.<br>
Shouldn't I be able to set my device to hw:0,0,1 or plughw:0,0,1 to access channel 2, for example?<br></blockquote><div><br>multichannel devices are multichannel devices. you don't open a different device to get to different channels. you open it, and get a device with as many channels as you specified. they will start at physical channel zero, unless you use a psuedo-device (typically defined via an ~/.asoundrc file) that maps physical channels to channels in the pseudo-device.<br>
<br>the way in which you access each channel depends on the configuration parameters you use with the device. all the code i write uses non-interleaved format, so that each channel's samples consist of a contiguous block. some people prefer interleaved. <br>
<br>if you are just trying to write a functioning application rather than learn to use ALSA, you will find it MUCH MUCH easier to just use JACK. if you want to learn ALSA, be prepared to do a lot of reading of (a) the rather non-explanatory reference documentation (b) finding examples of other source code that uses ALSA in this way (e.g. JACK).<br>
<br>--p<br><br></div></div>