[alsa-devel] dmix without mmap support in soundcard driver
mls.JOFT at gmx.de
Sun Jan 6 11:15:35 CET 2008
On Wed, 2008-01-02 at 06:26 +0000, cailinhua wrote:
> I want to enable dmix for our sound card.Unfortunately for some reason the sound card driver don't support
> 'mmap' way,it only support 'copy' callback to copy data from upper level to DMA.So ,I think maybe I can modify
> the alsa-lib dmix source code to let it use 'copy' way to send data to the driver. Is it possible？
> Could you please give me some ideas?
I don't know how difficult it would be to change alsa-lib's dmix
sources, but my suggestion - in general - would be to alter the driver
of your sound card to use the "intermediate buffer" technique (using
pcm-indirect.h): Setup a buffer in RAM, which can be mmap'ed by
applications and copy the contents of this buffer to the hardware in a
background process for example.
(See Takashi's "Writing an ALSA Driver" guide.)
I know, perhaps this is not the easiest solution ... and it's not a
"direct" answer to your question - just a thought.
More information about the Alsa-devel