Revert previous and instead select whether to call mixer_ioctl() or

audio_ioctl() based on whether the command smells like a mixer ioctl or not.
This commit is contained in:
sborrill 2009-09-24 16:03:11 +00:00
parent 2cb5577c50
commit eecdf6949e
1 changed files with 5 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio.c,v 1.246 2009/09/24 11:13:38 sborrill Exp $ */
/* $NetBSD: audio.c,v 1.247 2009/09/24 16:03:11 sborrill Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.246 2009/09/24 11:13:38 sborrill Exp $");
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.247 2009/09/24 16:03:11 sborrill Exp $");
#include "audio.h"
#if NAUDIO > 0
@ -1149,13 +1149,10 @@ audioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
case AUDIO_DEVICE:
case AUDIOCTL_DEVICE:
device_active(sc->dev, DVA_SYSTEM);
error = audio_ioctl(sc, cmd, addr, flag, l);
/*
* OSS audio allows mixer operations on sound devices
* so pass through if command isn't a valid audio operation
*/
if (error == EINVAL)
if (IOCGROUP(cmd) == IOCGROUP(AUDIO_MIXER_READ))
error = mixer_ioctl(sc, cmd, addr, flag, l);
else
error = audio_ioctl(sc, cmd, addr, flag, l);
break;
case MIXER_DEVICE:
error = mixer_ioctl(sc, cmd, addr, flag, l);