Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Revert the changes made with holding sc_lock in audi...



details:   https://anonhg.NetBSD.org/src/rev/532d0a398bdf
branches:  trunk
changeset: 823964:532d0a398bdf
user:      nat <nat%NetBSD.org@localhost>
date:      Tue May 16 21:43:18 2017 +0000

description:
Revert the changes made with holding sc_lock in audiostartp/startr made in
rev 1.347.  The audio tests should run again.

diffstat:

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

diffs (47 lines):

diff -r bd1d62bebfe6 -r 532d0a398bdf sys/dev/audio.c
--- a/sys/dev/audio.c   Tue May 16 17:40:01 2017 +0000
+++ b/sys/dev/audio.c   Tue May 16 21:43:18 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.349 2017/05/15 12:07:32 martin Exp $       */
+/*     $NetBSD: audio.c,v 1.350 2017/05/16 21:43:18 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.349 2017/05/15 12:07:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.350 2017/05/16 21:43:18 nat Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -3485,12 +3485,10 @@
                return EINVAL;
 
        if (sc->sc_rec_started == false) {
-               mutex_exit(sc->sc_lock);
                mutex_enter(sc->sc_intr_lock);
                mix_read(sc);
                cv_broadcast(&sc->sc_rcondvar);
                mutex_exit(sc->sc_intr_lock);
-               mutex_enter(sc->sc_lock);
        }
        vc->sc_rbus = true;
 
@@ -3525,7 +3523,6 @@
        if (sc->sc_trigger_started == false) {
                audio_mix(sc);
                audio_mix(sc);
-               mutex_exit(sc->sc_lock);
                mutex_enter(sc->sc_intr_lock);
                mix_write(sc);
                vc = chan->vc;
@@ -3535,7 +3532,6 @@
                mix_write(sc);
                cv_broadcast(&sc->sc_condvar);
                mutex_exit(sc->sc_intr_lock);
-               mutex_enter(sc->sc_lock);
        }
 
        return error;



Home | Main Index | Thread Index | Old Index