patch-2.0.22 linux/drivers/sound/audio.c
Next file: linux/drivers/sound/configure.c
Previous file: linux/drivers/scsi/st.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Tue Oct 8 19:12:33 1996
- Orig file:
v2.0.21/linux/drivers/sound/audio.c
- Orig date:
Wed Aug 21 09:18:09 1996
diff -u --recursive --new-file v2.0.21/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