Module Name: src
Committed By: martin
Date: Mon Jan 27 07:06:02 UTC 2020
Modified Files:
src/sys/arch/amd64/conf [netbsd-9]: GENERIC
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC GENERIC64
src/sys/dev [netbsd-9]: files.audio
src/sys/dev/audio [netbsd-9]: audiodef.h
Log Message:
Pull up following revision(s) (requested by nia in ticket #657):
sys/dev/files.audio: revision 1.13
sys/dev/files.audio: revision 1.14
sys/arch/amd64/conf/GENERIC: revision 1.559
sys/arch/evbarm/conf/GENERIC: revision 1.71
sys/arch/evbarm/conf/GENERIC64: revision 1.134
sys/dev/audio/audiodef.h: revision 1.8
Set AUDIO_BLK_MS=4 - unlikely to cause significant overhead on non-m68k.
Several of us have been setting this in /etc/sysctl.conf for months, to
get better performance from applications that require synced audio, etc.
It's also mentioned as a good value with low overhead on most archs here:
href="https://mail-index.netbsd.org/tech-kern/2019/12/07/msg025830.html
We could probably go lower, but this is low enough to make most/all
software run well, removing frame drops. It's also low enough to get
emulators/mednafen to stop complaining in the console.
defopt AUDIO_BLK_MS
Follow amd64 and set AUDIO_BLK_MS=4 by default
defopt -> defparam (oops)
To generate a diff of this commit:
cvs rdiff -u -r1.531.2.7 -r1.531.2.8 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.48.2.5 -r1.48.2.6 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.103.2.7 -r1.103.2.8 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.12 -r1.12.2.1 src/sys/dev/files.audio
cvs rdiff -u -r1.7 -r1.7.2.1 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.531.2.7 src/sys/arch/amd64/conf/GENERIC:1.531.2.8
--- src/sys/arch/amd64/conf/GENERIC:1.531.2.7 Tue Jan 21 11:55:57 2020
+++ src/sys/arch/amd64/conf/GENERIC Mon Jan 27 07:06:02 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.531.2.7 2020/01/21 11:55:57 martin Exp $
+# $NetBSD: GENERIC,v 1.531.2.8 2020/01/27 07:06:02 martin 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.531.2.7 $"
+#ident "GENERIC-$Revision: 1.531.2.8 $"
maxusers 64 # estimated number of users
@@ -55,6 +55,9 @@ 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.48.2.5 src/sys/arch/evbarm/conf/GENERIC:1.48.2.6
--- src/sys/arch/evbarm/conf/GENERIC:1.48.2.5 Sun Dec 8 12:57:21 2019
+++ src/sys/arch/evbarm/conf/GENERIC Mon Jan 27 07:06:02 2020
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC,v 1.48.2.5 2019/12/08 12:57:21 martin Exp $
+# $NetBSD: GENERIC,v 1.48.2.6 2020/01/27 07:06:02 martin Exp $
#
# GENERIC ARM (aarch32) kernel
#
@@ -614,6 +614,7 @@ 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.103.2.7 src/sys/arch/evbarm/conf/GENERIC64:1.103.2.8
--- src/sys/arch/evbarm/conf/GENERIC64:1.103.2.7 Tue Jan 21 10:39:58 2020
+++ src/sys/arch/evbarm/conf/GENERIC64 Mon Jan 27 07:06:02 2020
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC64,v 1.103.2.7 2020/01/21 10:39:58 martin Exp $
+# $NetBSD: GENERIC64,v 1.103.2.8 2020/01/27 07:06:02 martin Exp $
#
# GENERIC ARM (aarch64) kernel
#
@@ -426,6 +426,7 @@ 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/dev/files.audio
diff -u src/sys/dev/files.audio:1.12 src/sys/dev/files.audio:1.12.2.1
--- src/sys/dev/files.audio:1.12 Wed May 8 13:40:17 2019
+++ src/sys/dev/files.audio Mon Jan 27 07:06:02 2020
@@ -1,4 +1,6 @@
-# $NetBSD: files.audio,v 1.12 2019/05/08 13:40:17 isaki Exp $
+# $NetBSD: files.audio,v 1.12.2.1 2020/01/27 07:06:02 martin Exp $
+
+defparam opt_audio.h AUDIO_BLK_MS
define audiobus { }
define midibus { }
Index: src/sys/dev/audio/audiodef.h
diff -u src/sys/dev/audio/audiodef.h:1.7 src/sys/dev/audio/audiodef.h:1.7.2.1
--- src/sys/dev/audio/audiodef.h:1.7 Sat Jul 6 12:58:58 2019
+++ src/sys/dev/audio/audiodef.h Mon Jan 27 07:06:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: audiodef.h,v 1.7 2019/07/06 12:58:58 isaki Exp $ */
+/* $NetBSD: audiodef.h,v 1.7.2.1 2020/01/27 07:06:02 martin Exp $ */
/*
* Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
@@ -29,6 +29,10 @@
#ifndef _SYS_DEV_AUDIO_AUDIODEF_H_
#define _SYS_DEV_AUDIO_AUDIODEF_H_
+#ifdef _KERNEL_OPT
+#include "opt_audio.h"
+#endif
+
/* Number of HW buffer's blocks. */
#define NBLKHW (3)