Solved [SOLVED] Sound Equalizer Help Request

Good Morning All,

I am in the process of prepping my system to move from Arch Linux to FreeBSD. I have two needs that I don't see resolved in the ports tree, nor in any wiki /documentation I read. One is a FS driver posted elsewhere, and the other is a sound issue. Specifically: A sound Equalizer.

I am a USMC Veteran who had a mortar land right by my left ear, and as a result I need an equalizer in my sound config so I can use my headphones. My hearing aids turn off when I put on my headphones so using them is a no-go. I live in an apartment where my wife watches multimedia on her desktop, using only speakers and no headphone. So 98% of my sound has to go through my headphones if I have any chance of understanding what is being said through the audio device.

In my linux install, I have pulseaudio, which has a built-in equalizer. I can thus correct the sound to address my specific hearing loss. The issue is that pulseaudio in the ports tree is very old. It's at a 0.9.* level which does not include an equalizer. On linux, I am on the 4.04 pulseaudio release which does include the equalizer. So from the way I see it, pulseaudio is not an option for me in FreeBSD.

Alsa has a LADSPA plugin called "AlsaEquals", that provides a cruder, but effective sound equalizer. I do not see this alsa addon in the ports tree. From my reading FreeBSD uses neither pulse nor alsa by default. The /dev/dsp driver is in and of itself.

VLC and smplayer both have builtin sound equalizers in them...so watching movies and other stuff with equalized sound is a non-issue. Watching News or browsing YouTube (my version of TV) is an issue. As a result I am used to using a global sound equalizing scheme.

Can someone more experienced than I, point me to a how-to, or explain to me how to get this done in FreeBSD?

Thank You!


Sincerely and respectfully,

Dave
 
Re: Sound Equalizer Help Request

Just to be clear, is this a left/right volume adjustment issue or is it about adjustment of certain frequencies (like, having a certain "curve" on a 7-band equalizer)?

If it's about left/right volume adjustment you can use mixer() on the command line, e.g. mixer 80:20.

If it's about frequencies things get more complicated as there's limited support for this in the base system (base system as in "FreeBSD without any ports installed"). Only left/right treble and bass can be adjusted, e.g. mixer treble 80:20. Additionally, these two channels need to be enabled by specifying hint.pcm.0.eq=1 in /boot/loader.conf.

HTH
 
Re: Sound Equalizer Help Request

Thank you for the reply....

I am speaking about a frequency equalizer. I have hearing loss, and need to boost high-frequencies....However, a Bass/Treble adjustment is better than nothing....My loss is fairly linear between high and low frequencies.

I will certainly give this a shot... Just brought a laptop out of the ground this evening with FreeBSD. I'll use it for my test station and report back if it's suitable for my needs.

Thank you again.

Sincerly and respectfully,

Dave
 
Re: Sound Equalizer Help Request

This might be what you are looking for Parametric EQ.

I have not done this in some time as I was just using it to play audio through my stereo with better sound quality. It was pretty easy to get working, as I recall.
 
Re: Sound Equalizer Help Request

Bingo!

This is exactly what I was looking for!

Thank You!


Sincerly and respectfully,

Dave
 
Copy that.....

I am building a custom kernel though first. 1st custom kernel booted just fine on 1st try....Now I'm slowly tweaking it to fit this laptop's hardware closer, enable hardware not enabled by default, and remove stuff from the kernel that doesn't exist in this laptop such as RAID controllers, etc.

Once this is done, I've got an issue with X that many folks are having with 10.0 I need to resolve....then I can go after the sound.....So it may be a few days before I get back to anyone.


Thanks!


Sincerely,


Dave
 
Adding the Parametric EQ is as easy as appending
Code:
hint.pcm.X.eq=1
to your /boot/loader.conf file, where X = the number of your sound device.

For completeness, this is what I have in my own /boot/loader.conf file:
Code:
# Enable parametric equalizer
hint.pcm.0.eq=0  ##<NVIDIA GTX550 (HDMI/DP 8ch)>[1]##
hint.pcm.1.eq=0  ##<NVIDIA GTX550 (HDMI/DP 8ch)>[2]##
hint.pcm.2.eq=0  ##<NVIDIA GTX550 (HDMI/DP 8ch)>[3]##
hint.pcm.3.eq=0  ##<NVIDIA GTX550 (HDMI/DP 8ch)>[4]##
hint.pcm.4.eq=1  ##<Realtek ALC892 (Rear Analog 7.1/2.0)>##
hint.pcm.5.eq=1  ##<Realtek ALC892 (Front Analog)>##
hint.pcm.6.eq=1  ##<Realtek ALC892 (Rear Digital)>[Optical]##
hint.pcm.7.eq=1  ##<Realtek ALC892 (Rear Digital)>[Coaxil]##

Above, the Parametric EQ is enabled for sound devices 5 thru 8 (device numbering starts at 0 not 1). This will give your sound device mixer adjustable treble and bass levels:
Code:
mixer bass    is currently set to 70:80
mixer treble  is currently set to 70:70
 
You're thinking a graphic EQ not Parametric. Parametric EQ effect certain frequency and effect a group of frequencies around it...kind of like a bell curve.

You'd want to look at the section of the documentation on FEEDER_EQ_PRESETS

I had looked for a system wide graphical EQ but nothing like that seems to exist, only in the individual applications like multimedia/xmms or multimedia/audacious
 
wblock@ said:
How do you adjust the frequency bands to other than the present values? Is it only two bands?

It is kind of like 2 Bands but not the same thing. (see below). If you are asking how to adjust the bass and treble levels ( I think that's what you meant), you do it the same way you would for other mixer levels, with mixer(8). For example:
Code:
% mixer
Mixer vol      is currently set to  75:80
Mixer bass     is currently set to  75:75
Mixer treble   is currently set to  75:75
Mixer pcm      is currently set to  75:80
%
% mixer bass 60:60
Mixer vol      is currently set to  75:80
Mixer bass     is currently set to  75:75
Mixer treble   is currently set to  75:75
Mixer pcm      is currently set to  75:80
Setting the mixer bass from 75:75 to 60:60.
% mixer
Mixer vol      is currently set to  75:80
Mixer bass     is currently set to  60:60
Mixer treble   is currently set to  75:75
Mixer pcm      is currently set to  75:80

roddierod said:
You're thinking a graphic EQ not Parametric. Parametric EQ effect certain frequency and effect a group of frequencies around it...kind of like a bell curve.

Yep, this is correct. If you remember some of the older generation analog stereo amplifiers where they had knobs for bass and treble adjustment on the front panel, this would be the same thing but at the digital level. To be honest this wouldn't even really be a true Parametric EQ as (from my understanding and what I can tell) center frequencies are preset and it adjusts only Q and tonal gain control. It's more of a Quasi-Parametric EQ. Generally, from a normal user's perspective however, this is the equivalent of a 2-Band Graphic Equalizer.

Also, while I realize many users of FreeBSD despise audio/pulseaudio, if I recall correctly, in recent versions , it does include an optional fully built in system wide (15 Band?) Graphic Equalizer (The FreeBSD port is only at version 0.9 as I type this so does not include this). Just food for thought...
 
protocelt said:
Yep, this is correct. If you remember some of the older generation analog stereo amplifiers where they had knobs for bass and treble adjustment on the front panel, this would be the same thing but at the digital level.

Now I feel old...my preamp still has these. :)
 
roddierod said:
You're thinking a graphic EQ not Parametric.

Nope, I've got both. My car stereo has a three-band parametric equalizer, for instance.

Parametric EQ effect certain frequency and effect a group of frequencies around it...kind of like a bell curve.

Right, but they vary in how many of those bands are available. The reason I ask is because if this is all in software, more than two bands should be possible, and the width of each band could be adjusted. It's like a graphic equalizer, but the sliders can also be moved side to side to select frequencies.

Edit: it does look like more than two bands can be defined (with a custom kernel), and also the bandwidth and slope of each. GUI software could show this and let the user adjust the runtime parameters.
 
Edit: it does look like more than two bands can be defined (with a custom kernel), and also the bandwidth and slope of each. GUI software could show this and let the user adjust the runtime parameters.

Is there any more available information on this? I ask as I'm very interested. I didn't find any, and the docs I have read didn't mention it as far as I can remember.
 
The link given above by @roddierod in post #4 leads to some documents, and seems to apply to sound(4). It lacks examples, though. sysctl hw.snd shows that the values are present.
 
Last edited by a moderator:
I missed the link in @roddierod's post above for some reason. :r Unfortunately I'm not all that knowledgeable with Parametric Equalizers so as soon as i get the time, I'll read/research a bit more and construct some possible presets. Thank you!
 
Last edited by a moderator:
Back
Top