git: 0a9c3f3120f6 - stable/14 - snd_uaudio: drop the default monitor level to 10%
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 Oct 2026 01:18:22 UTC
The branch stable/14 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=0a9c3f3120f6eba16c2ad94d018a213dff6c2a65
commit 0a9c3f3120f6eba16c2ad94d018a213dff6c2a65
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2026-08-26 14:34:47 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-10-23 02:52:52 +0000
snd_uaudio: drop the default monitor level to 10%
As noted in the comment, some headsets with a hardware sidetone are
incredibly sensitive and emit immediate feedback upon attach with the
current system-wide default of 75%. Drop it down just for snd_uaudio(4)
to avoid incredibly unpleasant surprises.
Reviewed by: christos
(cherry picked from commit c3c6a6c7825ccc744afddba692820296f72ea53f)
---
sys/dev/sound/usb/uaudio.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 453f7d20c698..c82b6a3093f7 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -112,6 +112,13 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, default_channels, CTLFLAG_RWTUN,
#define UAUDIO_BUFFER_MS_MIN 1
#define UAUDIO_BUFFER_MS_MAX 8
+/*
+ * The default monitor level is high enough that headsets with a hardware
+ * sidetone may emit immediate feedback upon attach. We'll lower the default
+ * just for snd_uaudio(4) to avoid breaking others.
+ */
+#define UAUDIO_DEFAULT_MONITOR 10
+
static int
uaudio_buffer_ms_sysctl(SYSCTL_HANDLER_ARGS)
{
@@ -1207,6 +1214,8 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas
}
if (mixer_init(dev, mixer_class, sc))
goto detach;
+ mix_set(sc->sc_child[i].mixer_dev, SOUND_MIXER_MONITOR,
+ UAUDIO_DEFAULT_MONITOR, UAUDIO_DEFAULT_MONITOR);
sc->sc_child[i].mixer_init = 1;
mixer_hwvol_init(dev);