From 9bbe457704b3dd1932dbaf155bc4c5cd3923795b Mon Sep 17 00:00:00 2001 From: swallace Date: Sat, 18 Mar 1995 20:01:10 +0000 Subject: Add back SNDCTL_DSP_SETBLKSIZE ioctl code that got zapped. Submitted by: Jim Lowe --- sys/i386/isa/sound/dmabuf.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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); -- cgit v1.1