diff options
author | waker <wakeroid@gmail.com> | 2009-08-16 13:31:04 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-16 13:31:04 +0200 |
commit | f945a8165712b034f78c0a480f3ccfa75d1921d1 (patch) | |
tree | a625ead2d026df81dc5c349cf70c0bb83a481a59 /palsa.c | |
parent | da13027c2b6bdcd52bfe7fa191f22c634aff64f5 (diff) |
fixed hang in alsa driver
Diffstat (limited to 'palsa.c')
-rw-r--r-- | palsa.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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. */ |