--- zzzz-none-000/linux-3.10.107/sound/oss/sequencer.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/oss/sequencer.c 2021-02-04 17:41:59.000000000 +0000 @@ -19,6 +19,7 @@ #include "sound_config.h" #include "midi_ctrl.h" +#include "sleep.h" static int sequencer_ok; static struct sound_timer_operations *tmr; @@ -100,8 +101,7 @@ return -EAGAIN; } - interruptible_sleep_on_timeout(&midi_sleeper, - pre_event_timeout); + oss_broken_sleep_on(&midi_sleeper, pre_event_timeout); spin_lock_irqsave(&lock,flags); if (!iqlen) { @@ -216,8 +216,6 @@ dev = dev >> 4; - DEB(printk("sequencer_write(dev=%d, count=%d)\n", dev, count)); - if (mode == OPEN_READ) return -EIO; @@ -343,7 +341,7 @@ /* * Sleep until there is enough space on the queue */ - interruptible_sleep_on(&seq_sleeper); + oss_broken_sleep_on(&seq_sleeper, MAX_SCHEDULE_TIMEOUT); } if (qlen >= SEQ_MAX_QUEUE) { @@ -954,8 +952,6 @@ dev = dev >> 4; mode = translate_mode(file); - DEB(printk("sequencer_open(dev=%d)\n", dev)); - if (!sequencer_ok) { /* printk("Sound card: sequencer not initialized\n");*/ @@ -1117,8 +1113,7 @@ */ if (n) - interruptible_sleep_on_timeout(&seq_sleeper, - HZ/10); + oss_broken_sleep_on(&seq_sleeper, HZ/10); } } @@ -1129,8 +1124,6 @@ dev = dev >> 4; - DEB(printk("sequencer_release(dev=%d)\n", dev)); - /* * Wait until the queue is empty (if we don't have nonblock) */ @@ -1140,8 +1133,7 @@ while (!signal_pending(current) && qlen > 0) { seq_sync(); - interruptible_sleep_on_timeout(&seq_sleeper, - 3*HZ); + oss_broken_sleep_on(&seq_sleeper, 3*HZ); /* Extra delay */ } } @@ -1196,7 +1188,7 @@ seq_startplay(); if (qlen > 0) - interruptible_sleep_on_timeout(&seq_sleeper, HZ); + oss_broken_sleep_on(&seq_sleeper, HZ); return qlen; } @@ -1219,7 +1211,7 @@ spin_lock_irqsave(&lock,flags); while (n && !midi_devs[dev]->outputc(dev, data)) { - interruptible_sleep_on_timeout(&seq_sleeper, HZ/25); + oss_broken_sleep_on(&seq_sleeper, HZ/25); n--; } spin_unlock_irqrestore(&lock,flags);