]> Pileus Git - ~andy/linux/commit
ALSA: pcsp - Fix locking messes in snd-pcsp
authorTakashi Iwai <tiwai@suse.de>
Mon, 11 Aug 2008 08:18:39 +0000 (10:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 20 Oct 2008 12:47:15 +0000 (14:47 +0200)
commit96c7d478efad594e483ee8a826395b1342404885
tree8ecb6f20f1f72f9d406b3c949d9b811347dcbb3e
parent76a4d10e522bfc238ddf70f35272088d420d2dcf
ALSA: pcsp - Fix locking messes in snd-pcsp

snd-pcsp driver takes chip->substream_lock together with PCM substream
lock.  These are even mixed up with hrtimer's lock, resulting in messy
lock depencies.  Right now, snd-pcsp driver resolves the deadlock by
using HRTIMER_CB_SOFTIRQ.  However, this isn't nice for a really fast
path like bit-flipping.

This patch introduces a tasklet for PCM period handling so that the
hrtimer callback can be handled fast.  This also reduce the use of
chip->substream_lock to avoid deadlocks.  It's still used in pointer
callback, but even this could be removed with a proper barrier.

Another good solution is to introduce async trigger callback.  But,
this will involve with a major rewrite of the PCM core code, so I
take first this easy fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/pcsp/pcsp.c
sound/drivers/pcsp/pcsp.h
sound/drivers/pcsp/pcsp_lib.c