OSS Audio

Sid sid at bsdmail.com
Fri Dec 15 23:05:47 UTC 2017


> Yuri; Fri Dec 15 20:22:24 UTC 2017
> Jack isn't needed in theory, but OSS drivers for many popular sound 
> devices don't support midi. PCI audio devices generally don't support 
> midi, only USB ones do. So if you want midi, you have to go with 
> soft-midi (ex. Jack+fluidsynth).

> Jack is a very powerful audio server, though a bit buggy.

sndiod covers MIDI hardware, which is installed by audio/sndio
Now I get it, I think she is looking for MIDI, and driver capabilities for physical hardware.

> Freddie Cash; Fri Dec 15 16:22:36 UTC 2017
​> FreeBSD has had the ability to play sounds from multiple programs
> simultaneously since the 4.x days.  Back then, the kernel developed a
> "virtual channels" layer to accommodate this (program X uses /dev/dsp0,
> program Y uses /dev/dsp1, program Z uses /dev/dsp2, audio is mixed and
> played out the speakers together).  Later this was done automatically by
> multiple programs simply accessing /dev/dsp.

This was my misconception. I think what happened is, the frontend/API for many programs from the
portstree got improved this year, when sndio was brought over allowing different programs
to access these drivers at once. It was easier for them to bring make those adjustments,
when it was fixed for that other operating system.

This is a description of sndio on FreeBSD.
https://forums.freebsd.org/threads/62892/#post-363265
https://forums.freebsd.org/threads/43417/#post-368500

>From what I understand is, that OSS and Sndio have their drivers in the /dev/ directory,
and separately have a frontend or API to connect to user programs.
OSS hardware drivers are compiled into the kernel or started as modules.
Sndiod hardware drivers can also be turned on, to be seen in /dev/.

> blubee blubeeme;
> If you want to test for yourself, install audio/oss then run osstest and
> report back.

The program audio/oss is a frontend. FreeBSD by default uses OSS hardware drivers,
as that's what most sound devices in /dev/ are. To use a newer OSS backend/hardware driver,
you'd have to get updated source if available, and recompile your kernel.

It's not that FreeBSD is limiting features, it is more that, OSS is a cluster of complexities,
when it is brought to FreeBSD, it is cleaned up, trimmed, and made efficient for this OS.

Different frontends/API's (ALSA, JACK, PULSEAUDIO, OSS, SNDIO, native APIs) just work together
on top of FreeBSD's native OSS hardware driver.


More information about the freebsd-ports mailing list