patch-2.1.2 linux/drivers/sound/audio.c
Next file: linux/drivers/sound/sb_common.c
Previous file: linux/drivers/scsi/sg.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Tue Oct 8 19:12:23 1996
- Orig file:
v2.1.1/linux/drivers/sound/audio.c
- Orig date:
Sun Aug 18 10:46:48 1996
diff -u --recursive --new-file v2.1.1/linux/drivers/sound/audio.c linux/drivers/sound/audio.c
@@ -403,7 +403,7 @@
case SNDCTL_DSP_GETOSPACE:
if (!(audio_devs[dev]->open_mode & OPEN_WRITE))
- return 0;
+ return -EPERM;
if ((audio_mode[dev] & AM_READ) && !(audio_devs[dev]->flags & DMA_DUPLEX))
return -(EBUSY);
@@ -418,7 +418,7 @@
return err;
if (DMAbuf_get_curr_buffer (dev, &buf_no, &dma_buf, &buf_ptr, &buf_size) >= 0)
- info.bytes += buf_size - buf_ptr;
+ info.bytes -= buf_ptr;
memcpy_tofs (&((char *) arg)[0], (char *) &info, sizeof (info));
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov