Proposal: Rationalizing Fedora Audio

David Mohring heretic at ihug.co.nz
Mon Oct 18 11:36:58 UTC 2004


The state of the Linux/Unix application audio subsystems remains a mess
of competing interfaces and audio mixer and networking demons.   

Proposal: Rationalizing Fedora Audio

For Linux alone, there are many applications that still directly use the
OSS interface, and will do so for the foreseeable future. Hacking the
Fedora Core setup is more possible than fixing all the applications.

There are a number of competing audio mixing demons that can be running
by the user at the same time: Esound's esd, KDE's arts, and the
Freedesktop's proposed MAS (   http://www.mediaapplicationserver.net/ ).
The first two demons available on FC3 default to using the
OSS /dev/dsp /dev/audio etc interfaces, competing for use of
the /dev/dsp, hogging the audio output.

Even using the ALSA interface, Fedora defaults to sending/receiving
applications audio direct to the hardware device, hogging the interface.
By default audio output could go to ALSA or better yet a Dmix plug,
where the source and destination could be selected and mixed together. 

It's possible to get OSS, esd, arts and ALSA working together better
with a little configuration... 
http://alsa.opensrc.org/index.php?page=Dmix+Kde+-+arts%2C+ESD+and+SDL+quick+and+dirty+HOWTO
FC3 final, or the next release of Fedora Core/Red Hat after that, should
do something similar in the default setup. 

The default pcm ALSA interface and /dev/dsp should be assigned to a type
dmix. HAL/udev should assign hardware sound devices ALSA hw:X and
OSS /dev/dspX etc ( with X starting at 1 not 0 see below ). By default
the output from first dmix could be piped to the first or owner selected
device.

The user should also be provided with command line and GUI interfaces to
HAL/udev add and remove dmix devices on the fly and select where the
output goes to. The volume for each virtual device should be set at 50%
by default. Virtual mixer interfaces would also be created by default,
and the interface would show up in the gnome-audio-mixer. This would be
great for recording content and  for Multiuser systems.

Future proposal : Multiuser/Mixcasting audio - /dev/dsp like /dev/tty

At the moment LTSP and other remote-X servers use ESD,NAS and in the
future MAS demons to stream audio over the network. If your the only
user assigned to a /dev/dsp it is also sometimes possible to capture the
output to OSS and directed to the sound demon. The major problem with
this is that the first user to log on gain full ownership of the audio
devices, sharing is difficult. 

One solution is to hack the kernel ALSA so that hw:0 and /dev/dsp are
assigned on the fly depending on the UID of the process much the
way /dev/tty is assigned on the fly to the caller process's
current /dev/ttyX. HAL/udev could assign numbered dmix type ALSA devices
to each user and and the sound demon would be free capture the output.

Even for single user systems, you could use "Xnest -query :X" to log in
as a different user and capture all the auto to stream it out or record
it to a demo or audioblog.


-- 
David Mohring <heretic at ihug.co.nz>




More information about the fedora-devel-list mailing list