staging: line6: wait for urbs in snd_line6_prepare()
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 <484520986196e4a799496429ce8a499eb6488adb@gmail.com>
Signed-off-by: Markus Grabner <1c926e80c6b4af4ea9d55d5a4896d5e2e7abd3af@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs