Note: You are viewing an old version of this page. View the current version.

Install media-plugins/alsaequal Configure thus:

/etc/asound.conf:

# Set default card and device; check /proc/asound/cards for the names to use in !card :
defaults.pcm.!card PCH
defaults.ctl.!card PCH
defaults.pcm.!device 0
defaults.ctl.!device 0

ctl.equal {
  type equal;
}

pcm.plugequal {
  type equal;
  # 32-bit programs will fail because they can't load 64-bit ladspa plugins; point to both in order:
  path "/usr/lib64/ladspa;/usr/lib32/ladspa";
  slave.pcm "plug:dmix";
}
pcm.equal {
  type plug;
  slave.pcm plugequal;
}
pcm.asymed {
  type asym;
  playback.pcm "plugequal";
  capture.pcm "dsnoop";
}
pcm.!default {
  type plug;
  slave.pcm asymed;
}

Use 'alsamixer -D equal' to change the equalizer settings

And here's a way to switch presets:

#!/bin/sh

# Mine: "80 74 68 66 66 66 64 62 58 56"
# Flat: "65 65 65 65 65 65 65 65 65 65"

set_equalizer_curve() {
  curve="${*}"
  ctl=0
  for point in ${curve}
  do
    ctl=$(( ${ctl} + 1 ))
    echo cset numid=${ctl} ${point}
  done | amixer -D equal -s
}

profile="${1:-mine}"
case "${profile}" in
mine) curve="80 74 68 66 66 66 64 62 58 56" ;;
flat) curve="65 65 65 65 65 65 65 65 65 65" ;;
*) echo "Unknown profile ${profile}" >&2 ;;
esac

[ "${curve}" ] && set_equalizer_curve "${curve}"