From: Clemens Ladisch <clemens@ladisch.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: alsa-devel@alsa-project.org, Smilen Dimitrov <sd@imi.aau.dk>
Subject: Re: Questions about virtual ALSA driver (dummy), PortAudio and full-duplex drops
Date: Tue, 06 Aug 2013 15:04:13 +0200 [thread overview]
Message-ID: <5200F44D.4070104@ladisch.de> (raw)
In-Reply-To: <5200E0FE.1000205@canonical.com>
David Henningsson wrote:
> On 08/06/2013 12:59 PM, Clemens Ladisch wrote:
>>> On 2013-07-25 10:37, Clemens Ladisch wrote:
>>>> Your driver's .pointer callback must report the *actual* position at
>>>> which the hardware has finished reading from the buffer
>>
>> ... for a playback stream, or finished reading, for a capture stream.
>
> What if the pointer granularity is very coarse? E g, some hardware might
> only be able what period you're in (IIRC, I've seen this on the Tegra
> platform), rather than the actual sample. Would you recommend to report
> the latest period boundary in that case, or interpolating it with timers?
By reporting position x, the driver guarantees that the device has
finished reading (for a playback stream) before x, and that the
application is allowed to overwrite the buffer before x with new sample
data.
When the driver does not know the current position of the DMA
controller, it must report the last known 'safe' position (and set
SNDRV_PCM_INFO_BLOCK_TRANSFER).
Regards,
Clemens
next prev parent reply other threads:[~2013-08-06 13:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 2:54 Questions about virtual ALSA driver (dummy), PortAudio and full-duplex drops Smilen Dimitrov
2013-07-24 13:03 ` Alan Horstmann
2013-07-25 0:29 ` Smilen Dimitrov
2013-07-25 8:37 ` Clemens Ladisch
2013-08-04 0:05 ` Smilen Dimitrov
2013-08-06 10:59 ` Clemens Ladisch
2013-08-06 11:41 ` David Henningsson
2013-08-06 13:04 ` Clemens Ladisch [this message]
2013-08-08 2:50 ` Smilen Dimitrov
2013-08-14 14:30 ` Questions about virtual ALSA driver (dummy), PortAudio and full-duplex drops (playback) Smilen Dimitrov
2013-08-15 4:17 ` Raymond Yau
2013-08-16 5:20 ` Smilen Dimitrov
2013-09-13 6:23 ` Questions about virtual ALSA driver (dummy), PortAudio and full-duplex drops (full-duplex: latency.c) Smilen Dimitrov
2013-09-17 16:07 ` Smilen Dimitrov
2013-10-21 14:48 ` [Solved] Questions about virtual ALSA driver (dummy), PortAudio and full-duplex Smilen Dimitrov
2013-07-24 18:30 ` [Audacity-devel] Questions about virtual ALSA driver (dummy), PortAudio and full-duplex drops Richard Ash
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=5200F44D.4070104@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.henningsson@canonical.com \
--cc=sd@imi.aau.dk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).