Linutop2: Alsaequal 0.4 for Ubuntu 9.10 (.deb package)

Posted by – 2010/01/05

Ever wanted a snazzy equaliser for your linutop2/(or any AMD geode-based nettop) but were afraid to ask?

Built today under the influence of cli-guru kmandla and following some simple build instructions at debian.net. Based on alsaequal 0.4 If you’re running a headless, X-less linutop2 as your boombox like I do, a good cli equaliser is pretty damn valuable.
A couple of prerequisites for this guide: a working alsa-based sound setup, mpg123 and/or vorbis-tools (ogg321) for playback.


grab it here or open your favourite xterminal and start pasting :)
wget http://www.fileden.com/files/2010/1/5/2714416/alsaequal_20100105-1_i386.deb
sudo apt-get install caps
This will install the CAPS Audio Plugin Suite, the main dependency (if you find others please let me know).
Then you sudo dpkg -i alsaequal_20100105-1_i386.deb
to install the equaliser itself.

Halfway done here, we need to save the following to ~/.asoundrc

#not really necessary
#I just aliased the default csaudio geode companion to pcm.csaudio
pcm.csaudio {
type hw
card 0
device 0
}

ctl.equal {
type equal;
}

pcm.plugequal {
type equal;
slave.pcm "plug:csaudio";
}

pcm.equal {
type plug;
slave.pcm plugequal;
}

Force-reload all your alsa modules with sudo alsa force-reload
and start EQing with alsamixer -D equal
To verify that your setup is configured correctly, try to play back an mp3 with mpg321 -a hw:equal, forcing mpg321 to use the recently created ‘device’.
Now for the actual EQ’d playback. I have not managed to make cmus work with the equaliser (shame cause it is my audio player of choice) but it will work without a hitch in mpg123 , ogg123 and by extension, the now obsolete cplay. To make cplay use the correct parameters for mpg321/ogg123 open your favourite
editor and save the following lines to ~/.cplayrc

PLAYERS = [
    FrameOffsetPlayer("ogg123 -a hw:equal -q -v -k %d %s", "\.ogg$"),
    FrameOffsetPlayer("mpg321 -a hw:equal -q -v -k %d %s", "(^http://|\.mp[123]$)", 38.28)
    ]

The only drawback to this form of EQing is a rather increased CPU usage during playback. It jumped from an average 10-15% to 30-35% (the LX800 is not exactly a performance CPU anyway).
EQing is done in real-time so to speak (there is some inherent latency that cannot be avoided) so I suggest you run your equaliser in a separate gnu screen window for fine-tuning as you listen to your reference audio.

DISCLAIMER since YMMV:
THERE IS NO WARRANTY FOR THIS GUIDE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. i.e. if you botch up by trying to adopt this guide for a different setup, just erase ~/.asoundrc , force-reload alsa and you’re back where you started :)

9 Comments on Linutop2: Alsaequal 0.4 for Ubuntu 9.10 (.deb package)

  1. how to use it with xmms says:

    I installed it…
    with ‘alsamixer -D equal’

    equalizer is working

    but ‘mpg321 -a hw:equal’ is not working

    I would really like to use this with xmms

  2. n2j3 says:

    Depends on your hardware. The linutop2′s card has some considerable latency so when you tweak the EQ you’d have to wait (less than a second) to hear any changes. Try lowering everything to the extreme minimum and then start tweaking.

    How do you know it’s working if you can’t listen to the eqed output? Unless by ‘working’ you mean being able to see the interface.

    I run a headless machine and I’m really lacking space for X11-related experimentation , so testing this on xmms is not possible for me. I’ll see if I can do this in VM or on my desktop at some point.

    P.S Make sure you check this thread at debian.net (esp the dmix stuff, it might be the solution to your problem)

  3. zsolt says:

    I installed it from .deb package on Ubuntu 9.10 and nothing u mention here is working. I can’t find the ~/.asoundrc file and the command alsamixer -D equal will return an error message like this:

    zsolt@zsolt-laptop:~$ alsamixer -D equal
    ALSA lib control.c:902:(snd_ctl_open_noupdate) Invalid CTL equal

    alsamixer: function snd_ctl_open failed for equal: No such file or directory

    Does this program work with Ubuntu 9.10? I know there’s a 0.6 version already, but no one has made a deb package for it and compiling it form source is very very difficult…

    Thanks!

  4. n2j3 says:

    The reason you can’t find the .asoundrc is cause you have to create it!
    .asoundrc is a bit hardware specific though, that’s why I keep saying this will work on a linutop2 and your mileage may vary on other setups. Use the asoundrc you see here, and tell me what you get.

    p.s. I run 9.10 too.

  5. Siddharth says:

    Hi, I can’t get the equalizer to work. Please help. Below is an extract from the terminal. I’m using Ubuntu 9.10. Note that I did not install from the debian package mentioned in this page.

    sudo alsa force-reload
    lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/sid/.gvfs
    Output information may be incomplete.
    Terminating processes: 1099lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/sid/.gvfs
    Output information may be incomplete.
    1099lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/sid/.gvfs
    Output information may be incomplete.
    lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/sid/.gvfs
    Output information may be incomplete.
    .
    lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/sid/.gvfs
    Output information may be incomplete.
    Unloading ALSA sound driver modules: snd-intel8x0 snd-ac97-codec snd-pcm-oss snd-mixer-oss snd-pcm snd-seq-dummy snd-seq-oss snd-seq-midi snd-rawmidi snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-alloc.
    Loading ALSA sound driver modules: snd-intel8x0 snd-ac97-codec snd-pcm-oss snd-mixer-oss snd-pcm snd-seq-dummy snd-seq-oss snd-seq-midi snd-rawmidi snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-alloc.

  6. n2j3 says:

    Not much I can say Siddharth. If you’re using this in gnome/kde etc, go to System>Preferences>Sound and make sure everything is changed to ALSA. Some problem-specific googling might also help e.g. http://u.nu/9qx29

  7. mardinemu says:

    I got it to work in cmus. Hit 7 (for settings), go down to “dsp.alsa.device”. It should be set to “default” or something. Change it to “equal” and that should do it.

  8. n2j3 says:

    Error: opening audio device: No such file or directory

    :(

    even though it works with cplay /mpg321 etc

    you think it might be a missing link?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>