Module Name:    src
Committed By:   nat
Date:           Sat Aug  5 13:34:06 UTC 2017

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

Log Message:
Reset mixer ports on opening /dev/sound.

This fixes an issue reported on port-arm@ by Brian Buhrow.


To generate a diff of this commit:
cvs rdiff -u -r1.385 -r1.386 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.385 src/sys/dev/audio.c:1.386
--- src/sys/dev/audio.c:1.385	Thu Aug  3 11:39:06 2017
+++ src/sys/dev/audio.c	Sat Aug  5 13:34:06 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.385 2017/08/03 11:39:06 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.386 2017/08/05 13:34:06 nat Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.385 2017/08/03 11:39:06 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.386 2017/08/05 13:34:06 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2229,6 +2229,8 @@ audio_open(dev_t dev, struct audio_softc
 	error = audio_set_defaults(sc, mode, vc);
 	if (!error && ISDEVSOUND(dev) && sc->sc_aivalid == true) {
 		sc->sc_ai.mode = mode;
+		sc->sc_ai.play.port = ~0;
+		sc->sc_ai.record.port = ~0;
 		error = audiosetinfo(sc, &sc->sc_ai, true, vc);
 	}
 	if (error)

Reply via email to