From: Takashi Iwai Subject: Re: Re: Switch to dmix pure by default? Date: Thu, 20 Oct 2005 11:56:46 +0200 Message-ID: References: <20051019154420.GA14091@piware.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Mike Hearn Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 19 Oct 2005 19:17:37 +0100, Mike Hearn wrote: > > On Wed, 19 Oct 2005 19:02:23 +0200, Takashi Iwai wrote: > > dmix uses mmap, and assumes fine enough periods. So, it wouldn't work > > well the cards supporting only 2 periods, for example. > > Is that for performance? I don't really understand why dmix can't just, > well, mix the streams together and then forward it on as a regular > bytestream using the non-mmap interface. Esound works with any hardware, > so couldn't dmix have a compatibility mode? The question is not doable or not. It's a completely different design. The mix "server" like esound does: - _read_ the data from clients - mix them - wright them to h/w Because of this mechanism, it requires smaller period to achieve the low latency. OTOH, dmix lets its processes mixing by themselves. There is no read or write server operation, i.e. there is no real mix "server". (In practice, dmix has a resource server, which is used only to pass the file descriptor for mmap.) Each client mmaps the very same h/w buffer, and add/sub the data on the buffer atomically as write. Of course, it's possible to implement ALSA-mixing server a la esound/arts for the hardwares without mmappable buffers. But, it's just an idea and a plan, so far. Volunteers are always appreciated ;) Takashi ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl