Re: [PATCH 5/6 v2] alsa-lib:pcm: check state before enter poll on timer.

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

 



On Thu, 05 Jan 2017 14:29:43 +0100,
sutar.mounesh@xxxxxxxxx wrote:
> 
> From: Andreas Pape <apape@xxxxxxxxxxxxxx>
> 
> To avoid the chances of timeout, we need to check the enter poll
> in state xrun.
> 
> Signed-off-by: Andreas Pape <apape@xxxxxxxxxxxxxx>

Please give your sign-off, too, as you submitted the patch.

> +int snd_pcm_direct_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds,
> +				    unsigned int space)
> +{
> +	if (pcm->poll_fd < 0) {
> +		SNDMSG("poll_fd < 0");
> +		return -EIO;
> +	}
> +	if (space >= 1 && pfds) {
> +		pfds->fd = pcm->poll_fd;
> +		pfds->events = pcm->poll_events | POLLERR | POLLNVAL;
> +	} else {
> +		return 0;
> +	}
> +
> +	/*this will also evaluate slave state and enter xrun if necessary*/

Put spaces.


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



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

  Powered by Linux