]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: direct: Fix deadlock in poll_descriptors
authorTakashi Iwai <tiwai@suse.de>
Mon, 16 Jan 2017 15:21:52 +0000 (16:21 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Jan 2017 15:21:52 +0000 (16:21 +0100)
commit24e63b75275e9c923c336b8dba3919b980e8f234
tree209d12dc9c3757006ab368468c68508e1b9a5cb0
parent360c976aaa051809c34cb412ffa52380baeaabee
pcm: direct: Fix deadlock in poll_descriptors

The recent change in PCM direct plugins to check XRUN in
poll_descriptors callback caused a regression; as consequence, the
whole playback hangs up.

The culprit is a mutex dead lock by the call in snd_pcm_state() inside
the new snd_pcm_direct_poll_descriptors().  The poll_descriptors code
path is protected with pcm mutex, thus an unlocked version
(__snd_pcm_state()) has to be used inside the callback instead.

Fixes: 789ee39727a1 ("pcm: direct: check state before enter poll on timer")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_direct.c