Module Name: src Committed By: snj Date: Tue Sep 29 22:50:11 UTC 2009
Modified Files: src/sys/dev [netbsd-5]: audio.c Log Message: Pull up following revision(s) (requested by sborrill in ticket #1016): sys/dev/audio.c: revision 1.247 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.243.6.1 -r1.243.6.2 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.243.6.1 src/sys/dev/audio.c:1.243.6.2 --- src/sys/dev/audio.c:1.243.6.1 Tue Sep 29 22:46:56 2009 +++ src/sys/dev/audio.c Tue Sep 29 22:50:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 snj Exp $ */ +/* $NetBSD: audio.c,v 1.243.6.2 2009/09/29 22:50:11 snj 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.243.6.1 2009/09/29 22:46:56 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.243.6.2 2009/09/29 22:50:11 snj Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -1148,13 +1148,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);