Saturday, May 30, 2009

Making subwoofer work for mp3 playback in Ubuntu

The only thing I felt missing whenever I played MP3s on Ubuntu was the rich punch of bass from my subwoofer speakers. There is no option of a mixer to reroute sub base frequencies to the subwoofer channel.

My Subwoofer is a home brewn one and has no external hardware to downmix and filter out the frequencies from the front stereo channels as found in 2.1 speaker systems. The ac3 filter or the ffdshow audio decoder I normally use in windows has this option but not in linux.

So I tried many media player applications in ubuntu. Amarok, Xine..etc...and ended up clueless

Then I installed mplayer from the repositories using

$ sudo apt-get install mplayer

MPlayer is a command line media player for KDE. The GUI version is GMplayer.

This one has got tons of command line options with it. The one I like particularly is the -af (Audio filter) option.

The man pages of mplayer are too large to scroll through, better make it into a file to be read by some thing like gedit.

it has the option sub=cutoff:channel

which it says will filter frequencies from the left and right channels using butterworth filter below the cutoff value and reroute it to the channel specified.

Here is what i have used

$ mplayer -ao oss -af sub=75:5 -channels 5

-ao : specifies the audio output driver, Here oss is given

-af : audio filter options without which the sub option won't work

sub=75:5 : the cutoff frequency and the sub channel

-channels : specifies the number of channels to be used.
Here mplayer recognises channel 5 as the sub channel.

if you want to invoke all these options when double clicking an MP3 file,

feed all these options with the "open with" menu's extra options. Add an "&" at

the end to make it work in the background.

Enjoy the thump of music!!!!

To configure the mixer for 6 channel mode in Ubuntu..see this post...

Sunday, May 10, 2009

Solve APIC problem in Linux

My AMD Athlon system used to freeze at boot time stating an APIC problem. We can temporarily skip the issue by adding noapic at the end of the boot command line.

But the problem keeps on nagging at each startup.

To solve the issue permanently edit the
GRUB bootloader configuration file - menu.lst

$ sudo gedit /boot/grub/menu.lst

Scroll down to find some text similar to the ones we see at the bootup options. Here is one

title Ubuntu 8.10, kernel 2.6.27-9-generic
uuid d727a8ef-4fbe-457d-987c-6959924f76b6
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=d727a8ef-4fbe-457d-987c-6959924f76b6 ro quiet splash vga=792
initrd /boot/initrd.img-2.6.27-9-generic

Like wise we'll see many options below this one. Now we have to just add the word 'noapic'
at the end of the line "kernel".

Save the file & restart the system.