summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswallace <swallace@FreeBSD.org>1995-03-18 20:01:10 +0000
committerswallace <swallace@FreeBSD.org>1995-03-18 20:01:10 +0000
commit9bbe457704b3dd1932dbaf155bc4c5cd3923795b (patch)
treecfce8f8f8645976626576ba5e01bc1e3c2f212cb
parente38e0cc2864255732d94d39c3d429888f89f626d (diff)
downloadFreeBSD-src-9bbe457704b3dd1932dbaf155bc4c5cd3923795b.zip
FreeBSD-src-9bbe457704b3dd1932dbaf155bc4c5cd3923795b.tar.gz
Add back SNDCTL_DSP_SETBLKSIZE ioctl code that got zapped.
Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
-rw-r--r--sys/i386/isa/sound/dmabuf.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c
index e75ac12..ee7e136 100644
--- a/sys/i386/isa/sound/dmabuf.c
+++ b/sys/i386/isa/sound/dmabuf.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: dmabuf.c,v 1.11 1995/02/13 22:49:04 jkh Exp $
+ * $Id: dmabuf.c,v 1.13 1995/03/05 08:10:23 jkh Exp $
*/
#include "sound_config.h"
@@ -434,6 +434,20 @@ DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local)
return IOCTL_OUT (arg, dmap->fragment_size);
break;
+ case SNDCTL_DSP_SETBLKSIZE:
+ {
+ int size = IOCTL_IN (arg);
+
+ if(!(dmap->flags & DMA_ALLOC_DONE) && size)
+ {
+ dmap->fragment_size = size;
+ return 0;
+ }
+ else
+ return RET_ERROR (EINVAL); /* Too late to change */
+ }
+ break;
+
case SNDCTL_DSP_SUBDIVIDE:
{
int fact = IOCTL_IN (arg);
OpenPOWER on IntegriCloud