From: Takashi Iwai Subject: Re: questions about simple alsa driver Date: Thu, 09 Feb 2006 15:01:13 +0100 Message-ID: References: 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: Sergey Kolosov Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 7 Feb 2006 13:54:34 +0300, Sergey Kolosov wrote: > > Hello. > I write alsa driver for device when not support dma which does not support dma. But I > write through emulation dma that worked mmap. I.e. on interruption data from dma > buffers are read out, writind in device and set hw_ptr for callback pointer. > 1) As is filled ring dma the buffer? I.e. whence I can read through a head of the > buffer? > 2) Filling of the buffer goes continuously or the separate periods are completely > filled only? And in general for what the periods are necessary? You need to keep a pseudo current-DMA position by yourself. This indicates the last position (offset) in the ring buffer where the data chunk was already transferred. So, it's updated soon after the data chunk is transferred in the interrupt handler. The PCM pointer callback simply returns this valud in frame unit. pcm-indirect.h contains some helper functions for such "indirect" PCM data transfers. Currently, only a few drivers (rme32, cs46xx and emu10k1 efx mode) use this and no good documentation is provided, unfortunately... Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642