Module Name: src Committed By: sborrill Date: Thu Sep 24 16:03:11 UTC 2009
Modified Files: src/sys/dev: audio.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/dev/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.246 src/sys/dev/audio.c:1.247 --- src/sys/dev/audio.c:1.246 Thu Sep 24 11:13:38 2009 +++ src/sys/dev/audio.c Thu Sep 24 16:03:11 2009 @@ -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 @@ 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);