Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Only allow blocksizes greater or equal to the calcul...
details: https://anonhg.NetBSD.org/src/rev/85fb3490f361
branches: trunk
changeset: 357223:85fb3490f361
user: nat <nat%NetBSD.org@localhost>
date: Tue Oct 31 21:18:02 2017 +0000
description:
Only allow blocksizes greater or equal to the calculated one.
This should help applications as the blocksize obtained (AUDIO_SET/GETINFO)
will work without stutter.
Ok christos@.
diffstat:
sys/dev/audio.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (32 lines):
diff -r 84e425f8fa1b -r 85fb3490f361 sys/dev/audio.c
--- a/sys/dev/audio.c Tue Oct 31 21:13:24 2017 +0000
+++ b/sys/dev/audio.c Tue Oct 31 21:18:02 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.420 2017/10/31 21:13:24 nat Exp $ */
+/* $NetBSD: audio.c,v 1.421 2017/10/31 21:18:02 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.420 2017/10/31 21:13:24 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.421 2017/10/31 21:18:02 nat Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -2689,11 +2689,9 @@
mixcb->blksize = audio_calc_blksize(sc, parm);
cb->blksize = audio_calc_blksize(sc, &cb->s.param);
} else {
- if (SPECIFIED(blksize))
+ cb->blksize = audio_calc_blksize(sc, &stream->param);
+ if (SPECIFIED(blksize) && blksize > cb->blksize)
cb->blksize = blksize;
- else {
- cb->blksize = audio_calc_blksize(sc, &stream->param);
- }
}
}
Home |
Main Index |
Thread Index |
Old Index