Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/audio On audio_[pr]mixer_halt(), it's better to rese...
details: https://anonhg.NetBSD.org/src/rev/e04224ab85ab
branches: trunk
changeset: 745051:e04224ab85ab
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Feb 22 08:03:19 2020 +0000
description:
On audio_[pr]mixer_halt(), it's better to reset parameters in intr_lock.
diffstat:
sys/dev/audio/audio.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 1e097090d66b -r e04224ab85ab sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c Sat Feb 22 08:01:59 2020 +0000
+++ b/sys/dev/audio/audio.c Sat Feb 22 08:03:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.50 2020/02/22 08:01:59 isaki Exp $ */
+/* $NetBSD: audio.c,v 1.51 2020/02/22 08:03:19 isaki Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.50 2020/02/22 08:01:59 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.51 2020/02/22 08:03:19 isaki Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -5546,7 +5546,6 @@
mutex_enter(sc->sc_intr_lock);
error = sc->hw_if->halt_output(sc->hw_hdl);
- mutex_exit(sc->sc_intr_lock);
/* Halts anyway even if some error has occurred. */
sc->sc_pbusy = false;
@@ -5554,6 +5553,7 @@
sc->sc_pmixer->hwbuf.used = 0;
sc->sc_pmixer->mixseq = 0;
sc->sc_pmixer->hwseq = 0;
+ mutex_exit(sc->sc_intr_lock);
return error;
}
@@ -5576,7 +5576,6 @@
mutex_enter(sc->sc_intr_lock);
error = sc->hw_if->halt_input(sc->hw_hdl);
- mutex_exit(sc->sc_intr_lock);
/* Halts anyway even if some error has occurred. */
sc->sc_rbusy = false;
@@ -5584,6 +5583,7 @@
sc->sc_rmixer->hwbuf.used = 0;
sc->sc_rmixer->mixseq = 0;
sc->sc_rmixer->hwseq = 0;
+ mutex_exit(sc->sc_intr_lock);
return error;
}
Home |
Main Index |
Thread Index |
Old Index