diff options
Diffstat (limited to 'sound/oss/dmabuf.c')
-rw-r--r-- | sound/oss/dmabuf.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index 461d94cfecbe..e3f29132d3ac 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/gfp.h> | 29 | #include <linux/gfp.h> |
30 | #include "sound_config.h" | 30 | #include "sound_config.h" |
31 | #include "sleep.h" | ||
31 | 32 | ||
32 | #define DMAP_FREE_ON_CLOSE 0 | 33 | #define DMAP_FREE_ON_CLOSE 0 |
33 | #define DMAP_KEEP_ON_CLOSE 1 | 34 | #define DMAP_KEEP_ON_CLOSE 1 |
@@ -351,8 +352,7 @@ static void dma_reset_output(int dev) | |||
351 | if (!signal_pending(current) && adev->dmap_out->qlen && | 352 | if (!signal_pending(current) && adev->dmap_out->qlen && |
352 | adev->dmap_out->underrun_count == 0){ | 353 | adev->dmap_out->underrun_count == 0){ |
353 | spin_unlock_irqrestore(&dmap->lock,flags); | 354 | spin_unlock_irqrestore(&dmap->lock,flags); |
354 | interruptible_sleep_on_timeout(&adev->out_sleeper, | 355 | oss_broken_sleep_on(&adev->out_sleeper, dmabuf_timeout(dmap)); |
355 | dmabuf_timeout(dmap)); | ||
356 | spin_lock_irqsave(&dmap->lock,flags); | 356 | spin_lock_irqsave(&dmap->lock,flags); |
357 | } | 357 | } |
358 | adev->dmap_out->flags &= ~(DMA_SYNCING | DMA_ACTIVE); | 358 | adev->dmap_out->flags &= ~(DMA_SYNCING | DMA_ACTIVE); |
@@ -446,7 +446,7 @@ int DMAbuf_sync(int dev) | |||
446 | long t = dmabuf_timeout(dmap); | 446 | long t = dmabuf_timeout(dmap); |
447 | spin_unlock_irqrestore(&dmap->lock,flags); | 447 | spin_unlock_irqrestore(&dmap->lock,flags); |
448 | /* FIXME: not safe may miss events */ | 448 | /* FIXME: not safe may miss events */ |
449 | t = interruptible_sleep_on_timeout(&adev->out_sleeper, t); | 449 | t = oss_broken_sleep_on(&adev->out_sleeper, t); |
450 | spin_lock_irqsave(&dmap->lock,flags); | 450 | spin_lock_irqsave(&dmap->lock,flags); |
451 | if (!t) { | 451 | if (!t) { |
452 | adev->dmap_out->flags &= ~DMA_SYNCING; | 452 | adev->dmap_out->flags &= ~DMA_SYNCING; |
@@ -466,7 +466,7 @@ int DMAbuf_sync(int dev) | |||
466 | while (!signal_pending(current) && | 466 | while (!signal_pending(current) && |
467 | adev->d->local_qlen(dev)){ | 467 | adev->d->local_qlen(dev)){ |
468 | spin_unlock_irqrestore(&dmap->lock,flags); | 468 | spin_unlock_irqrestore(&dmap->lock,flags); |
469 | interruptible_sleep_on_timeout(&adev->out_sleeper, | 469 | oss_broken_sleep_on(&adev->out_sleeper, |
470 | dmabuf_timeout(dmap)); | 470 | dmabuf_timeout(dmap)); |
471 | spin_lock_irqsave(&dmap->lock,flags); | 471 | spin_lock_irqsave(&dmap->lock,flags); |
472 | } | 472 | } |
@@ -587,8 +587,7 @@ int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock) | |||
587 | timeout = dmabuf_timeout(dmap); | 587 | timeout = dmabuf_timeout(dmap); |
588 | 588 | ||
589 | spin_unlock_irqrestore(&dmap->lock,flags); | 589 | spin_unlock_irqrestore(&dmap->lock,flags); |
590 | timeout = interruptible_sleep_on_timeout(&adev->in_sleeper, | 590 | timeout = oss_broken_sleep_on(&adev->in_sleeper, timeout); |
591 | timeout); | ||
592 | if (!timeout) { | 591 | if (!timeout) { |
593 | /* FIXME: include device name */ | 592 | /* FIXME: include device name */ |
594 | err = -EIO; | 593 | err = -EIO; |
@@ -768,8 +767,7 @@ static int output_sleep(int dev, int dontblock) | |||
768 | timeout_value = dmabuf_timeout(dmap); | 767 | timeout_value = dmabuf_timeout(dmap); |
769 | else | 768 | else |
770 | timeout_value = MAX_SCHEDULE_TIMEOUT; | 769 | timeout_value = MAX_SCHEDULE_TIMEOUT; |
771 | timeout_value = interruptible_sleep_on_timeout(&adev->out_sleeper, | 770 | timeout_value = oss_broken_sleep_on(&adev->out_sleeper, timeout_value); |
772 | timeout_value); | ||
773 | if (timeout != MAX_SCHEDULE_TIMEOUT && !timeout_value) { | 771 | if (timeout != MAX_SCHEDULE_TIMEOUT && !timeout_value) { |
774 | printk(KERN_WARNING "Sound: DMA (output) timed out - IRQ/DRQ config error?\n"); | 772 | printk(KERN_WARNING "Sound: DMA (output) timed out - IRQ/DRQ config error?\n"); |
775 | dma_reset_output(dev); | 773 | dma_reset_output(dev); |