Notes on FreeBSD’s In-kernel Equalizer

FreeBSD (since long before 10.0-RELEASE) has a pretty reasonable parametric equalizer built into the kernel. Who knew?

It can be enabled on a per-device basis at boot by using the hint.pcm.%d.eq tunable, and then you get two intentionally vague and repurposable “bass” and “treble” volume sliders in your /dev/mixer%d device.

You can change the parametric parameters, but you must recompile your kernel in order to change hw.snd.feeder_eq_presets and then rebooting. This variable has a specific format, described possibly exclusively in this mysterious document. (mirrored here.)

Unfortunately, upon defining a custom FEEDER_EQ_PRESETS in my /etc/make.conf, I discovered that /usr/src/sys/tools/sound/feeder_eq_mkfilter.awk, which is in charge of understanding it, seemed to be expecting some unknown format. It needed some updating, probably due to the obscurity of this feature. When I do freebsd-update I have to remember this all over again, and so I decided to write this fix up real quick.

I’ve submitted a bug report, 195760.

Long story short, if you want to change FEEDER_EQ_PRESETS for FreeBSD 10, use this slightly modified version of feeder_eq_mkfilter.awk:

/ notes / FreeBSD / equalizer