Page 1 of 1

[HOWTO] Replace ALSA with OSS4

Posted: 01 Feb 2015, 17:48
by ashkenazi
Since ALSA has bad sound quality, you might want to replace it with OSS4. Download OSS4 from here:
http://slackonly.com/pub/packages/14.1- ... _slack.txz
then, convert it into an .xzm module and add it to your porteus/modules directory.

Activate the module. Run in the terminal as root:

Code: Select all

soundon
It will complain that

Code: Select all

sound_pcm
and similar ones are in use. Make a list of those modules as we need to blacklist them.
Create a file named:

Code: Select all

/etc/modprobe.d/alsa_blacklist.conf
and add a few lines by prepending

Code: Select all

blacklist
to module names you got in the previous step. Save the file and exit.
Add:

Code: Select all

/usr/sbin/soundon
to your

Code: Select all

/etc/rc.d/rc.local
Now we will fix the remaining issues with OSS4. In order to have Flash player working without crackling noise, add to your

Code: Select all

/usr/lib/oss/soundon.user
this:

Code: Select all

vmixctl attach /dev/oss/oss_envy240/pcm0 /dev/oss/oss_envy240/pcmin0
REPLACE oss_envy24 above with YOUR sound card module! (e. g. oss_hdaudio for integrated Intel HDA)
Now we need to make more apps aware of OSS4. Create a file

Code: Select all

/etc/asound.conf
which should contain this:

Code: Select all

pcm.oss {
   type oss
    device /dev/dsp
}

pcm.!default {
    type oss
    device /dev/dsp
}

ctl.oss {
    type oss
    device /dev/mixer
}

ctl.!default {
    type oss
    device /dev/mixer
}
Add the sound mixer to your startup applications:

Code: Select all

ossxmix -b
Enjoy your high quality audio!

Re: [HOWTO] Replace ALSA with OSS4

Posted: 01 Feb 2015, 18:47
by Bogomips
Before going overboard and immersing oneself in the intricacies of it all, it may pay to check that there is an i486 version available somewhere, if one is a 32-biter.

Re: [HOWTO] Replace ALSA with OSS4

Posted: 01 Feb 2015, 19:51
by ashkenazi
You can install it using the generic TAR:
http://www.opensound.com/release/oss-li ... 86.tar.bz2

As root:

Code: Select all

tar jxvf  oss-linux-v4.2-2011-i386.tar.bz2 -C /
sh /usr/lib/oss/build/install.sh
How to create a module from source:
http://www.porteus.org/component/conten ... ource.html

Slackbuild for OSS:
http://slackbuilds.org/repository/14.1/audio/oss/

Re: [HOWTO] Replace ALSA with OSS4

Posted: 01 Feb 2015, 20:07
by Bogomips
Thanks. So next on agenda: how to get OSS kernel module for my NVIDIA card, or is it already supplied in tar ball?

Re: [HOWTO] Replace ALSA with OSS4

Posted: 01 Feb 2015, 21:38
by ashkenazi
What's the exact model of your sound card? If unsure, please post the output of this command:

Code: Select all

lspci | grep Audio
The install.sh script compiles all OSS modules.

This is a list of all supported sound cards:
http://manuals.opensound.com/devlists/Linux.html

Re: [HOWTO] Replace ALSA with OSS4

Posted: 02 Feb 2015, 01:02
by Bogomips
Thanks for info. Now have more or less complete picture. :beer:

Re: [HOWTO] Replace ALSA with OSS4

Posted: 02 Feb 2015, 10:22
by ashkenazi
The best music player to use with OSS4 is Deadbeef with Petrov's plugin (exact scientific resampler):
http://www.opensound.com/forum/viewtopi ... =90#p19477

Another tip: use lossless audio codecs (FLAC is better than MP3)
SMTube combined with SMPlayer is better than Flash for YouTube (by avoiding Flash you can remove the "vmixctl attach" line from "soundon.user").
SMPlayer allows you to watch videos on ancient hardware (YouTube on 600MHz Celeron PIII-era laptop with no Xorg video driver? It's possible.)
Use Greasemonkey or Scriptish for Firefox with iSebaro's ViewTube plugin to watch videos on many popular websites:

Code: Select all

http://isebaro.com/viewtube/?ln=en
Use the "Get" option and copy the link you want to watch to your SMPlayer.

Re: [HOWTO] Replace ALSA with OSS4

Posted: 02 Feb 2015, 12:50
by Bogomips
SMplayer sometimes doesn't play subtitles or age-restricted, in which case youtube-dl comes to the rescue, for which (usm -g)python needs to be activated. Python seems to be quite ubiquitous, so always have it at hand.

Re: [HOWTO] Replace ALSA with OSS4

Posted: 02 Feb 2015, 14:36
by ashkenazi
This one has more features than youtube-dl and it's Python-based as well:
https://github.com/np1/mps-youtube

There's also Minitube:
http://flavio.tordini.org/minitube

SMPlayer can seek videos while they are still being downloaded, and that's the one advantage it offers.

Re: [HOWTO] Replace ALSA with OSS4

Posted: 13 Aug 2015, 06:14
by rara
ashkenazi,

Forgive me if it sounds too naive a question, but I am really curious.

What are the advantages of OSS4 over ALSA, in what ways is it superior?

What hardware have you been using the evaluate the sound to reach your conclusion about ALSA and OSS4 sound quality?