summaryrefslogtreecommitdiff
path: root/package/alsa-lib/patches/patch-src_pcm_pcm_shm_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-04-04 13:49:55 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-04-04 13:49:55 +0200
commit764fb0eb598e94e18ac76b7bf7b9afdaa1e46c5f (patch)
tree82ff75052954b80abd51827b1edc2ffbcd7d6298 /package/alsa-lib/patches/patch-src_pcm_pcm_shm_c
parent78127212d0aaa988eb05226879b59c6238a287b3 (diff)
use nanosleep instead of usleep
Diffstat (limited to 'package/alsa-lib/patches/patch-src_pcm_pcm_shm_c')
-rw-r--r--package/alsa-lib/patches/patch-src_pcm_pcm_shm_c23
1 files changed, 23 insertions, 0 deletions
diff --git a/package/alsa-lib/patches/patch-src_pcm_pcm_shm_c b/package/alsa-lib/patches/patch-src_pcm_pcm_shm_c
new file mode 100644
index 000000000..decd44bc8
--- /dev/null
+++ b/package/alsa-lib/patches/patch-src_pcm_pcm_shm_c
@@ -0,0 +1,23 @@
+--- alsa-lib-1.0.22.orig/src/pcm/pcm_shm.c 2009-12-16 16:18:51.000000000 +0100
++++ alsa-lib-1.0.22/src/pcm/pcm_shm.c 2010-04-04 10:53:44.000000000 +0200
+@@ -482,15 +482,19 @@ static int snd_pcm_shm_drop(snd_pcm_t *p
+
+ static int snd_pcm_shm_drain(snd_pcm_t *pcm)
+ {
++ struct timespec ts;
+ snd_pcm_shm_t *shm = pcm->private_data;
+ volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
+ int err;
++ ts.tv_sec = 0;
++ ts.tv_nsec = 10000000;
++
+ do {
+ ctrl->cmd = SNDRV_PCM_IOCTL_DRAIN;
+ err = snd_pcm_shm_action(pcm);
+ if (err != -EAGAIN)
+ break;
+- usleep(10000);
++ nanosleep(&ts, NULL);
+ } while (1);
+ if (err < 0)
+ return err;