Open Sound System (Italiano)

From ArchWiki
Revision as of 13:47, 13 February 2011 by Lorenzog (Talk | contribs) (Tradotta parte volumi)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Open Sound System (Italiano)#)
Nota: Questo articolo è in fase di traduzione. Seguite per ora le istruzioni della versione inglese.

Questo articolo spiega come installare e configurare l' Open Sound System (OSS) sul tuo computer.

L' Open Sound System è un'architettura audio per i sistemi derivati da UNIX e POSIX-compatibili. La versione 3 di OSS é stata la versione originale usata per il sistema audio di Linux ed è inserita nel kernel ma nel 2002 fu rimpiazzata da ALSA quando la versione 4 di OSS divenne software proprietario. OSSv4 è ritornata software libero nel 2007 quando 4Front Technologies ha rilasciato il suo codice sorgente con licenza GPL.

Confronto con ALSA

Alcuni vantaggi e svantaggi confrontati con l'uso dell' Advanced Linux Sound Architecture.

Vantaggi di OSS (utenti)

  • Include un mixer software trasparente (vmix nello spazio kernel). Avere un software mixer trasparente significa che applicazioni multiple possono accedere alla periferiche audio simultaneamente.
  • Controllo del volume audio per ogni applicazione.
  • Alcune schede audio di tipo legacy sono meglio supportate (e.g. Creative X-Fi).
  • Il tempo di risposta iniziale in applicazioni audio è generalmente migliore.
  • Miglior supporto per le applicazioni che utilizzano l' API OSS. Molte applicazioni continuano ad usare questa API, che non richiedono un livello di emulazione come quello utilizzato da ALSA.

Vantaggi di OSS (sviluppatori)

  • API migliore, più pulita e facila da usare documentazione.
  • Supporto per i driver nello spazio utente.
  • Accessibilità. OSS funziona su sistemi BSD e Solaris.
  • Portabilità. OSS è più facile da portare su altri sistemi operativi.

Vantaggi di ALSA

  • Supporto migliore per le periferiche audio USB. Con OSS l'output è sperimentale, l'input non è implementato.
  • Supporto per le periferiche audio Bluetooth.
  • Supporto per i modem software AC'97 e HDAudio come il Si3055.
  • Supporto migliore per le periferiche MIDI. Con OSS è necessario utilizzare un sintetizzatore software come Timidity o Fluidsynth.
  • Supporto per la sospensione. OSS e i programmi associati devono prima essere chiusi.
  • Supporto migliore per la rilevazione dei jack. Su alcune schede madri HD gli utenti devono abbassare il volume degli altoparlanti per l'inserimento delle cuffie.

Installazione

Installa OSS eseguendo:

# pacman -S oss

Questo installa i file di OSS e esegue lo script di installazione che disabilita temporaneamente i moduli ALSA e installa i moduli kernel di OSS. Dal momento che ALSA è abilitato di default negli script di boot, è necessario disabilitarlo per evitare conflitti con OSS durante il boot. E' possibile fare questo modificando Template:Filename e aggiungendo:

MODULES=(!soundcore ...

Aggiungere poi OSS all'array dei demoni:

DAEMONS=(crond hal @oss...

Se l' utente non appartiene al gruppo audio, aggiungerlo con:

# gpasswd -a username audio

Poi avviare OSS con:

# /etc/rc.d/oss start

Nel caso OSS non sia in grado di riconoscere automaticamente la tua scheda audio alla partenza, esegui:

# ossdetect -v

Poi Template:Codeline per riattivarlo.

Testing

Considerare che il volume di default è molto alto, evitare di usare le cuffie e abbassare fisicamente il livello degli speaker (se possibile) prima di eseguire il test.

Test OSS eseguendo:

$ osstest

Dovrebbe essere possibile ascoltare una musica durante il processo di test. Se non c'è audio provare a regolare il volume o consultare la sezione dei problemi.

Per sentire suoni da più di un'applicazione simultaneamente è necessario vmix, il mixer software OSS.

Controllare che vmix sia abilitato eseguendo:

$ ossmix -a | grep -i vmix

Dovrebbe essere possibile vedere una linea tipo 'vmix0-enable ON|OFF (currently ON)'. Se non è possibile vedere nessuna linea che inizi con 'vmix', probabilmente significa che vmix non è collegato alla periferica audio. Per collegare vmix, eseguire il comando:

$ vmixctl attach device

dove device è la scheda audio, eg., /dev/oss/oss_envy240/pcm0 .

Per evitare di rieseguire questo comando manualmente in futuro, è possibile aggiungere a /usr/lib/oss/soundon.user, come suggerito in http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output.

Se si riceve l'errore "Periferica o risorsa occupata", è necessario aggiungere "vmix_no_autoattach=1" in /usr/lib/oss/conf/osscore.conf, e successivamente riavviare.

Vedere quali periferiche sono riconosciute eseguendo:

$ ossinfo

Dovrebbe essere possibile vedere una lista delle proprie periferiche sotto Device object o Audio Devices. Se la periferica che si vuole utilizzare non è in cima alle sezioni Audio device o Device objects, è necessario modificare /usr/lib/oss/etc/installed_drivers. Il driver per la periferica che si vuole utilizzare dovrebbe essere in cima. E probabilmente necessario un Template:Codeline. Se questo non risolve, commentare tutti i driver presenti che non sono della periferica preferita.

Regolazione del Volume

Per regolare il volume delle varie periferiche devono essere impostati i livelli dei mixer. Il mixer da linea di comando si chiama Template:Codeline. E' molto simile al mixer audio di BSD (mixerctl). Il mixer grafico si chiama Template:Codeline e per essere installato necessita di Template:Package Official.

I controllo di base del comando ossxmix:

 / 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            | |
| |_____________________________________________________________| |
|_________________________________________________________________|
  1. Una scheda per ogni periferica audio
  2. Le configurazione speciali del vmix (mixer virtuale) sono presenti in alto. Queste includono il sampling e la priorità del mixer.
  3. These are your sound card jack configurations (input and output). Every mixer control that is shown here is provided by your sound card.
  4. Queste sono le configurazioni dei jack della scheda audio (ingresso e uscita). Ogni regolazione mixer qui presente è fornita dalla scheda audio.
  5. Application vmix mixer controls and sound meters. If the application isn't actively playing a sound it will be labeled pcm08, pcm09..., when the application is playing the application name will be shown.
  6. Controlli e livelli audio del mixer vmix dell'applicazione . Se l'applicazione non sta attualmente riproducendo un suono sarà etichettata pcm08, pcm09..., quando l'applicazione è in riproduzione sarò mostrato il nome dell'applicazione.

Definizione dei Colori

Per l'audio ad alta definizione (HD), Template:Codeline mostra le configurazioni dei jack colorate secondo i colori predefiniti:

Color Type Connector
verde canali frontali (uscita stereo) 3.5mm TRS
nero canali posteriori (uscita stereo) 3.5mm TRS
grigio canali laterali (uscita stereo) 3.5mm TRS
oro centrale e subwoofer (doppia uscita) 3.5mm TRS
blu livello di linea (ingresso stereo) 3.5mm TRS
rosa microfono (ingresso mono) 3.5mm TS

Salvare i Livelli del Mixer

I livelli del mixer sono salvati quando il computer viene spento. Per salvare immediatamente i livelli del mixer, come root:

# savemixer

Template:Codeline può essere utilizzato per salvare i livelli del mixer in un file con lo switch Template:Codeline e ricaricarli con lo switch Template:Codeline.

Altri Mixer

Altri mixer supportano OSS:

  • GNOME - Gnome volume control
  • KDE - Kmix - Il supporto OSS è in fase di sviluppo.

Configurare le Applicazioni per OSS

Skype

The skype package only includes support for ALSA. To get an OSS-capable Skype, install the skype-oss package:

# pacman -S skype-oss

If you are using x86_64, you can get the bin32-skype-oss package from AUR.

Wine

  • Run winecfg.
$ winecfg
  • Go to the Audio tab.
  • Select OSS Driver.

Gajim

By default Gajim uses Template:Codeline to play a sound. To change this go in Advanced Settings and search for the Template:Codeline variable. The ossplay program included in the oss package is a good replacement:

Template:Codeline

MOC

To use MOC with OSS v4.1 you must change section OSSMixerDevice to OSSMixerDevice==/dev/ossmix in your config (located in /home/yourusername/.moc). And now MOC should work with OSS v4.1. Or you can compile moc-svn package from AUR (he got support for new vmix). For issue with interface change OSSMixerChannel===to OSSMixerChannel===Any channel and after start mocp press w (change to sofware mixex) that will help and you can change the volume power.

Applications that use Gstreamer

Remove pulseaudio and gstreamer*-pulse programs and libraries.

To change the gstreamer setting to output the sound to OSS instead of the default ALSA, run:

gstreamer-properties

Change the Default Output plugin to custom and the change the pipeline to:

oss4sink

For the input:

oss4src
Note: It's not certain that the input will sound better with oss4src compared to osssrc, so change this only if it improves your input sound. < confirmation on this please >
Note: For some applications (e.g. Rhythmbox, Totem) the gstreamer-properties have no effect, as they rely on "musicaudiosink" instead of "audiosink" (which is modified by gstreamer-properties). Workaround: Set audiosink with gstreamer-properties and use gconf-editor to copy the value of "/system/gstreamer/0.10/default/audiosink" to "musicaudiosink" (at the same location)

If you are using phonon with the gstreamer backend you will need to set the environmental variable. To add to your current user:

export PHONON_GST_AUDIOSINK=oss4sink

Add this to your Template:Filename to be loaded on login.

Firefox >=3.5

Firefox 3.5 introduces the <video> and <audio> tag support and can play ogg media out of the box. However, it currently can't be compiled with ALSA and OSS support at the same time. So you need to install the xulrunner-oss package from [community].

1. Stop firefox.
2. Install xulrunner-oss package from [community].
3. Start firefox.

Mplayer

If you are using gui (smplayer etc.) you will find the oss output at the audio settings. Using on cli you should specify the sound output: mplayer -ao oss /some/file/to/play.mkv If you don't want to bother typing it over and over again add "ao=oss" to your config file. (/home/$USER/.mplayer/config)

Music Player Daemon

MPD is configured through /etc/mpd.conf or ~/.mpdconf. Check both of these files, looking for something that looks like:

 audio_output {
       type           "alsa"
       name           "Some Device Name"
 }

If you find an uncommented (the lines do not begin with #'s) ALSA configuration like the one above, comment all of it out, or delete it, and add the following:

 audio_output {
       type           "oss"
       name           "My OSS Device"
 }
Note: I had to put this configuration in my ~/.mpdconf for it to work properly, but it ought to work in /etc/mpd.conf as well.

Further configuration might not be necessary for all users. However, if you experience issues (in that MPD doesn't work properly after it's been restarted), or if you like having specific (i.e. more user-configured, less auto-configured) config files, the audio output for OSS can be more specifically configured as follows: First, run:

 ossinfo | grep /dev/dsp

Look for the line that says something similar to Template:Codeline. Take note of what your <SOME_CARD_IDENTIFIER> is, and add bolded lines to your OSS audio output in your mpd config file:

 audio_output {
       type            "oss"
       name            "My OSS Device"
       device          "/dev/oss/<SOME_CARD_IDENTIFIER>/pcm0"
       mixer_device    "/dev/oss/<SOME_CARD_IDENTIFIER>/mix0"
 }

Other applications

Troubleshooting

Troubleshooting HDAudio devices

Understanding why problems arise

If you have a HDAudio sound device, it's very likely that you will have to adjust some mixer settings before your sound works.

HDAudio 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 is a side effect, mainly because the HDAudio standard is more flexible than it perhaps should be, and because the vendors often only care to get their official drivers working.

Then, when using HDAudio devices, you often find disorganized mixer controls, that doesn't work at all by default, and you are forced to try every mixer control combination, until it works.

How to solve

Open ossxmix and try to change every mixer control in the middle area, that contains the sound card specific controls, as explained in the previous "The mixer" section.

You'll probably want to setup a program to record/play continously in the background (e.g. Template:Codeline for recording or Template:Codeline for playing), while changing mixer settings in ossxmix 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.

Please note again that you do not need to change any controls in the top area nor in the bottom area, as they are virtual vmix-related mixer controls.

  • Editing Template:Codeline uncommenting and changing hdaudio_noskip=0 to a value from 0-7 can give you more jack options in ossxmix

I had to edit mine to hdaudio_noskip=7 for my sub/rear speaker to work on my laptop, restart oss for the changes to take effect Template:Codeline

MMS sound cracking in totem

If your stream sounds with cracks or strange noise in totem like it did with me then you could try to play it with another backend like ffmpeg (mplayer). That "fixed" the issue for me. This will not fix the issue that somehow pops up in gstreamer when playing MMS streams but it will give you the option to play it with good sound quality. Playing it in mplayer is simple:

# mplayer mmsh://yourstreamurl

Microphone playing through output channels

OSS by default plays back the microphone through the speakers. To disable this in ossxmix find the misc section. Check off every "input-mix-mute" to disable this.

Troubleshooting other issues

  • If you get distorted sound, try lowering some volume control sliders.
  • If you need to change the default sound card, look at here.
  • If you have another issues, try searching or asking for help at the 4front forums.

Tips and tricks

Using multimedia keys with OSS

An easy way to mute/unmute and increase/decrease the volume is to use the Template:Codeline script available in AUR.

Once you installed it try to toggle the sound:

$ ossvol -t

Type Template:Codeline for the other commands.

If you don't know how to assign commands to your multimedia keys, see Extra Keyboard Keys.

Template:Codeline troubleshooting

If you get an error like:

Bad mixer control name(987) 'vol'

you need to edit the script (Template:Filename) and change the value of the Template:Codeline variable which is at the beginning of the script. For example mine is Template:Codeline.

  • Note if you are using xbindkeys for your multimedia keys adding this
"ossmix vmix0-outvol -- +1"

raise volume

"ossmix vmix0-outvol -- -1"

lower volume

to the raise/lower volume section of your .xbindkeysrc file is an easy way to adjust the volume

Changing the Sample Rate

Changing the output sample rate is not obvious at first. Sample rates can only be changed by the superuser and vmix must be unused by any programs when a change is requested. Before you follow any of these steps, ensure you are going through a receiver/amplifier and using quality speakers and not simply computer speakers. If you are only using computer speakers, don't bother changing anything here as you won't notice a difference.

By default the sample rate is 48000hz. There are several conditions in which you may want to change this. This all depends on your usage patterns. You want the sample rate you are using to match the media you use the most. If your computer has to change the sampling rate of the media to suit the hardware it is likely, though not guaranteed that you will have a loss in audio quality. This is most noticable in downsampling (ie. 96000hz → 48000hz). There is an article about this issue in "Stereophile" which was discussed on Apple's "CoreAudio API" mailing list if you wish to learn more about this issue.

Some example sample rates:

  • 44100hz - Sample rate of standard Red Book audio cds.
  • 88000hz - Sample rate of SACD high definition audio discs/downloads. It is rare that your motherboard will support this sample rate.
  • 96000hz - Sample rate of most high definition audio downloads. If your motherboard is an AC'97 motherboard, this is likely to be your highest bitrate.
  • 192000hz - Sample rate of BluRay, and some (very few) high definition downloads. Support for external audio reciever equipment is limited to high end audio. Not all motherboards support this. An example of a motherboard chipset that would support this includes Intel HDA audio.

To check what your sample rate is currently set to:

  1. Run "ossmix | grep rate".

You are likely to see "vmix0-rate <decimal value> (currently 48000) (Read-only)".

If you do not see a "vmix0-rate" (or "vmix1-rate", etc.) being outputted, than it probably means that vmix is disabled. In that case, OSS will use the rate requested by the program which uses the device, so this section doesn't apply. Exception: envy24(ht) cards have a setting envy24.rate which has a similiar function (see "oss_envy24" manpage). You can follow these steps, but at step 2, change with ossmix the value of "envy24.rate" as well.

Steps to affect the change:

  1. First, make sure your card is able to use the new rate. Run "ossinfo -v2" and see if the wanted rate is in the "Native sample rates" output.
  2. As root, run "/usr/lib/oss/scripts/killprocs.sh". Be aware, this will close any program that currently has an open sound channel (examples being media players, Firefox as of 3.5 if you have xulrunner-oss installed, and the gnome volume control).
  3. After all programs occupying vmix are terminated, run as root: "vmixctl rate /dev/dsp 96000" replacing the rate with your desired sample rate.
  4. Run "ossmix | grep rate" and check for "vmix0-rate <decimal value> (currently 96000) (Read-only)" to see if you were successful.
  5. Make changes permanent use the soundon.user file to set the rate for every soundon
write "vmixctl rate /dev/dsp 96000" in the file /usr/lib/oss/soundon.user and make it executable.

Changing the Default Sound Output

When running osstest, the first test passes for the first channel, but not for the stereo or right channel, it sounds distorted/hisses. If this is what your sound is like, then it's set to the wrong output.

      *** Scanning sound adapter #-1 ***
      /dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play front
      - Performing audio playback test... 
      <left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> 

The left sounded good, the right and stereo were the distorted ones.

Let the test continue until you get a working output:

      /dev/oss/oss_hdaudio0/spdout0 (audio engine 5): HD Audio play spdif-out 
      - Performing audio playback test... 
      <left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> 

If this passed the test on all left, right and stereo, proceed to next step.

So from here: Changing_the_default_sound_output you get the command to change the default output; change according to what works for you

      sudo ln -sf /dev/oss/oss_hdaudio0/spdout0 /dev/dsp_multich

With 5.1 surround, chose dsp_multichannel; with 2 channel, dsp should work.

Creative Sound Blaster X-Fi Surround 5.1 SB1090 USB

This information is completely from 4front-tech.com ; courtesy of kristian and Maxa. Thanks!!

It's surprising to learn that the external card does not work just because of a missing true return value in the function write_control_value(...) in ossusb_audio.c.

To fix this, a recompile of oss is nessasary, for now.

1. Grab the latest oss from the Arch Repo

http://repos.archlinux.org/wsvn/community/oss/repos/community-x86_64/

2. Extract it

3. cd to the folder, I renamed the folder to oss

4. run makepkg --nobuild

5. cd to src/kernel/drv/oss_usb/ ; edit the ossusb_audio.c ; add a Return 1 ; should look like so and SAVE

  static int
 write_control_value (ossusb_devc * devc, udi_endpoint_handle_t * endpoint,
            int ctl, int l, unsigned int v)
 {
   return 1;

6. cd to src/kernel/setup and edit srcconf_linux.inc, search for -Werror and remove it, otherwise OSS will not compile.

7. do a makepkg --noextract

Now you must install the package with pacman -U ; remove oss first if already installed (pacman -Rd oss)

A simple systray applet

Want a applet to control volume like in GNOME? From here I got a usable one.

Download this script and rename whatever you want, e.g.: ossvolctl. run the following command:

$chmod +x ossvolctl
#cp ossvolctl /usr/bin/ossvolctl

or

#install -Dm755 ossvolctl /usr/bin/ossvolctl

Start ossxmix docked to systray on startup

KDE 4

Create an application launcher file named ossxmix.desktop in you local application launchers directory (~/.local/share/applications/ then enter:

[Desktop Entry]
Name=Open Sound System Mixer
GenericName=Audio Mixer
Exec=ossxmix -b
Icon=audio-card
Categories=Application;GTK;AudioVideo;Player;
Terminal=false
Type=Application
Encoding=UTF-8

To add it to autostart when loading the desktop environment:

System Settings > Advanced tab > Autostart. Then click add program and choose it from the 'Multimedia' list.

Gnome

  • As Root create a file /usr/local/bin/ossxmix_bg with the following content:
#!/bin/bash
exec /usr/bin/ossxmix -b

Goto System > Preferences > Start Up Applications

  • Click Add, Type OSSMIX in Name field and /usr/local/bin/ossxmix_bg in Command field then click Add button.
  • Login and Logout to see the changes.

Record sound output from a program

Suspend and Hibernation

OSS does not automatically support suspend meaning that OSS must be manually stopped prior to suspending or hibernating.

OSS provides soundon and soundoff to enable and disable OSS, although any processes that use sound must be terminated first.

The following script is a rather basic method of automatically unloading OSS prior to suspending and reloading afterwards.

#!/bin/sh
. "${PM_FUNCTIONS}"

suspend_osssound()
{
 /usr/lib/oss/scripts/killprocs.sh
 /usr/sbin/soundoff
}

resume_osssound()
{
 /usr/sbin/soundon
}

case "$1" in
 hibernate|suspend)
 suspend_osssound
	;;
 thaw|resume)
	resume_osssound
	;;
 *) exit $NA
	;;
esac

Save the contents of the script (as root) into Template:Filename and make it executable. Template:Filename

Note: This script is rather basic and will terminate any application directly accessing OSS, save your work prior to suspending/hibernating.

OSS does not support suspending but we don't care or better s2ram works fine without stopping OSS. Just create a nice suspend script to /sbin/suspend and make it executable.

 #!/bin/bash

 if [ [ $EUID -ne 0 ] ]; then
 ## Checking if you are a root or not
   echo "This script must be run as root" 1>&2
   exit 1
 fi

 s2ram -f

 sleep 2

 /etc/rc.d/oss restart 2>/tmp/oss.txt

 if [ $? -gt 0 ]; then
 echo "OSS restart failed check /tmp/oss.txt for advice"
 fi

 exit 0

That's all your apps are fine and suspend works. \o/

Note: If you are using Opera you must kill operapluginwrapper before suspend. To do this add PID=`pidof operapluginwrapper`;kill -9 $PID before s2ram -f.

ALSA emulation

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 doesn't work with all applications. It doesn't 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 libsalsa and cuckoo.

Instructions

  • Install the alsa-plugins package.
# pacman -S alsa-plugins
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
}
Note: If you don't want to use OSS anymore, don't forget to revert changes that you do here in Template:Filename.

Settings for specific driver

If something isn't working, there is a possibility, that there are specific settings for specific driver (this way I have enabled jack-sense on my laptop)

  • Find out which driver is used
# lspci -vnn|grep -i -A 15 audio
00:1e.2 Multimedia audio controller [0401]: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller [8086:266e] (rev 03)
	Subsystem: Hewlett-Packard Company NX6110/NC6120 [103c:099c]
	Flags: bus master, medium devsel, latency 0, IRQ 21
	I/O ports at 2100 [size=256]
	I/O ports at 2200 [size=64]
	Memory at d0581000 (32-bit, non-prefetchable) [size=512]
	Memory at d0582000 (32-bit, non-prefetchable) [size=256]
	Capabilities: <access denied>
	Kernel driver in use: *oss_ich*
	Kernel modules: snd-intel8x0
  • Locate configuration file for device in:
# cd /usr/lib/oss/conf/
  • Try changing defaults. There are only few settings, and they are self explanatory

Setting:

ich_jacksense = 1 

in oss_ich.conf turned on jack-sense on my laptop (now plugged headphones are recognized, and speaker muted).

  • Restart oss for changes take effects.
# sudo /etc/rc.d/oss restart
  • oss_hdaudio.conf has hdaudio_jacksens too. Maybe it will work for you. Unfortunately not for everyone.

Experimental packages

Mercurial repository version

There is a oss-mercurial package in AUR. This package compiles and installs the latest OSS development version direcly from the Mercurial repository.

You can try this package if you want to contribute code to OSS or if only a very recent change in OSS code introduced support to your sound device.

If you want oss to take care of your flash sound (as well as the sound in Adobe-Air applications) you will need to install libflashsupport:

# pacman -S libflashsupport