patch-2.4.13 linux/drivers/sound/btaudio.c
Next file: linux/drivers/sound/cmpci.c
Previous file: linux/drivers/sgi/char/graphics.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Wed Oct 17 14:19:20 2001
- Orig file:
v2.4.12/linux/drivers/sound/btaudio.c
- Orig date:
Sun Sep 23 11:40:59 2001
diff -u --recursive --new-file v2.4.12/linux/drivers/sound/btaudio.c linux/drivers/sound/btaudio.c
@@ -748,6 +748,24 @@
case SNDCTL_DSP_SYNC:
/* NOP */
return 0;
+ case SNDCTL_DSP_GETISPACE:
+ {
+ audio_buf_info info;
+ if (!bta->recording)
+ return -EINVAL;
+ info.fragsize = bta->block_bytes>>bta->sampleshift;
+ info.fragstotal = bta->block_count;
+ info.bytes = bta->read_count;
+ info.fragments = info.bytes / info.fragsize;
+ if (debug)
+ printk(KERN_DEBUG "btaudio: SNDCTL_DSP_GETISPACE "
+ "returns %d/%d/%d/%d\n",
+ info.fragsize, info.fragstotal,
+ info.bytes, info.fragments);
+ if (copy_to_user((void *)arg, &info, sizeof(info)))
+ return -EFAULT;
+ return 0;
+ }
#if 0 /* TODO */
case SNDCTL_DSP_GETTRIGGER:
case SNDCTL_DSP_SETTRIGGER:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)