aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/swarm_cs4297a.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/swarm_cs4297a.c')
-rw-r--r--sound/oss/swarm_cs4297a.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
index 7d8803a00b79..f851fd0e199c 100644
--- a/sound/oss/swarm_cs4297a.c
+++ b/sound/oss/swarm_cs4297a.c
@@ -90,6 +90,8 @@
90#include <asm/sibyte/sb1250_mac.h> 90#include <asm/sibyte/sb1250_mac.h>
91#include <asm/sibyte/sb1250.h> 91#include <asm/sibyte/sb1250.h>
92 92
93#include "sleep.h"
94
93struct cs4297a_state; 95struct cs4297a_state;
94 96
95static DEFINE_MUTEX(swarm_cs4297a_mutex); 97static DEFINE_MUTEX(swarm_cs4297a_mutex);
@@ -748,7 +750,7 @@ static int serdma_reg_access(struct cs4297a_state *s, u64 data)
748 /* Since a writer has the DSP open, we have to mux the 750 /* Since a writer has the DSP open, we have to mux the
749 request in */ 751 request in */
750 s->reg_request = data; 752 s->reg_request = data;
751 interruptible_sleep_on(&s->dma_dac.reg_wait); 753 oss_broken_sleep_on(&s->dma_dac.reg_wait, MAX_SCHEDULE_TIMEOUT);
752 /* XXXKW how can I deal with the starvation case where 754 /* XXXKW how can I deal with the starvation case where
753 the opener isn't writing? */ 755 the opener isn't writing? */
754 } else { 756 } else {
@@ -790,7 +792,7 @@ static int cs4297a_read_ac97(struct cs4297a_state *s, u32 offset,
790 if (serdma_reg_access(s, (0xCLL << 60) | (1LL << 47) | ((u64)(offset & 0x7F) << 40))) 792 if (serdma_reg_access(s, (0xCLL << 60) | (1LL << 47) | ((u64)(offset & 0x7F) << 40)))
791 return -1; 793 return -1;
792 794
793 interruptible_sleep_on(&s->dma_adc.reg_wait); 795 oss_broken_sleep_on(&s->dma_adc.reg_wait, MAX_SCHEDULE_TIMEOUT);
794 *value = s->read_value; 796 *value = s->read_value;
795 CS_DBGOUT(CS_AC97, 2, 797 CS_DBGOUT(CS_AC97, 2,
796 printk(KERN_INFO "cs4297a: rdr reg %x -> %x\n", s->read_reg, s->read_value)); 798 printk(KERN_INFO "cs4297a: rdr reg %x -> %x\n", s->read_reg, s->read_value));
@@ -1740,7 +1742,7 @@ static ssize_t cs4297a_read(struct file *file, char *buffer, size_t count,
1740 start_adc(s); 1742 start_adc(s);
1741 if (file->f_flags & O_NONBLOCK) 1743 if (file->f_flags & O_NONBLOCK)
1742 return ret ? ret : -EAGAIN; 1744 return ret ? ret : -EAGAIN;
1743 interruptible_sleep_on(&s->dma_adc.wait); 1745 oss_broken_sleep_on(&s->dma_adc.wait, MAX_SCHEDULE_TIMEOUT);
1744 if (signal_pending(current)) 1746 if (signal_pending(current))
1745 return ret ? ret : -ERESTARTSYS; 1747 return ret ? ret : -ERESTARTSYS;
1746 continue; 1748 continue;
@@ -1836,7 +1838,7 @@ static ssize_t cs4297a_write(struct file *file, const char *buffer,
1836 start_dac(s); 1838 start_dac(s);
1837 if (file->f_flags & O_NONBLOCK) 1839 if (file->f_flags & O_NONBLOCK)
1838 return ret ? ret : -EAGAIN; 1840 return ret ? ret : -EAGAIN;
1839 interruptible_sleep_on(&d->wait); 1841 oss_broken_sleep_on(&d->wait, MAX_SCHEDULE_TIMEOUT);
1840 if (signal_pending(current)) 1842 if (signal_pending(current))
1841 return ret ? ret : -ERESTARTSYS; 1843 return ret ? ret : -ERESTARTSYS;
1842 continue; 1844 continue;
@@ -2452,7 +2454,7 @@ static int cs4297a_locked_open(struct inode *inode, struct file *file)
2452 return -EBUSY; 2454 return -EBUSY;
2453 } 2455 }
2454 mutex_unlock(&s->open_sem_dac); 2456 mutex_unlock(&s->open_sem_dac);
2455 interruptible_sleep_on(&s->open_wait_dac); 2457 oss_broken_sleep_on(&s->open_wait_dac, MAX_SCHEDULE_TIMEOUT);
2456 2458
2457 if (signal_pending(current)) { 2459 if (signal_pending(current)) {
2458 printk("open - sig pending\n"); 2460 printk("open - sig pending\n");
@@ -2469,7 +2471,7 @@ static int cs4297a_locked_open(struct inode *inode, struct file *file)
2469 return -EBUSY; 2471 return -EBUSY;
2470 } 2472 }
2471 mutex_unlock(&s->open_sem_adc); 2473 mutex_unlock(&s->open_sem_adc);
2472 interruptible_sleep_on(&s->open_wait_adc); 2474 oss_broken_sleep_on(&s->open_wait_adc, MAX_SCHEDULE_TIMEOUT);
2473 2475
2474 if (signal_pending(current)) { 2476 if (signal_pending(current)) {
2475 printk("open - sig pending\n"); 2477 printk("open - sig pending\n");