Topic: Replacing ALSA with OSS4 On Debian Sid

I ran into some issues with ALSA after an update recently (mute toggle) and couldn't be bothered figuring it out so decided to spend the time I would have used troubleshooting ALSA to install OSS instead.

So far I am glad I did...

I am not sure if these instructions work on Stable and will *probably* work on Testing - If someone cares to test it that would be good.

apt-get update
apt-get install oss4-base oss4-dkms oss4-gtk libasound2-plugins

You should see dkms build the modules for your kernel which might take a little while.

dpkg-reconfigure linux-sound-base

Choose OSS

Stop and remove ALSA (you may not want to purge the packages like I did, thats up to you)

invoke-rc.d alsa-utils stop
apt-get autoremove --purge alsa-base alsa-utils

Then reboot your system.

moc and vlc both just worked except that moc could not detect the mixer for volume control - this is fixable apparently and I am in the middle of googling it.

I had to do the following to get flash audio working in IW and Chromium (I use flashplugin-nonfree).

cd /tmp/
apt-get source oss4
cd oss4-4.2-build2005/oss/lib/
cc -shared -fPIC -O2 -Wall flashsupport.c -o /tmp/libflashsupport.so
install -s /tmp/libflashsupport.so /usr/lib

Then restart Chromium or IW, remember to kill Chromium from running in the background like it does now.

You can use ossxmix or ossmix for controlling volume.

I would be interested in peoples view on the difference in audio quality and usability.

Last edited by jelloir (2012-01-26 05:57:29)

Re: Replacing ALSA with OSS4 On Debian Sid

jelloir wrote:

I would be interested in peoples view on the difference in audio quality and usability.

Yes, me too. Have heard now too many good things about it.

Re: Replacing ALSA with OSS4 On Debian Sid

I'm tempted to check this out, but hesitant. I don't even know how to get some of my devices working without using a .asoundrc file. I'd have to just cross my fingers and hope they work out of the box. Maybe this weekend if I can pull my self away from my homework long enough I'll try it out and let you know how it goes.

Why try to think outside the box, when we could just set the box on fire?

Re: Replacing ALSA with OSS4 On Debian Sid

Hmmm...

So I left moc and my computer for about 1-2 hours and came back to this.

http://ompldr.org/tY2docg

Could barely move my mouse around the screen.  moc was stopped and not playing any songs.

Admittedly I still hadn't fixed up the mixer in moc so I am not laying blame with OSS.  Obviously moc was feaking about about the mixer and had some kind of mem leak.

Re: Replacing ALSA with OSS4 On Debian Sid

^ There is a known issue when MOC is paused, that it eats CPU but not when it is stopped. Not sure if that is the case here.

Re: Replacing ALSA with OSS4 On Debian Sid

Ok, so I have figured it out and now have a working mixer direct via OSS which is pretty cool.  And it stops moc going nuts on the CPU and MEM (thanks for the tip about pausing ivanovnegro but this was a different cause)

moc needs to be compiled with the correct soundcard.h for OSS4 (/usr/src/oss4-4.2-build2005/include/soundcard.h)

To get it working...

cd /usr/local/src/
apt-get build-dep moc
apt-get source moc
cd moc-2.5.0~alpha4+svn20111012/
wget -O oss.patch "http://crunchbanglinux.org/pastebin/?dl=1465"
patch -i oss.patch

Edit debian/changelog and add the following to the top of the file (this stops it being blown away at upgrades).

moc (1:2.5.0~alpha4+svn20111012-1-oss) unstable; urgency=low

  * patch for "Can't read from mixer"

 -- CrunchBang <me@example.com>  Thu, 26 Jan 2012 21:20:20 +1100

There is some bugs in the moc source that will cause it to fail - fix them as follows:

sed -i 's/debian\/tmp//g' debian/moc.install
mkdir -p ./usr/lib/moc/decoder_plugins/
cp /usr/lib/moc/decoder_plugins/libsidplay2_decoder.so ./usr/lib/moc/decoder_plugins/
dpkg-buildpackage -rfakeroot -uc -b
dpkg -i ../moc_2.5.0~alpha4+svn20111012-1-oss_amd64.deb
dpkg -i ../moc-ffmpeg-plugin_2.5.0~alpha4+svn20111012-1-oss_amd64.deb

Now start moc and change the volume with "<>" keys.  If you run ossxmix at the same time you will see the volumes for the mocp vmixer changing and visa versa - pretty cool!

moc always used to report the wrong volume but under OSS its spot on now.

All that kinda sucked and wasn't OSS's fault.  I have to say I like OSS better thus far.  seperate mixers per app is cool and sound quality seems better.

Source:  http://moc.daper.net/node/552

Last edited by jelloir (2012-01-26 12:06:11)

Re: Replacing ALSA with OSS4 On Debian Sid

So I have decided to go back to ALSA as the google talk plugin only supports ALSA and I use it.

It was an interesting experiment but I'm done with OSS for the time being.

After trying ALSA again after OSS, if I'm honest I couldn't make out any difference in sound quality.

To much messing around to get things working...

Re: Replacing ALSA with OSS4 On Debian Sid

jelloir wrote:

After trying ALSA again after OSS, if I'm honest I couldn't make out any difference in sound quality.

I don't think you'd get much of a difference unless you have some heavy hardware. People mostly tell themselves these things, because changing the sound system is fun, and you gotta account for the spent time somehow big_smile

Re: Replacing ALSA with OSS4 On Debian Sid

True, Its funny how your expectations can override good judgement, just look at Apple products tongue