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

Jaroslav Kysela perex at perex.cz
Tue Nov 2 09:34:02 CET 2010


On Tue, 2 Nov 2010, Clemens Ladisch wrote:

>> + * 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.

Reading this - the poll() inside the driver may return POLLERR when no 
period updates are invoked in the driver. It does not make much sense to 
block the application when we know that the wake up function is not 
supported.

Also all wait functions in alsa-lib should be reviewed and changed to 
return an error. Also, the blocking behaviour should not be allowed - it 
means that apps must use SND_PCM_NONBLOCK or snd_pcm_nonblock(pcm, 1) for 
this mode.

 						Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.



More information about the Alsa-devel mailing list