patch-2.2.5 linux/drivers/sound/es1370.c
Next file: linux/drivers/sound/es1371.c
Previous file: linux/drivers/scsi/ppa.c
Back to the patch index
Back to the overall index
- Lines: 92
- Date:
Fri Mar 26 14:52:34 1999
- Orig file:
v2.2.4/linux/drivers/sound/es1370.c
- Orig date:
Tue Mar 23 14:35:48 1999
diff -u --recursive --new-file v2.2.4/linux/drivers/sound/es1370.c linux/drivers/sound/es1370.c
@@ -83,6 +83,10 @@
* 16.12.98 0.16 Don't wake up app until there are fragsize bytes to read/write
* 06.01.99 0.17 remove the silly SA_INTERRUPT flag.
* hopefully killed the egcs section type conflict
+ * 12.03.99 0.18 cinfo.blocks should be reset after GETxPTR ioctl.
+ * reported by Johan Maes <joma@telindus.be>
+ * 22.03.99 0.19 return EAGAIN instead of EBUSY when O_NONBLOCK
+ * read/write cannot be executed
*
* some important things missing in Ensoniq documentation:
*
@@ -1097,7 +1101,7 @@
if (cnt <= 0) {
start_adc(s);
if (file->f_flags & O_NONBLOCK)
- return ret ? ret : -EBUSY;
+ return ret ? ret : -EAGAIN;
interruptible_sleep_on(&s->dma_adc.wait);
if (signal_pending(current))
return ret ? ret : -ERESTARTSYS;
@@ -1152,7 +1156,7 @@
if (cnt <= 0) {
start_dac2(s);
if (file->f_flags & O_NONBLOCK)
- return ret ? ret : -EBUSY;
+ return ret ? ret : -EAGAIN;
interruptible_sleep_on(&s->dma_dac2.wait);
if (signal_pending(current))
return ret ? ret : -ERESTARTSYS;
@@ -1455,7 +1459,7 @@
spin_lock_irqsave(&s->lock, flags);
es1370_update_ptr(s);
cinfo.bytes = s->dma_adc.total_bytes;
- cinfo.blocks = s->dma_adc.total_bytes >> s->dma_adc.fragshift;
+ cinfo.blocks = s->dma_adc.count >> s->dma_adc.fragshift;
cinfo.ptr = s->dma_adc.hwptr;
if (s->dma_adc.mapped)
s->dma_adc.count &= s->dma_adc.fragsize-1;
@@ -1468,7 +1472,7 @@
spin_lock_irqsave(&s->lock, flags);
es1370_update_ptr(s);
cinfo.bytes = s->dma_dac2.total_bytes;
- cinfo.blocks = s->dma_dac2.total_bytes >> s->dma_dac2.fragshift;
+ cinfo.blocks = s->dma_dac2.count >> s->dma_dac2.fragshift;
cinfo.ptr = s->dma_dac2.hwptr;
if (s->dma_dac2.mapped)
s->dma_dac2.count &= s->dma_dac2.fragsize-1;
@@ -1664,7 +1668,7 @@
if (cnt <= 0) {
start_dac1(s);
if (file->f_flags & O_NONBLOCK)
- return ret ? ret : -EBUSY;
+ return ret ? ret : -EAGAIN;
interruptible_sleep_on(&s->dma_dac1.wait);
if (signal_pending(current))
return ret ? ret : -ERESTARTSYS;
@@ -1866,7 +1870,7 @@
spin_lock_irqsave(&s->lock, flags);
es1370_update_ptr(s);
cinfo.bytes = s->dma_dac1.total_bytes;
- cinfo.blocks = s->dma_dac1.total_bytes >> s->dma_dac1.fragshift;
+ cinfo.blocks = s->dma_dac1.count >> s->dma_dac1.fragshift;
cinfo.ptr = s->dma_dac1.hwptr;
if (s->dma_dac1.mapped)
s->dma_dac1.count &= s->dma_dac1.fragsize-1;
@@ -2021,7 +2025,7 @@
cnt = count;
if (cnt <= 0) {
if (file->f_flags & O_NONBLOCK)
- return ret ? ret : -EBUSY;
+ return ret ? ret : -EAGAIN;
interruptible_sleep_on(&s->midi.iwait);
if (signal_pending(current))
return ret ? ret : -ERESTARTSYS;
@@ -2068,7 +2072,7 @@
cnt = count;
if (cnt <= 0) {
if (file->f_flags & O_NONBLOCK)
- return ret ? ret : -EBUSY;
+ return ret ? ret : -EAGAIN;
interruptible_sleep_on(&s->midi.owait);
if (signal_pending(current))
return ret ? ret : -ERESTARTSYS;
@@ -2271,7 +2275,7 @@
if (!pci_present()) /* No PCI bus in this machine! */
return -ENODEV;
- printk(KERN_INFO "es1370: version v0.17 time " __TIME__ " " __DATE__ "\n");
+ printk(KERN_INFO "es1370: version v0.19 time " __TIME__ " " __DATE__ "\n");
while (index < NR_DEVICE &&
(pcidev = pci_find_device(PCI_VENDOR_ID_ENSONIQ, PCI_DEVICE_ID_ENSONIQ_ES1370, pcidev))) {
if (pcidev->base_address[0] == 0 ||
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)