Source-Changes-HG archive

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

[src/trunk]: src/sys/dev OSS audio allows mixer operations on the dsp device....



details:   https://anonhg.NetBSD.org/src/rev/70d0ca95a110
branches:  trunk
changeset: 747609:70d0ca95a110
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Thu Sep 24 11:13:38 2009 +0000

description:
OSS audio allows mixer operations on the dsp device. NetBSD would return
EINVAL in these circumstances. This can break audio in apps running under
Linux emulation (e.g. Citrix ICA client will mute all audio when volume
control used). Therefore, pass unrecognised ioctls attempted on dsp devices
to mixer_ioctl.

diffstat:

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

diffs (31 lines):

diff -r 9a6fe7705d47 -r 70d0ca95a110 sys/dev/audio.c
--- a/sys/dev/audio.c   Thu Sep 24 06:31:08 2009 +0000
+++ b/sys/dev/audio.c   Thu Sep 24 11:13:38 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.245 2009/09/16 16:34:50 dyoung Exp $       */
+/*     $NetBSD: audio.c,v 1.246 2009/09/24 11:13:38 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.245 2009/09/16 16:34:50 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.246 2009/09/24 11:13:38 sborrill Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -1150,6 +1150,12 @@
        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)
+                       error = mixer_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