[alsa-devel] Question about dmix?
Hi all, I know alsa support userspace software multi-playback by dmix plugin. How does it realize? I expected a daemon accepting multi-streams which then mixes these streams to a single one -- it seems not the case.
Regards,
'Twas brillig, and cee1 at 20/03/10 14:05 did gyre and gimble:
Hi all, I know alsa support userspace software multi-playback by dmix plugin. How does it realize? I expected a daemon accepting multi-streams which then mixes these streams to a single one -- it seems not the case.
I believe an older version of dmix used to act like a daemon, but the current version no longer does this and instead uses some magic spells that I don't even being to know about.
As far as userspace mixing goes, most linux distros and a lot of embedded systems (e.g. smartphones) now use PulseAudio which does run as a stand alone daemon and opens a single stream to alsa. It does much more than just mixing, but it fits in with your paradigms :)
See http://pulseaudio.org for more info.
Col
2010/3/20 Colin Guthrie gmane@colin.guthr.ie:
'Twas brillig, and cee1 at 20/03/10 14:05 did gyre and gimble:
Hi all, I know alsa support userspace software multi-playback by dmix plugin. How does it realize? I expected a daemon accepting multi-streams which then mixes these streams to a single one -- it seems not the case.
I believe an older version of dmix used to act like a daemon, but the current version no longer does this and instead uses some magic spells that I don't even being to know about.
My soundcard is driven by an experimental alsa driver, it seems always underrun the buffer and causes bad quality in playback. Disable dmix will improve playback quality a little. I'm curious about what does dmix do internally.
Regards,
cee1 wrote:
I know alsa support userspace software multi-playback by dmix plugin. How does it realize? I expected a daemon accepting multi-streams which then mixes these streams to a single one -- it seems not the case.
The kernel maps the device's DMA buffer into all userspace processes; the processes then cooperate in adding samples to the buffer.
Regards, Clemens
participants (3)
-
cee1
-
Clemens Ladisch
-
Colin Guthrie