Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/audio audio: Fix logic for resuming when the device ...
details: https://anonhg.NetBSD.org/src/rev/e43d0a4554d0
branches: trunk
changeset: 933519:e43d0a4554d0
user: nia <nia%NetBSD.org@localhost>
date: Tue May 26 10:07:29 2020 +0000
description:
audio: Fix logic for resuming when the device is in use.
audio_[r/p]mixer_start should never be called when the device is
marked busy.
Resolves a panic on resume when audio is playing, PR kern/55301
diffstat:
sys/dev/audio/audio.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 3d13ba92cfd7 -r e43d0a4554d0 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c Tue May 26 09:16:33 2020 +0000
+++ b/sys/dev/audio/audio.c Tue May 26 10:07:29 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.70 2020/05/23 23:42:42 ad Exp $ */
+/* $NetBSD: audio.c,v 1.71 2020/05/26 10:07:29 nia Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.70 2020/05/23 23:42:42 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.71 2020/05/26 10:07:29 nia Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -7755,11 +7755,9 @@
/* Halts mixers but don't clear busy flag for resume */
if (sc->sc_pbusy) {
audio_pmixer_halt(sc);
- sc->sc_pbusy = true;
}
if (sc->sc_rbusy) {
audio_rmixer_halt(sc);
- sc->sc_rbusy = true;
}
#ifdef AUDIO_PM_IDLE
@@ -7786,9 +7784,9 @@
AUDIO_INITINFO(&ai);
audio_hw_setinfo(sc, &ai, NULL);
- if (sc->sc_pbusy)
+ if (!sc->sc_pbusy)
audio_pmixer_start(sc, true);
- if (sc->sc_rbusy)
+ if (!sc->sc_rbusy)
audio_rmixer_start(sc);
audio_exlock_mutex_exit(sc);
Home |
Main Index |
Thread Index |
Old Index