Re: [PATCH alsa-lib 3/4] pcm: hw: introduce SNDRV_PCM_INFO_PERFECT_DRAIN

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

 



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



[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