Module Name:    src
Committed By:   sborrill
Date:           Thu Sep 24 11:13:38 UTC 2009

Modified Files:
        src/sys/dev: audio.c

Log Message:
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.245 -r1.246 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.245 src/sys/dev/audio.c:1.246
--- src/sys/dev/audio.c:1.245	Wed Sep 16 16:34:50 2009
+++ src/sys/dev/audio.c	Thu Sep 24 11:13:38 2009
@@ -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);

Reply via email to