Re: [PATCH v2 1/2] ALSA: pcm: rewrite snd_pcm_playback_silence()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> 
> ---
> 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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux