summaryrefslogtreecommitdiff
path: root/palsa.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-16 13:31:04 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-16 13:31:04 +0200
commitf945a8165712b034f78c0a480f3ccfa75d1921d1 (patch)
treea625ead2d026df81dc5c349cf70c0bb83a481a59 /palsa.c
parentda13027c2b6bdcd52bfe7fa191f22c634aff64f5 (diff)
fixed hang in alsa driver
Diffstat (limited to 'palsa.c')
-rw-r--r--palsa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/palsa.c b/palsa.c
index 00689078..30c5e210 100644
--- a/palsa.c
+++ b/palsa.c
@@ -281,16 +281,14 @@ static void
palsa_thread (uintptr_t context) {
int err;
for (;;) {
- mutex_lock (mutex);
if (alsa_terminate) {
- mutex_unlock (mutex);
break;
}
if (state != 1) {
- usleep (1000);
- mutex_unlock (mutex);
+ usleep (10000);
continue;
}
+ mutex_lock (mutex);
/* wait till the interface is ready for data, or 1 second
has elapsed.
*/