On Wed, 19 Mar 2003, Takashi Iwai wrote:

> At Wed, 19 Mar 2003 17:49:51 +0100 (CET),
> Jaroslav wrote:
> > 
> > Hi all,
> > 
> >     the dmix plugin was extended to support channel bindings and 
> > mixing code for 32-bit samples (24-bit resolution).
> >     I'd like to introduce new two plugins (seems also "most wanted" by
> > ALSA users): dsnoop and dshare. The dsnoop plugin allows spliting of one
> > stream to more applications. And finally the dshare plugin does sharing of
> > channels (thus you may use your multi-channel device for separated
> > independent tasks). The ALSA configuration syntax for both of new plugins
> > is same as for the dmix plugin. Please note that dshare plugin must have
> > the bindings section with unique destination channels otherwise it won't
> > work.
> 
> great!
> it seems that the last meeting stimulated you so effectively :)
> 
> 
> could you post a couple of example configurations and usages?

Sure. First example is for the dmix plugin and ice1712 (10 playback 
channels - last two are S/PDIF, so this configuration allows sharing of 
the S/PDIF jack):

pcm.dmix_spdif {
        type dmix
        ipc_key 5678293
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
        }
        bindings {
                0 8
                1 9
        }
}

If you want to share first two analog channels with another applications, 
simply use the same ipc_key configuration:

pcm.dmix_analog {
        type dmix
        ipc_key 5678293
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
        }
        bindings {
                0 0
                1 1
        }
}

Next example is for the dsnoop plugin (also ice1712, S/PDIF capture):

pcm.dsnoop_spdif {
        type dsnoop
        ipc_key 5978293
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
        }
        bindings {
                0 8
                1 9
        }
}

If you ommit the "bindings" section, you'll get all channels. Also, you 
may define more pcm types with same ipc_key configuration with different 
bindings as well.

And finally the dshare plugin (used standard stereo device and using left 
and right channels separately):

pcm.dshare_left {
        type dshare
        ipc_key 6678293
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
        }
        bindings {
                0 0
        }
}

pcm.dshare_right {
        type dshare
        ipc_key 6678293
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
        }
        bindings {
                0 1
        }
}

Final words: I am very happy that we can do these things completely in the
user space but without client/server mechanisms as we promised at the 
beginning of the development.

                                                Jaroslav

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



-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to