On Wed, 26 Mar 2003, Giuliano Pochini wrote:

> 
> On 26-Mar-2003 Takashi Iwai wrote:
> > the "pcm substreams" belong to each pcm stream.  when you open a pcm
> > device, one pcm substream will be used at each time.
> > snd_pcm_new() takes the argument how many pcm substreams are created
> > for each pcm stream.  you can give more than one here only if the
> > hardware supports multiple-playback/capture, such as emu10k1.
> > otherwise, these arguments must be 1 or 0.
> 
> The hw supports it. My cards has 8 analog outputs that can be used
> indipendently or grouped. From inside hw_params callback I have no
> way to know which channels the user wants to use. My idea is to tell
> snd_pcm_new() to create 8 playback substreams. When an app opens
> substream N, C channels wide, I use substream N, and I make
> substreams from N+1 to N+C-1 not available.

It's a bit tricky. I'd prefer to allocate different PCM devices for this 
behaviour:

#0 - four stereo substreams
#1 - one 8-channel substream
#2 - eight mono substreams

So the user has always equal substreams.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to