Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Increase the priority of the mixing thread yet again.
details: https://anonhg.NetBSD.org/src/rev/cc7cfe09f444
branches: trunk
changeset: 352901:cc7cfe09f444
user: nat <nat%NetBSD.org@localhost>
date: Fri Apr 14 00:05:46 2017 +0000
description:
Increase the priority of the mixing thread yet again.
Ensure that there is data in the mix ring.
Addresses PR kern/52098.
diffstat:
sys/dev/audio.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (45 lines):
diff -r 71d1ea8135f2 -r cc7cfe09f444 sys/dev/audio.c
--- a/sys/dev/audio.c Thu Apr 13 22:27:07 2017 +0000
+++ b/sys/dev/audio.c Fri Apr 14 00:05:46 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.323 2017/04/12 14:21:12 nat Exp $ */
+/* $NetBSD: audio.c,v 1.324 2017/04/14 00:05:46 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.323 2017/04/12 14:21:12 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.324 2017/04/14 00:05:46 nat Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -882,9 +882,9 @@
#ifdef AUDIO_PM_IDLE
callout_schedule(&sc->sc_idle_counter, audio_idle_timeout * hz);
#endif
- kthread_create(PRI_BIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL,
+ kthread_create(PRI_SOFTBIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL,
audio_rec_thread, sc, &sc->sc_recthread, "audiorec");
- kthread_create(PRI_BIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL,
+ kthread_create(PRI_SOFTBIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL,
audio_play_thread, sc, &sc->sc_playthread, "audiomix");
audiorescan(self, "audio", NULL);
}
@@ -5893,9 +5893,11 @@
}
mutex_exit(sc->sc_intr_lock);
- mutex_enter(sc->sc_lock);
- audio_mix(sc);
- mutex_exit(sc->sc_lock);
+ while (audio_stream_get_used(&sc->sc_pr.s) < sc->sc_pr.blksize) {
+ mutex_enter(sc->sc_lock);
+ audio_mix(sc);
+ mutex_exit(sc->sc_lock);
+ }
}
}
Home |
Main Index |
Thread Index |
Old Index