All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Giuliano Zannetti - ART S.p.A. <giuliano.zannetti@artgroup-spa.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"tiwai@suse.com" <tiwai@suse.com>
Subject: Re: I: dmix optimization
Date: Tue, 03 Aug 2021 09:34:05 +0200	[thread overview]
Message-ID: <s5hv94nvv6a.wl-tiwai@suse.de> (raw)
In-Reply-To: <DB9P192MB132136A569299BDE4E11AB90C5F09@DB9P192MB1321.EURP192.PROD.OUTLOOK.COM>

On Tue, 03 Aug 2021 09:26:38 +0200,
Giuliano Zannetti - ART S.p.A. wrote:
> 
(snip) 
> Could it be possible check for the first sample of the period only, as
> reported in the code below?

No, unfortunately your suggested optimization won't work reliably, I'm
afraid.

Each application may write samples partially, not always in period
size.  Also, the hardware may clear the buffer right after the hwptr
is updated, and again, it's not always in period size.  So, just
checking the first sample doesn't guarantee the rest period size is
also zero or non-zero.


thanks,

Takashi

      reply	other threads:[~2021-08-03  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02  9:25 dmix optimization Giuliano Zannetti - ART S.p.A.
2021-08-02 16:27 ` Geraldo Nascimento
2021-08-03  7:26 ` I: " Giuliano Zannetti - ART S.p.A.
2021-08-03  7:34   ` 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=s5hv94nvv6a.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=giuliano.zannetti@artgroup-spa.com \
    --cc=tiwai@suse.com \
    /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.