Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Reduce default AUDIO_BLK_MS from 40msec to 10msec on all...
details: https://anonhg.NetBSD.org/src/rev/084dd9023fbc
branches: trunk
changeset: 850199:084dd9023fbc
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Mar 28 08:35:36 2020 +0000
description:
Reduce default AUDIO_BLK_MS from 40msec to 10msec on all platform except m68k
(m68k uses 40msec default as before). And remove the option from GENERIC.
- It's not good idea to set such parameter in individual GENERICs.
- 4msec is (probably no problem for most modern real hardware but)
too aggressive to be default.
- 10msec is too severe for antique machines but it's hard to draw a line.
diffstat:
sys/arch/amd64/conf/GENERIC | 7 ++-----
sys/arch/evbarm/conf/GENERIC | 3 +--
sys/arch/evbarm/conf/GENERIC64 | 3 +--
sys/arch/i386/conf/GENERIC | 7 ++-----
sys/arch/macppc/conf/GENERIC | 7 ++-----
sys/arch/sparc64/conf/GENERIC | 7 ++-----
sys/dev/audio/audiodef.h | 14 +++++++++++---
7 files changed, 21 insertions(+), 27 deletions(-)
diffs (181 lines):
diff -r 6c91a42598fd -r 084dd9023fbc sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/arch/amd64/conf/GENERIC Sat Mar 28 08:35:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.563 2020/02/17 06:32:46 nisimura Exp $
+# $NetBSD: GENERIC,v 1.564 2020/03/28 08:35:36 isaki Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.563 $"
+#ident "GENERIC-$Revision: 1.564 $"
maxusers 64 # estimated number of users
@@ -55,9 +55,6 @@
options INSECURE # disable kernel security levels - X needs this
-options AUDIO_BLK_MS=4 # make software with low latency needs performant
- # no substantial CPU overhead on this platform
-
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options NTP # NTP phase/frequency locked loop
diff -r 6c91a42598fd -r 084dd9023fbc sys/arch/evbarm/conf/GENERIC
--- a/sys/arch/evbarm/conf/GENERIC Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/arch/evbarm/conf/GENERIC Sat Mar 28 08:35:36 2020 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC,v 1.74 2020/03/15 13:54:28 skrll Exp $
+# $NetBSD: GENERIC,v 1.75 2020/03/28 08:35:36 isaki Exp $
#
# GENERIC ARM (aarch32) kernel
#
@@ -622,7 +622,6 @@
sunxicodec* at fdt? # Allwinner audio codec
sunxii2s* at fdt? # I2S/PCM
audio* at audiobus?
-options AUDIO_BLK_MS=4
spkr* at audio?
# SDMMC
diff -r 6c91a42598fd -r 084dd9023fbc sys/arch/evbarm/conf/GENERIC64
--- a/sys/arch/evbarm/conf/GENERIC64 Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/arch/evbarm/conf/GENERIC64 Sat Mar 28 08:35:36 2020 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC64,v 1.147 2020/03/27 01:43:58 thorpej Exp $
+# $NetBSD: GENERIC64,v 1.148 2020/03/28 08:35:36 isaki Exp $
#
# GENERIC ARM (aarch64) kernel
#
@@ -481,7 +481,6 @@
a64acodec* at fdt? # Allwinner A64 audio codec (analog part)
sunxii2s* at fdt? # Allwinner I2S/PCM
audio* at audiobus?
-options AUDIO_BLK_MS=4
spkr* at audio? # PC speaker (synthesized)
diff -r 6c91a42598fd -r 084dd9023fbc sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/arch/i386/conf/GENERIC Sat Mar 28 08:35:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1226 2020/03/16 19:09:34 nia Exp $
+# $NetBSD: GENERIC,v 1.1227 2020/03/28 08:35:36 isaki Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.1226 $"
+#ident "GENERIC-$Revision: 1.1227 $"
maxusers 64 # estimated number of users
@@ -77,9 +77,6 @@
options INSECURE # disable kernel security levels - X needs this
-options AUDIO_BLK_MS=4 # make software with low latency needs performant
- # no substantial CPU overhead on this platform
-
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options NTP # NTP phase/frequency locked loop
diff -r 6c91a42598fd -r 084dd9023fbc sys/arch/macppc/conf/GENERIC
--- a/sys/arch/macppc/conf/GENERIC Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/arch/macppc/conf/GENERIC Sat Mar 28 08:35:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.365 2020/03/16 19:09:34 nia Exp $
+# $NetBSD: GENERIC,v 1.366 2020/03/28 08:35:36 isaki Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.365 $"
+#ident "GENERIC-$Revision: 1.366 $"
maxusers 32
@@ -31,9 +31,6 @@
# Standard system options
options INSECURE # disable kernel security levels
-options AUDIO_BLK_MS=4 # make software with low latency needs performant
- # no substantial CPU overhead on this platform
-
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options NTP # NTP phase/frequency locked loop
options KTRACE # system call tracing via ktrace(1)
diff -r 6c91a42598fd -r 084dd9023fbc sys/arch/sparc64/conf/GENERIC
--- a/sys/arch/sparc64/conf/GENERIC Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/arch/sparc64/conf/GENERIC Sat Mar 28 08:35:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.225 2020/03/16 19:09:34 nia Exp $
+# $NetBSD: GENERIC,v 1.226 2020/03/28 08:35:36 isaki Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.225 $"
+#ident "GENERIC-$Revision: 1.226 $"
maxusers 64
@@ -48,9 +48,6 @@
#options UVMHIST
#options UVMHIST_PRINT # Loud!
-options AUDIO_BLK_MS=4 # make software with low latency needs performant
- # no substantial CPU overhead on this platform
-
## System call tracing (see ktrace(1)).
options KTRACE
diff -r 6c91a42598fd -r 084dd9023fbc sys/dev/audio/audiodef.h
--- a/sys/dev/audio/audiodef.h Sat Mar 28 05:47:41 2020 +0000
+++ b/sys/dev/audio/audiodef.h Sat Mar 28 08:35:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audiodef.h,v 1.12 2020/03/05 15:18:55 riastradh Exp $ */
+/* $NetBSD: audiodef.h,v 1.13 2020/03/28 08:35:36 isaki Exp $ */
/*
* Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
@@ -44,13 +44,21 @@
/*
* Hardware blocksize in msec.
- * We use 40 msec as default. (1 / 40ms) = 25 = 5^2.
+ * We use 10 msec as default for most platforms. But it's too severe for
+ * most m68k.
+ *
+ * 40 msec was initially choosen for the following reason:
+ * (1 / 40ms) = 25 = 5^2. Thus, the frequency is factored by 5.
* In this case, the number of frames in a block can be an integer
* even if the frequency is a multiple of 100 (44100, 48000, etc),
* or even if 15625Hz (vs(4)).
*/
#if !defined(AUDIO_BLK_MS)
-#define AUDIO_BLK_MS 40
+# if defined(__m68k__)
+# define AUDIO_BLK_MS 40
+# else
+# define AUDIO_BLK_MS 10
+# endif
#endif
/*
Home |
Main Index |
Thread Index |
Old Index