mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
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. MFC after: 3 days Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D59199
This commit is contained in:
1 parent
c45bdb39fe
commit
c3c6a6c782
1 file changed
+9
@@ -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)
|
||||
{
|
||||
@@ -1199,6 +1206,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);
|
||||
|
||||
Reference in new issue
Block a user