Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [PATCH alsa-lib 3/4] pcm: hw: introduce SNDRV_PCM_INFO_PERFECT_DRAIN
Date: Wed, 3 May 2023 13:25:17 +0200	[thread overview]
Message-ID: <ZFJEncyUfjnSicnL@ugly> (raw)
In-Reply-To: <20230502115010.986325-4-perex@perex.cz>

On Tue, May 02, 2023 at 01:50:09PM +0200, Jaroslav Kysela wrote:
>The driver may not require to touch the sample stream
>
"touching"

>for the drain operation at all.
>Handle this situation in alsa-lib.
>
this is weird without already knowing the context. i'd instead write:

   Handle the driver informing us that it is not necessary to set up 
   silencing upon playback draining. This will be the case for drivers 
   which are guaranteed to not read any samples beyond the application 
   pointer.

>--- a/src/pcm/pcm.c
>+++ b/src/pcm/pcm.c
>@@ -3707,6 +3707,29 @@ int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *param
> 	return !!(params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP);
> }
> 
>+/**
>+ * \brief Check if hardware does perfect drain
>
"(is a) perfect drain" vs. "does draining".

>+ * \param params Configuration space
>+ * \retval 0 Hardware doesn't do perfect drain
>+ * \retval 1 Hardware does perfect drain
>+ *
>+ * This function should only be called when the configuration space
>
"should be called only when"

>+ * contains a single configuration. Call #snd_pcm_hw_params to choose
>+ * a single configuration from the configuration space.
>+ *
>+ * The perfect drain means that the hardware does not use samples
>
see above. i guess one way to write it here would be

   "Perfect drain" means [...]

>+ * beyond the stream application pointer.
>+ */

regards

  reply	other threads:[~2023-05-03 11:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 11:50 [PATCH alsa-lib 0/4] pcm: hw: implement explicit silencing for snd_pcm_drain Jaroslav Kysela
2023-05-02 11:50 ` [PATCH alsa-lib 1/4] pcm: hw: setup explicit silencing for snd_pcm_drain by default Jaroslav Kysela
2023-05-03 11:20   ` Oswald Buddenhagen
2023-05-03 20:19     ` Oswald Buddenhagen
2023-05-03 20:31       ` Jaroslav Kysela
2023-05-05 18:56   ` Oswald Buddenhagen
2023-05-02 11:50 ` [PATCH alsa-lib 2/4] pcm: hw: add drain_silence configuration keyword Jaroslav Kysela
2023-05-03 11:24   ` Oswald Buddenhagen
2023-05-03 14:22     ` Jaroslav Kysela
2023-05-03 15:39       ` Oswald Buddenhagen
2023-05-02 11:50 ` [PATCH alsa-lib 3/4] pcm: hw: introduce SNDRV_PCM_INFO_PERFECT_DRAIN Jaroslav Kysela
2023-05-03 11:25   ` Oswald Buddenhagen [this message]
2023-05-04  8:18   ` Takashi Iwai
2023-05-04  8:31     ` Jaroslav Kysela
2023-05-04 12:50       ` Takashi Iwai
2023-05-02 11:50 ` [PATCH alsa-lib 4/4] pcm: hw: introduce SNDRV_PCM_HW_PARAMS_DRAIN_SILENCE Jaroslav Kysela
2023-05-03 11:26   ` Oswald Buddenhagen

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=ZFJEncyUfjnSicnL@ugly \
    --to=oswald.buddenhagen@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    /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