]> git.baikalelectronics.ru Git - kernel.git/commit
staging: line6: wait for urbs in snd_line6_prepare()
authorStefan Hajnoczi <stefanha@gmail.com>
Sat, 10 Dec 2011 01:12:31 +0000 (02:12 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 10 Dec 2011 03:26:09 +0000 (19:26 -0800)
commit8816b9ed87e4a399e1d8ddaa48480b731a2c3bbc
treebe05667a4ad2417a3853178d9e06c9ff8cae67f1
parented95be3673107c68600e1a84307e3c6495b89f47
staging: line6: wait for urbs in snd_line6_prepare()

The .trigger() pcm callbacks are not allowed to block and cannot wait
until urbs have completed.  We need to ensure that stopping, preparing,
and then restarting a stream always works.

Currently the driver will sometimes return -EBUSY when restarting the
stream because urbs have not completed yet.  This can be triggered by
jackd from userspace.

The solution is to wait on urbs in the .prepare() pcm callback since
blocking is allowed in that callback.  This guarantees that all urbs are
quiesced and ready to be submitted when the start trigger callback is
invoked.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/line6/pcm.c