From: Raymond Yau <superquad.vortex2@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: safe support for rewind in ALSA
Date: Tue, 4 May 2010 10:31:58 +0800 [thread overview]
Message-ID: <l2m4f3252891005031931nc318e116k3534259a8f3d5f6f@mail.gmail.com> (raw)
In-Reply-To: <20100221202144.GG31800@tango.0pointer.de>
2010/2/22 Lennart Poettering <mznyfn@0pointer.de>
> On Sun, 21.02.10 12:06, Kai Vehmanen (kvehmanen@eca.cx) wrote:
>
> >
> > Hi,
> >
> > On Thu, 11 Feb 2010, Jaroslav Kysela wrote:
> >
> > >> However, PA ignores the sound card's interrupts and is woken up by its
> > >> own timer.
> > >
> > > PA can drive the wake-ups using avail_min sw parameter. If this value
> is
> > > high enough, no userspace wake up is called, only interrupt is
> processed
> > > and internal ring buffer pointers in the driver are updated.
> >
> > but that's unfortunately not enough. AFAIK glitch-free aims, among other
> > things, to minimize power usage for battery powered devices, and to do
> > that, you need to minimize hardware interrupts [1]. And for that,
> > avail_min won't help.
> >
> > [1] this is exactly the same thing that is driving Linux tickless
> > development:
> > http://www.lesswatts.org/projects/tickless/
> >
> > PS I do agree that avail_min is a very useful, and often overlooked
> > feature, of ALSA. But in this specific case it won't help...
>
> We try our best to minimize wakeups by setting the minimal number of
> periods in PA. Unfortunately that still means one gets 2 or 1 irqs per
> buffer iteration.
>
> However even if we get those two wakeups, using avail_min allows us to
> minimize the number of processes that are woken up on that
> IRQ. i.e. if the CPU is woken up, it is still better when this only
> means some IRQ in the kernel is processed, then passing it into
> userspace.
>
> Lennart
>
>
Has any one try the patch posted in
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/6671
>> Rewinding the ring buffer completely causes audible issues with DMAs.
Previous solution didn't work with tsched=0, and used tsched_watermark
for guardband, which isn't linked to hardware and could become really high
if underflows occurred.
Why PA alway rewind the buffer when the stream connects ?
When you rewind the application pointer to hardware pointer ?
next prev parent reply other threads:[~2010-05-04 2:38 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 17:20 safe support for rewind in ALSA pl bossart
2010-02-01 18:00 ` Jaroslav Kysela
2010-02-01 22:40 ` pl bossart
2010-02-03 2:20 ` Raymond Yau
2010-02-03 18:03 ` Kai Vehmanen
2010-02-03 20:52 ` Kai Vehmanen
2010-02-03 22:57 ` pl bossart
2010-02-08 1:22 ` Raymond Yau
2010-02-02 2:53 ` Raymond Yau
2010-02-06 11:59 ` Raymond Yau
2010-02-17 15:30 ` Lennart Poettering
2010-02-18 1:31 ` Raymond Yau
2010-02-18 2:33 ` Lennart Poettering
2010-02-18 3:21 ` Raymond Yau
2010-02-01 18:01 ` Mark Brown
2010-02-01 18:05 ` Jaroslav Kysela
2010-02-01 21:28 ` Kai Vehmanen
2010-02-01 21:54 ` Kai Vehmanen
2010-02-08 22:59 ` Raymond Yau
2010-02-09 20:54 ` Kai Vehmanen
2010-02-10 13:19 ` Raymond Yau
2010-02-10 13:36 ` Clemens Ladisch
2010-02-11 6:52 ` Raymond Yau
2010-02-11 7:20 ` Clemens Ladisch
2010-02-11 7:27 ` Jaroslav Kysela
2010-02-15 3:03 ` Raymond Yau
2010-02-17 15:46 ` Lennart Poettering
2010-02-21 10:35 ` Kai Vehmanen
2010-02-22 9:07 ` Raymond Yau
[not found] ` <20100221203500.GH31800@tango.0pointer.de>
2010-02-22 19:15 ` semantics of SNDRV_PCM_INFO_BATCH (was: Re: safe support for rewind in ALSA) Kai Vehmanen
2010-02-23 7:02 ` Raymond Yau
2010-02-23 2:37 ` safe support for rewind in ALSA Raymond Yau
2010-02-23 2:44 ` Raymond Yau
2010-02-17 15:42 ` Lennart Poettering
2010-02-21 10:06 ` Kai Vehmanen
[not found] ` <20100221202144.GG31800@tango.0pointer.de>
2010-05-04 2:31 ` Raymond Yau [this message]
2010-02-17 15:39 ` Lennart Poettering
2010-02-17 15:36 ` Lennart Poettering
2010-02-17 15:35 ` Lennart Poettering
2010-02-01 22:10 ` Kai Vehmanen
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=l2m4f3252891005031931nc318e116k3534259a8f3d5f6f@mail.gmail.com \
--to=superquad.vortex2@gmail.com \
--cc=alsa-devel@alsa-project.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 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).