Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Don't assign sc->sc_pr/rr.blksize in audio_initbufs().
details: https://anonhg.NetBSD.org/src/rev/6eea6a6f180f
branches: trunk
changeset: 356114:6eea6a6f180f
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Sep 02 13:22:51 2017 +0000
description:
Don't assign sc->sc_pr/rr.blksize in audio_initbufs().
For hwvc, it is calculated in audiosetinfno(). And the user vc should
not change sc->sc_pr/rr.blksize. In addition, this assignments appear twice.
diffstat:
sys/dev/audio.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diffs (49 lines):
diff -r 993be476ea66 -r 6eea6a6f180f sys/dev/audio.c
--- a/sys/dev/audio.c Sat Sep 02 12:57:35 2017 +0000
+++ b/sys/dev/audio.c Sat Sep 02 13:22:51 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.403 2017/08/20 05:12:17 isaki Exp $ */
+/* $NetBSD: audio.c,v 1.404 2017/09/02 13:22:51 isaki 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.403 2017/08/20 05:12:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.404 2017/09/02 13:22:51 isaki Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -2018,11 +2018,8 @@
const struct audio_hw_if *hw;
int error;
- if (vc == NULL) {
+ if (vc == NULL)
vc = sc->sc_hwvc;
- sc->sc_pr.blksize = vc->sc_mpr.blksize;
- sc->sc_rr.blksize = vc->sc_mrr.blksize;
- }
DPRINTF(("audio_initbufs: mode=0x%x\n", vc->sc_mode));
hw = sc->hw_if;
@@ -2038,8 +2035,6 @@
return error;
}
}
- if (vc == sc->sc_hwvc)
- sc->sc_rr.blksize = vc->sc_mrr.blksize;
if (audio_can_playback(sc) &&
((vc->sc_open & AUOPEN_WRITE) || vc == sc->sc_hwvc)) {
@@ -2054,8 +2049,6 @@
return error;
}
}
- if (vc == sc->sc_hwvc)
- sc->sc_pr.blksize = vc->sc_mpr.blksize;
#ifdef AUDIO_INTR_TIME
if (audio_can_playback(sc)) {
Home |
Main Index |
Thread Index |
Old Index