Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Reset mixer ports on opening /dev/sound.



details:   https://anonhg.NetBSD.org/src/rev/caa53aca602c
branches:  trunk
changeset: 355602:caa53aca602c
user:      nat <nat%NetBSD.org@localhost>
date:      Sat Aug 05 13:34:06 2017 +0000

description:
Reset mixer ports on opening /dev/sound.

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

diffstat:

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

diffs (27 lines):

diff -r 243a0593d0d5 -r caa53aca602c sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Aug 05 12:38:08 2017 +0000
+++ b/sys/dev/audio.c   Sat Aug 05 13:34:06 2017 +0000
@@ -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 <nathanialsloss%yahoo.com.au@localhost>
@@ -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 @@
        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)



Home | Main Index | Thread Index | Old Index