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.
This commit is contained in:
isaki 2020-03-28 08:35:36 +00:00
parent 528cd50a16
commit d58df70401
7 changed files with 21 additions and 27 deletions

View File

@ -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

View File

@ -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 (sun8i)
sunxicodec* at fdt? # Allwinner audio codec
sunxii2s* at fdt? # I2S/PCM
audio* at audiobus?
options AUDIO_BLK_MS=4
spkr* at audio?
# SDMMC

View File

@ -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 codec (analog part)
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)

View File

@ -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 (see multiboot(8))
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

View File

@ -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 support
# 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)

View File

@ -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

View File

@ -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
/*