From: David Henningsson <david.henningsson@canonical.com>
To: Clemens Ladisch <clemens@ladisch.de>
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 13:41:50 +0200 [thread overview]
Message-ID: <5200E0FE.1000205@canonical.com> (raw)
In-Reply-To: <5200D712.2040800@ladisch.de>
On 08/06/2013 12:59 PM, Clemens Ladisch wrote:
> Smilen Dimitrov 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.
Hi Clemens,
I'm not involved with Smilen but still find the questions interesting,
so as always, thanks for sharing your knowledge :-)
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?
This is also interesting to PulseAudio which likes to rewind buffers and
so on, and relies on a good pointer granularity.
>> The card then, uses it's own clock, which is not burdened with
>> anything else but filling buffers, meaning we can expect tight timing
>> here; and when it generates an IRQ, it is handled by kernel with
>> highest priority - ergo, not so much jitter. Timer functions, on the
>> other hand, run in softIRQ context - meaning they (and their
>> scheduling) could be preempted by the hardware IRQ of any other device
>> on the system; ergo, more jitter. Is this reasonable to assume?
>
> Yes, but other hardware interrupts interfere only if other devices are
> used at the same time.
Also, it applies to kernel-space only. If you want to process anything
in userspace, you can still be interrupted by any kernel process -
hardIRQ, softIRQ or even other kernel tasks.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
next prev parent reply other threads:[~2013-08-06 11:41 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 [this message]
2013-08-06 13:04 ` Clemens Ladisch
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=5200E0FE.1000205@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--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).