[alsa-devel] [PATCH 2/2] add API to allow disabling period interrupt

Clemens Ladisch clemens at ladisch.de
Tue Nov 2 09:23:06 CET 2010


Sorry for not answering sooner.

Pierre-Louis Bossart wrote:
> (No filtering in pcm_multi and pcm_direct info fields)

I'm not sure whether filtering or not filtering would be a good idea for
yet unknown flags.

> + * It is not allowed to call this function when given configuration is not exactly one.
> ...
> +int snd_pcm_hw_params_can_disable_period_irq(const snd_pcm_hw_params_t *params)

This function is useless because it cannot be called before
snd_pcm_hw_params_set_period_irq().

> + * This function should be called only on devices where
> + * #snd_pcm_hw_params_can_disable_period_irq() returns true. (too late, FIXME)

Therefore, this paragraph needs to go away.

I think there should be a flag that can be added to snd_pcm_open, like
SND_PCM_NO_AUTO_RESAMPLE.

> + * Even with disabled period interrupts, the period size/time/count parameters
> + * are valid; it is suggested to use #snd_pcm_hw_params_set_period_size_last().
> + *
> + * When period interrupts are disabled, the application must not use poll() or
> + * any functions that could block on this device.

We should also mention that the application must call some update
function often enough.


Regards,
Clemens


More information about the Alsa-devel mailing list