[gst-devel] ALSA mixer implementation

Leif Johnson leif at ambient.2y.net
Sun Nov 16 12:35:02 CET 2003


Hi folks -

This weekend I copied over the GstOssMixer implementation file and
converted it to the ALSA API ; it was actually pretty easy. (The key is
to ignore the ALSA `documentation' and just look at the header files. :)
So things look pretty good, and yesterday it finally compiled for me
(haven't had a chance to test it yet, however).

In the current mixer interface, there is one function for getting and
one function for setting the volumes on all channels of a mixer track.
This worked fine with the OSS API, but in ALSA there are two types of
volumes, `capture' and `playback'. Does this exist in OSS as well ?

I'm wondering if we should alter the GstMixer API to make the
distinction for playback and capture volumes visible (i.e. have
{get|set}_{play|rec}_volume instead of the current {get|set}_volume) ? I
don't know of any cards that have simultaneous capture and playback in
any given mixer track (e.g. pcm, line in, mic in, line out, etc.) but I
don't know if it's impossible. Without distinct volume controls,
GstMixer interface users won't be able to set a record volume on a track
flagged as playback, and vice versa. But with distinct controls, the
interface becomes a bit less clean.

I'm leaning toward keeping things simple and doing the magic in the ALSA
code. Any comments would be helpful, though.

leif

--
Leif Morgan Johnson : http://ambient.2y.net/leif/




More information about the gstreamer-devel mailing list