Ecasound Support for Legacy OSS Audio Devices

Ecasound provides native, robust support for the Open Sound System (OSS) architecture through direct device-node interfacing, standardized system calls, and dedicated command-line object types. This article outlines the mechanisms Ecasound uses to communicate with legacy OSS interfaces, detailing device syntax, driver-level control, buffer management, and modern emulation layers.

Native OSS Audio Objects

Ecasound treats audio sources and destinations as abstract objects. For legacy OSS devices, it provides a built-in object format specified as oss. To route audio to or from an OSS device, users define input and output targets using the syntax:

-i oss,/dev/dsp
-o oss,/dev/dsp

If multiple sound cards or non-standard device nodes are present, paths like /dev/dsp1 or /dev/sound/dsp can be specified directly. Ecasound parses this prefix and routes audio streams through its internal OSS driver backend rather than modern ALSA or JACK subsystems.

Direct Driver Communication via IOCTLs

Ecasound interacts directly with OSS kernel drivers through POSIX open(), read(), write(), and ioctl() system calls. When an OSS object is initialized, Ecasound configures the hardware parameters using standard OSS ioctl commands:

Fragment and Buffer Control

Legacy OSS uses a fragment-based buffering model rather than the ring-buffer structures common in modern systems. OSS drivers allocate buffers divided into fragments defined by a power-of-two size and a fragment count.

Ecasound bridges its internal processing buffers with OSS fragments via the SNDCTL_DSP_SETFRAGMENT ioctl. When configuring processing pipelines with the -b (buffer size) parameter, Ecasound calculates and sets the nearest matching fragment configuration. This ensures that real-time multitrack recording and signal processing avoid buffer under-runs (dropouts) while keeping latency deterministic.

OSS Mixer Access

Beyond PCM audio transfer, Ecasound provides an integrated interface for managing hardware levels on OSS devices via /dev/mixer. Through the -ev and related chain operator parameters, or via the interactive Ecasound control mode, it communicates with the OSS mixer using SOUND_MIXER_READ and SOUND_MIXER_WRITE ioctls to manage input gain, master volumes, and recording sources directly.

Compatibility with Modern Emulation Layers

While standard Linux distributions now rely primarily on ALSA or PipeWire, Ecasound's OSS support remains functional on modern systems through emulation: