From Gentoo Wiki
Jump to:navigation Jump to:search

Sndio is a small audio and MIDI framework part of the OpenBSD project and ported to FreeBSD, Linux and NetBSD. It provides a lightweight audio & MIDI server and a fully documented user-space API to access either the server or the hardware directly in a uniform way.



root #emerge --ask media-sound/sndio

USE flags


Several packages are aware of the global sndio USE flag to enable support for sndio. Enabling this USE flag in make.conf will enable support for sndio in these packages.

FILE /etc/portage/make.conf


Sndio should work out of the box on systems with only one audio device, further configuration can be achieved by passing arguments to the sndio daemon.

Configuration via OpenRC

Currently in order to pass arguments to the daemon the OpenRC init script must be edited to allow user opts, this requires appending a command_args variable to the script. Below is an example of what this file should look like after editing.

FILE /etc/init.d/sndiod

Below is an example of passing arguments to the sndio daemon when using OpenRC.

FILE /etc/conf.d/sndiod
SNDIO_OPTS="-r 96000"

Application specific configuration


Mpd requires software mixing for audio volume control when using sndio, this can be enabled by appending the following the audio_output section of the mpd configuration

FILE /etc/mpd.conf
mixer_type "software"

Sndio also requires extra configuration when used with multiple users, as is often the case with mpd {...}

See also