From: Takashi Iwai <tiwai@suse.de>
To: Laurent Canet <lc@tekila.org>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: HPPA Harmony driver
Date: Tue, 05 Nov 2002 18:26:11 +0100 [thread overview]
Message-ID: <s5hof947wss.wl@alsa2.suse.de> (raw)
In-Reply-To: <20021105103955.2f35f217.lc@tekila.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
prev parent reply other threads:[~2002-11-05 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 9:39 HPPA Harmony driver Laurent Canet
2002-11-05 17:26 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hof947wss.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=lc@tekila.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.