summaryrefslogtreecommitdiffstats
path: root/sound/oss/sequencer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/sequencer.c')
-rw-r--r--sound/oss/sequencer.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index 4ff60a6427d9..9b9f7d385134 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -19,6 +19,7 @@
19#include "sound_config.h" 19#include "sound_config.h"
20 20
21#include "midi_ctrl.h" 21#include "midi_ctrl.h"
22#include "sleep.h"
22 23
23static int sequencer_ok; 24static int sequencer_ok;
24static struct sound_timer_operations *tmr; 25static struct sound_timer_operations *tmr;
@@ -100,8 +101,7 @@ int sequencer_read(int dev, struct file *file, char __user *buf, int count)
100 return -EAGAIN; 101 return -EAGAIN;
101 } 102 }
102 103
103 interruptible_sleep_on_timeout(&midi_sleeper, 104 oss_broken_sleep_on(&midi_sleeper, pre_event_timeout);
104 pre_event_timeout);
105 spin_lock_irqsave(&lock,flags); 105 spin_lock_irqsave(&lock,flags);
106 if (!iqlen) 106 if (!iqlen)
107 { 107 {
@@ -343,7 +343,7 @@ static int seq_queue(unsigned char *note, char nonblock)
343 /* 343 /*
344 * Sleep until there is enough space on the queue 344 * Sleep until there is enough space on the queue
345 */ 345 */
346 interruptible_sleep_on(&seq_sleeper); 346 oss_broken_sleep_on(&seq_sleeper, MAX_SCHEDULE_TIMEOUT);
347 } 347 }
348 if (qlen >= SEQ_MAX_QUEUE) 348 if (qlen >= SEQ_MAX_QUEUE)
349 { 349 {
@@ -1122,8 +1122,7 @@ static void seq_drain_midi_queues(void)
1122 */ 1122 */
1123 1123
1124 if (n) 1124 if (n)
1125 interruptible_sleep_on_timeout(&seq_sleeper, 1125 oss_broken_sleep_on(&seq_sleeper, HZ/10);
1126 HZ/10);
1127 } 1126 }
1128} 1127}
1129 1128
@@ -1145,8 +1144,7 @@ void sequencer_release(int dev, struct file *file)
1145 while (!signal_pending(current) && qlen > 0) 1144 while (!signal_pending(current) && qlen > 0)
1146 { 1145 {
1147 seq_sync(); 1146 seq_sync();
1148 interruptible_sleep_on_timeout(&seq_sleeper, 1147 oss_broken_sleep_on(&seq_sleeper, 3*HZ);
1149 3*HZ);
1150 /* Extra delay */ 1148 /* Extra delay */
1151 } 1149 }
1152 } 1150 }
@@ -1201,7 +1199,7 @@ static int seq_sync(void)
1201 seq_startplay(); 1199 seq_startplay();
1202 1200
1203 if (qlen > 0) 1201 if (qlen > 0)
1204 interruptible_sleep_on_timeout(&seq_sleeper, HZ); 1202 oss_broken_sleep_on(&seq_sleeper, HZ);
1205 return qlen; 1203 return qlen;
1206} 1204}
1207 1205
@@ -1224,7 +1222,7 @@ static void midi_outc(int dev, unsigned char data)
1224 1222
1225 spin_lock_irqsave(&lock,flags); 1223 spin_lock_irqsave(&lock,flags);
1226 while (n && !midi_devs[dev]->outputc(dev, data)) { 1224 while (n && !midi_devs[dev]->outputc(dev, data)) {
1227 interruptible_sleep_on_timeout(&seq_sleeper, HZ/25); 1225 oss_broken_sleep_on(&seq_sleeper, HZ/25);
1228 n--; 1226 n--;
1229 } 1227 }
1230 spin_unlock_irqrestore(&lock,flags); 1228 spin_unlock_irqrestore(&lock,flags);