Open Sound System (OSS)
|Source Repository:||Repository:Funtoo Overlay|
Summary: A portable, mixing-capable, high quality sound system for Unix.
ARM RebuildARM systems will use new stage3's that are not compatible with earlier versions.
ABI X86 64 and 32Funtoo Linux has new 32-bit compatibility libraries inherited from Gentoo. Learn about them here.
Pre-built kernels!Funtoo stage3's are now starting to offer pre-built kernels for ease of install. read more....
Open Sound System (OSS)
The Open Sound System (or OSS) is an alternative sound architecture for Unix-like and POSIX-compatible systems. OSS version 3 was the original sound system for Linux, but was superseded by the Advanced Linux Sound Architecture (or ALSA) in 2002 when OSS version 4 became proprietary software. OSSv4 became free software again in 2007 when 4Front Technologies released its source code and provided it under the GPL license.
Configuring the kernel
Under Device Drivers:
<M> Sound card support ---> --- Sound card support [ ] Preclaim OSS device numbers <M> Advanced Linux Sound Architecture ---> < > Open Sound System (DEPRECATED) ---
Don't confuse the depreciated OSS module (OSSv3) module with todays OSSv4.
The first task is to to make sure that you build OSS with the correct soundcard drivers. To specify them, you can use the
OSS_CARDS setting in
E.g. for an HD Audio card use:
You can visit the OSS documentation for a driver reference.
Make sure that your current kernel sources directory are symlinked to
/usr/src/linux, since the OSS compilation relies on the kernel headers. You can use eselect kernel to verify or set your kernel. See eselect#kernel for a reference guide.
Now build the OSS modules and add
/etc/init.d/oss to the default runlevel:
# emerge oss # rc-update add oss default
To compile Applications with OSS support you need to set the
oss USE flag, however you will mostly want the
alsa flag there too as a fallback (OSS will create ALSA devices for those applications):
See how to set up an ALSA emulation for unsupported Applications below.
Configuring Applications for OSS
Since ALSA is the mostly default configuration for application, you might sometimes need to configure them properly before OSS output/input works.
There are two good resources which guide you through the steps for most applications:
You can instruct
alsa-lib to use OSS as its audio output system. This works as a sort of ALSA emulation.
Note, however, that this method may introduce additional latency in your sound output, and that the emulation is not complete and does not work with all applications. It does not work, for example, with programs that try to detect devices using ALSA.
So, as most applications support OSS directly, use this method only as a last resort.
In the future, more complete methods may be available for emulating ALSA, such as
cuckoo. See .
- Install the
alsa-pluginspackage, available in the Funtoo Overlay.
- Creare and edit
Do not forget to revert the changes after uninstalling.
Volume Control Mixer
To control the volume of various devices, mixers levels will need to be set. There are two mixers:
- ossmix: a command-line mixer, similar to the BSD audio mixer
- ossxmix: a GTK+-based graphical mixer.
ossxmix controls look like:
/ High Definition Audio ALC262 \ --------------------------------> 1 /________________________________\________________________________ | \ | [x] vmix0-enable [vmix0-rate: 48.000kHz] vmix0-channels |--> 2 | [ Stereo [v] ] | | | | __codec1______________________________________________________ | | | _jack______________________________________________________ ||--> 3 | | | _int-speaker_________________ _green_________________ ||| | | | | | | | ||| | | | | _mode_____ | | | | _mode_____ | | | ||| | | | | [ mix [v] ] o o [x] [ ]mute | | [ mix [v] ] o o [x] | ||| | | | | | | | | | | | ||| | | | |_____________________________| |_______________________| ||| | | |___________________________________________________________||| | |______________________________________________________________|| | ___vmix0______________________________________________________ | | | __mocp___ O O _firefox_ O O __pcm7___ O O | |--> 4 | | | | O O | | x x | | O O | | | | | | | | x O | | | | x x | | | | O O | | | | | o o [x] | x x | o o [x] | x x | o o [x] | O O | | | | | | | | x x | | | | x x | | | | O O | | | | |_________| x x |_________| x x |_________| O O | | | |_____________________________________________________________| | |_________________________________________________________________|
- One tab for each sound card
vmix(virtual mixer) special configurations appear at the top. These include sampling rate and mixer priority.
- These are your sound card jack configurations (input and output). Every mixer control that is shown here is provided by your sound card.
vmixmixer controls and sound meters. If the application is not actively playing a sound it will be labeled as
pcm09... and when the application is playing the application name will be shown.
For high definition (HD) audio,
ossxmix will color jack configurations by their pre-defined jack colors:
|green||front channels (stereo output)||3.5mm TRS|
|black||rear channels (stereo output)||3.5mm TRS|
|grey||side channels (stereo output)||3.5mm TRS|
|gold||center and subwoofer (dual output)||3.5mm TRS|
|blue||line level (stereo input)||3.5mm TRS|
|pink||microphone (mono input)||3.5mm TS|
Saving Mixer Levels
Mixer levels are saved when you shut off your computer. If you want to save the mixer level immediately, execute:
savemixer can be used to write mixer levels to a file with the
-f switch and restore by the
Other mixers that have support for OSS:
- Gnome Volume Control - for GNOME.
- Kmix - for KDE.
- VolWheel - After the installation, set it to autostart as needed, then enable OSS support by right-clicking on the system tray icon, choosing Preferences and then changing:
- Default Channel:
vmix0-outvol(find out what channel to use with
- Default Mixer:
- In the MiniMixer tab (optional), add
vmix0-outvoland optionally others.
Suspend & Hibernation
OSS does not automatically support suspend, it must be manually stopped prior to suspending or hibernating and restarted afterwards.
soundoff to enable and disable OSS, although they only stop OSS if all processes that use sound are terminated first.
The following script is a rather basic method of automatically unloading OSS prior to suspending and reloading afterwards:
Save the contents of this script (as root) into
/etc/pm/sleep.d/50osssound and make it executable:
# chmod a+x /etc/pm/sleep.d/50osssound
This script is rather basic and will terminate any application directly accessing OSS. Save your work prior to suspending/hibernating.
Troubleshooting HD Audio devices
Understanding the problem
If you have a HD Audio sound device, it is very likely that you will have to adjust some mixer settings before your sound works.
HD Audio devices are very powerful in the sense that they can contain a lot of small circuits (called widgets) that can be adjusted by software at any time. These controls are exposed to the mixer, and they can be used, for example, to turn the earphone jack into a sound input jack instead of a sound output jack.
However, there are also bad side effects, mainly because the HD Audio standard is more flexible than it perhaps should be, and because the vendors often only care to get their official drivers working.
When using HD Audio devices, you often find disorganized mixer controls, that do not work at all by default, and you are forced to try every mixer control combination possible, until it works.
ossxmix and try to change every mixer control in the middle area, that contains the sound card specific controls, as explained in the #Volume Control Mixer section.
You will probably want to setup a program to record/play continuously in the background (e.g.
ossrecord - | ossplay - for recording or
osstest -lV for playing), while changing mixer settings in
ssxmix in the foreground.
- Raise every volume control slider.
- In each option box, try to change the selected option, trying all the possible combinations.
- If you get noise, try to lower and/or mute some volume controls, until you find the source of the noise.
/usr/lib/oss/conf/oss_hdaudio.conf, uncommenting and changing
1=hdaudio_noskip=0to a value from 0-7 can give you more jack options in
If you modify this file, restart the oss service for the changes to take effect.
- Official Website
- OSS Wiki
- OSS Forum
- Developer Information
- Git repository
- opensound-devel mailing list