Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Only init the mix ring if sc_usemixer is enabled as ...
details: https://anonhg.NetBSD.org/src/rev/e674767c43b9
branches: trunk
changeset: 358192:e674767c43b9
user: nat <nat%NetBSD.org@localhost>
date: Sat Dec 16 15:56:00 2017 +0000
description:
Only init the mix ring if sc_usemixer is enabled as with mixing set to
false the mix ring is not used.
diffstat:
sys/dev/audio.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 5a6623979f12 -r e674767c43b9 sys/dev/audio.c
--- a/sys/dev/audio.c Sat Dec 16 14:45:25 2017 +0000
+++ b/sys/dev/audio.c Sat Dec 16 15:56:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.442 2017/11/30 20:25:54 christos Exp $ */
+/* $NetBSD: audio.c,v 1.443 2017/12/16 15:56:00 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.442 2017/11/30 20:25:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.443 2017/12/16 15:56:00 nat Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -2223,10 +2223,10 @@
}
}
audio_initbufs(sc, NULL);
- if (audio_can_playback(sc))
+ if (sc->sc_usemixer && audio_can_playback(sc))
audio_init_ringbuffer(sc, &sc->sc_mixring.sc_mpr,
AUMODE_PLAY);
- if (audio_can_capture(sc))
+ if (sc->sc_usemixer && audio_can_capture(sc))
audio_init_ringbuffer(sc, &sc->sc_mixring.sc_mrr,
AUMODE_RECORD);
sc->schedule_wih = false;
Home |
Main Index |
Thread Index |
Old Index