From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: HPPA Harmony driver Date: Tue, 05 Nov 2002 18:26:11 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20021105103955.2f35f217.lc@tekila.org> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20021105103955.2f35f217.lc@tekila.org> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Laurent Canet Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org Hi, At Tue, 5 Nov 2002 10:39:55 +0100, Laurent Canet wrote: > > > Hi there, > > I'm working on the ALSA port of a linux audio driver. This is for the harmony chipset, which is found in some HP PA/RISC workstations. > This chipset is relatively old (datasheets mentions 93), however it supports 16bit 48Khz stereo playback & recording. > The driver already exists in the 2.4 linux kernel, but to comply with plans for 2.6 kernel, we wish to switch it in an ALSA form. > > I've converted most of the code (which still needs to be tested and debugged) to alsa 0.9, using dummy.c as a skeleton. > I have a question: > - What is exactly the pointer function, what does it returns (in normal operation) ? the pointer callback functions returns the current hardware pointer. that is, in the case of playback, the position in the DMA buffer which is currently played (or at least has been played very recently). this callback is called usually from the ALSA's middle-level routine which is called from interrupt handler, and updates the current position, and commit/adjust the next transfer size. please note the return value is _in frames_. in general, ALSA handles the size in frames, not in bytes. frames per bytes = # channels * sample-byte-size e.g. for 2 channel stereo in 16bit format, 1 frame corresponds to 4 bytes. there are helper functions to convert the units, found in pcm.h. the return value of pointer callback is bounded between 0 and buffer size - 1 (again in frames). Takashi ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en