RE: sndio in linux with ossv4 instead of alsa

From: Damian Ariel Perticone <>
Date: Sat, 28 Dec 2019 01:55:44 +0000
Hi, i dont have problems with ALSA, what i dont want is pulseaudio, i installed ossv4.2 and got sound in mpv, mpd and wine but i got no sound in firefox i can have sound in firefox just using alsa if i complile firefox without pulseaudio support  , i saw that void linux use sndio and  hyperbola is migrating to bsd and is doing a sndio migration , i thought that it would be great just to have sndio in place of pulseaudio and it would be great if sndio work with ossv4.

what i want is having sound in firefox but using ossv4 instead of alsa, i know that i can use alsa emulation.
there are things i dont understand to have ossv4 working i had to disable sound support in the kernel.
Freebsd oss has less sound cards support than ossv4.
how difficult would be to add support for ossv4?
best regards

ALSA Emulation

  *   There are two main methods to achieve this:

  1.  libasound2's pcm-oss plugin:
     *   Easiest method, but will not work with all programs. It works by making libasound use OSS via the pcm-oss plugin.
     *   First, install the pcm-oss plugin. It is included in the alsa-plugins distribution.
        *   Debian: install libasound2-plugins package.
     *   Make sure an ~/.asoundrc file exists. It should contain the lines below:

    type oss
    device /dev/dsp
    type oss
    device /dev/dsp

  2.  libasound2's pulseaudio plugin:
     *   Another easy method. Again, libasound must be set up to use Pulseaudio (which is done by default with many distros). Then Pulseaudio must be set up to use OSS<>.
  3.  OSSv4 cuckoo module:
     *   Harder, and will fail on most systems. It works by representing OSSv4 drivers as a soundcard to the ALSA modules, and supplying a "driver" for them.
     *   Note that using pcm-oss conflicts with cuckoo - libasound needs to output to ALSA's device files, so rename ~/.asoundrc if you were using pcm-oss before doing this.

Also, nearly all the commands below require root permissions.
        *   First, we need to get the ALSA modules back:
           *   Goto /lib/modules/$(uname -r)/, and extract the sound-preoss.tar.bz2 file.
           *   We need to prune out the OSS emulation modules, since these might conflict with actual OSS, so run "rm -rf kernel/sound/core/oss".
        *   Second, goto /usr/lib/oss/cuckoo, and run "make install".
        *   You can now run "modprobe cuckoo", and test with "speaker-test" etc. whether this works.
        *   To make this stick, we need to edit the startup script, so that it loads cuckoo after loading OSS. Edit $OSSLIBDIR/soundon.user, and add "modprobe cukoo" before "exit 0" line.
     *   A general problem with ALSA emulation is that some programs probe for driver support in the order "ALSA, OSS". So programs that were using OSS by default may now try to use the emulation with possibly inferior results. So if there are problems after installation, make sure the program uses the OSS support if available rather than the emulat

Hyperbola - Todo: sndio migration<>
As sndio follows the same goals as our packaging guidelines in stability and security concerns, we have decided to remove PulseAudio and use sndio as our default provider of sound server.

De: Alexandre Ratchov <>
Enviado: viernes, 27 de diciembre de 2019 15:04
Para: Damian Ariel Perticone <>
Cc: <>
Asunto: Re: sndio in linux with ossv4 instead of alsa

On Thu, Dec 26, 2019 at 10:35:23PM +0000, Damian Ariel Perticone wrote:
> Hi i want to know if sndio can work with ossv4 instead of
> alsa, i use Gentoo linux and i want to make a ebuild of sndio and ossv4, and i
> really would like to use sndio instead of pulseaudio and it would be great if i
> can get sound in firefox with ossv4 + sndio.
> 4Front Technologies - Open Sound System
> Open Sound System is an Open Systems/UNIX audio and MIDI architecture which
> supports off-the-shelf audio hardware.


There's an OSS backend that works on FreeBSD, I don't know if it works
on Linux. I don't think it uses FreeBSD-specific interfaces.

The OSS API has design limitations; for instance programs can obtain a
common block size only if the play and record channel numbers are the
same. Basically this prevents using anything but stereo in
full-duplex. I'd suggest using ALSA instead.

AFAIU, on Linux OSS is emulated on top of ALSA. If this is correct, by
using ALSA you'd avoid this extra software layer, which means less
bloat and less bugs.

Out of curiossity, why do you try to avoid ALSA?

-- Alexandre
Received on Sat Dec 28 2019 - 02:55:44 CET

This archive was generated by hypermail 2.3.0 : Sun Dec 29 2019 - 01:32:51 CET