All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 1/2] ALSA: pcm: rewrite snd_pcm_playback_silence()
Date: Fri, 21 Apr 2023 13:10:44 +0200	[thread overview]
Message-ID: <877cu5sd6z.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230420113324.877164-1-oswald.buddenhagen@gmx.de>

On Thu, 20 Apr 2023 13:33:23 +0200,
Oswald Buddenhagen wrote:
> 
> The auto-silencer supports two modes: "thresholded" to fill up "just
> enough", and "top-up" to fill up "as much as possible". The two modes
> used rather distinct code paths, which this patch unifies. The only
> remaining distinction is how much we actually want to fill.
> 
> This fixes a bug in thresholded mode, where we failed to use new_hw_ptr,
> resulting in under-fill.
> 
> Top-up mode is now more well-behaved and much easier to understand in
> corner cases.
> 
> This also updates comments in the proximity of silencing-related data
> structures.
> 
> Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
> 
> ---
> v2:
> - removed useless boundary check
> - got rid of casts by using a signed type for deltas.
>   i did not adjust the style of the conditionals, because it's not clear
>   whether the hangup was actually over that, or merely over the casts.
> - dropped use of C99 comments where the surroundings suggest it.
>   (in the case of the interspersed multi-line comments, that doesn't
>   look like an improvement to me at all ...)
> - swapped the `added` and `hw_avail` calculation blocks to reduce
>   subsequent churn. it's more logical that way anyway.

Applied this one.  For the second patch, let's discuss further.


thanks,

Takashi

      parent reply	other threads:[~2023-04-21 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 11:33 [PATCH v2 1/2] ALSA: pcm: rewrite snd_pcm_playback_silence() Oswald Buddenhagen
2023-04-20 11:33 ` [PATCH v2 2/2] ALSA: pcm: auto-fill buffer with silence when draining playback Oswald Buddenhagen
2023-04-21  9:33   ` Jaroslav Kysela
2023-04-21 10:04     ` Oswald Buddenhagen
2023-04-21 13:29       ` Jaroslav Kysela
2023-04-21  9:20 ` [PATCH v2 1/2] ALSA: pcm: rewrite snd_pcm_playback_silence() Jaroslav Kysela
2023-04-21 11:10 ` 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=877cu5sd6z.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=oswald.buddenhagen@gmx.de \
    /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.