Module Name:    src
Committed By:   isaki
Date:           Sat Mar 28 08:35:37 UTC 2020

Modified Files:
        src/sys/arch/amd64/conf: GENERIC
        src/sys/arch/evbarm/conf: GENERIC GENERIC64
        src/sys/arch/i386/conf: GENERIC
        src/sys/arch/macppc/conf: GENERIC
        src/sys/arch/sparc64/conf: GENERIC
        src/sys/dev/audio: audiodef.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.563 -r1.564 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.147 -r1.148 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.1226 -r1.1227 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.365 -r1.366 src/sys/arch/macppc/conf/GENERIC
cvs rdiff -u -r1.225 -r1.226 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/audio/audiodef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.563 src/sys/arch/amd64/conf/GENERIC:1.564
--- src/sys/arch/amd64/conf/GENERIC:1.563	Mon Feb 17 06:32:46 2020
+++ src/sys/arch/amd64/conf/GENERIC	Sat Mar 28 08:35:36 2020
@@ -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 @@ include 	"arch/amd64/conf/std.amd64"
 
 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 @@ maxusers	64		# estimated number of users
 
 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
 

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.74 src/sys/arch/evbarm/conf/GENERIC:1.75
--- src/sys/arch/evbarm/conf/GENERIC:1.74	Sun Mar 15 13:54:28 2020
+++ src/sys/arch/evbarm/conf/GENERIC	Sat Mar 28 08:35:36 2020
@@ -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 @@ sun8icodec* 	at fdt?			# Audio codec (su
 sunxicodec* 	at fdt?			# Allwinner audio codec
 sunxii2s* 	at fdt?			# I2S/PCM
 audio* 		at audiobus?
-options 	AUDIO_BLK_MS=4
 spkr* 		at audio?
 
 # SDMMC

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.147 src/sys/arch/evbarm/conf/GENERIC64:1.148
--- src/sys/arch/evbarm/conf/GENERIC64:1.147	Fri Mar 27 01:43:58 2020
+++ src/sys/arch/evbarm/conf/GENERIC64	Sat Mar 28 08:35:36 2020
@@ -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 @@ h3codec*	at fdt?			# Allwinner H3 audio 
 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)
 

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1226 src/sys/arch/i386/conf/GENERIC:1.1227
--- src/sys/arch/i386/conf/GENERIC:1.1226	Mon Mar 16 19:09:34 2020
+++ src/sys/arch/i386/conf/GENERIC	Sat Mar 28 08:35:36 2020
@@ -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 @@ include 	"arch/i386/conf/std.i386"
 
 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 	MULTIBOOT	# Multiboot support (
 
 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
 

Index: src/sys/arch/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.365 src/sys/arch/macppc/conf/GENERIC:1.366
--- src/sys/arch/macppc/conf/GENERIC:1.365	Mon Mar 16 19:09:34 2020
+++ src/sys/arch/macppc/conf/GENERIC	Sat Mar 28 08:35:36 2020
@@ -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 @@ include		"arch/macppc/conf/std.macppc"
 
 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 @@ options 	ALTIVEC		# Include AltiVec supp
 # 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)

Index: src/sys/arch/sparc64/conf/GENERIC
diff -u src/sys/arch/sparc64/conf/GENERIC:1.225 src/sys/arch/sparc64/conf/GENERIC:1.226
--- src/sys/arch/sparc64/conf/GENERIC:1.225	Mon Mar 16 19:09:34 2020
+++ src/sys/arch/sparc64/conf/GENERIC	Sat Mar 28 08:35:36 2020
@@ -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 @@ include 	"arch/sparc64/conf/std.sparc64"
 
 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 @@ config		netbsd	root on ? type ?
 #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
 

Index: src/sys/dev/audio/audiodef.h
diff -u src/sys/dev/audio/audiodef.h:1.12 src/sys/dev/audio/audiodef.h:1.13
--- src/sys/dev/audio/audiodef.h:1.12	Thu Mar  5 15:18:55 2020
+++ src/sys/dev/audio/audiodef.h	Sat Mar 28 08:35:36 2020
@@ -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
 
 /*

Reply via email to