Module Name:    src
Committed By:   snj
Date:           Tue Sep 29 22:46:56 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.246
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.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.243.6.1 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 src/sys/dev/audio.c:1.243.6.1
--- src/sys/dev/audio.c:1.243	Tue Jun 10 22:53:08 2008
+++ src/sys/dev/audio.c	Tue Sep 29 22:46:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $	*/
+/*	$NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 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 2008/06/10 22:53:08 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 snj Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -1149,6 +1149,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);

Reply via email to