Hi all,

        a next step to get the lowlatency sharing of exclusive PCM devices 
is in ALSA CVS - the dmix (direct mixing) plugin..
        How it works? Basically, the playback in driver runs forewer
without any xrun detection. The ring buffer (only just played areas) is
also silenced in each interrupt. Then we have multiple clients and a
process (server) which passes the file descriptor of playback devices to
them. The server also takes care about freeing of used shm memory and
semaphore.
        The big step forward is that we share one mmaped ring buffer
accross many processes and each process can add samples into it without
any process<->kernel swaps. Also, each processes are independant, thus
failing of one doesn't break others. It's not multithreaded, we don't need
this mechanism.

Here is an .asoundrc example configuration (plugin defaults are 48kHz, 
stereo, signed 16-bit little endian):

pcm.dmix {
        type dmix
        ipc_key 1234    # must be unique for all dmix plugins!!!!
        slave {
                pcm "hw:0,0"
        }
}

        Then try: 'aplay -Dplug:dmix <filename>' on multiple consoles.

        Note that it's still alpha code and there are some not correctly
implemented functions (like drain, rewind and more). Note that you'll need
also the latest ALSA driver from CVS, because the silence settings was
enhanced a bit and bug in the timer code will crash your machine.

                                        Enjoy it!
                                                Jaroslav

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



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to