Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Revert previous and instead select whether to call m...



details:   https://anonhg.NetBSD.org/src/rev/8056c2730fad
branches:  trunk
changeset: 747613:8056c2730fad
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Thu Sep 24 16:03:11 2009 +0000

description:
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.

diffstat:

 sys/dev/audio.c |  13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diffs (35 lines):

diff -r 580ec865bafd -r 8056c2730fad sys/dev/audio.c
--- a/sys/dev/audio.c   Thu Sep 24 15:36:59 2009 +0000
+++ b/sys/dev/audio.c   Thu Sep 24 16:03:11 2009 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index