FreeBSD disable stereo sound

Posted on January 21, 2023

We have two ears, so we hear the world in stereo. Two ears give us a sense of distance and direction. Therefore, the FreeBSD Operating System provides and enables multichannel audio by default, popularly referred to as “surround sound”. Properly, by default only 2 channels are enabled: “s16le:2.0, Stereo, 2 channels (left, right)”.

Unfortunately, stereo audio is quite useless and annoying for a person with single sided deafness or unilateral hearing loss. Some utility allows to select mono, for example, vlc (port/package multimedia/vlc):

Not all utilities are so advanced. Fortunately, the FreeBSD Audio Subsystem is very powerful. It is possible to select mono for each device via:

# sysctl dev.pcm.%d.play.vchanformat="s16le:1.0"

where %d is a device number listed by:

$ sysctl dev.pcm

To automatically set the mode each time the machine boots (let’s say for the device number 3), add to /etc/sysctl.conf.

# Mono for device 3
dev.pcm.3.play.vchanformat=s16le:1.0

Laptops typically have two speakers (left and right). The speaker to “bad” ear can be annoying for people with unilateral hearing loss. Fortunately (again), the FreeBSD Audio Subsystem is very powerful. It is possible to set the volume for each speaker, for example, via mixertui (port/package audio/mixertui):

To save pressing ‘p’ key and to load/set after a reboot (without starting the TUI):

$ mixertui -p audio-profile.conf

Important. Refer to the sound(4) manual and the Sound Wiki Page to know more about FreeBSD audio features and customizations.