Re: [PATCH 2/6] pcm:direct: fix race on clearing timer events

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

 



On Fri, 17 Feb 2017 08:15:56 +0100,
sutar.mounesh@xxxxxxxxx wrote:
> 
> From: Andreas Pape <apape@xxxxxxxxxxxxxx>
> 
> snd_timer handling is racy: plugins clear timer queue if avail_min
> is not reached to force a sleep on timer. The race can happen if
> the expected event arrives in between the avail check and the
> clearing of pending events. If this race happens, the user will
> unnecessarily wait for one more timer event. On low latency/realtime
> streams this can lead to xruns and must be avoided.
> 
> As a fix we recheck avail after having cleared poll events.
> 
> Signed-off-by: Andreas Pape <apape@xxxxxxxxxxxxxx>
> Signed-off-by: Jiada Wang <jiada_wang@xxxxxxxxxx>
> Signed-off-by: Mounesh Sutar <sutar.mounesh@xxxxxxxxx>

Applied, 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