[alsa-devel] ALSA, GStreamer and surround
tiwai at suse.de
Wed Apr 4 18:17:42 CEST 2007
At Fri, 30 Mar 2007 00:32:16 +0200,
Ingo Müller wrote:
> Takashi Iwai schrieb:
> >> So my suggestion so far when we have been discussing this inside the
> >> GStreamer community is to use 'front' as default device instead of
> >> 'default'.
> > A drawback of "front" is that it doesn't include the software mixing
> > feature. (Dito for "surround*" and "spdif") So far, only "default"
> > PCM has a dmix as it is. If gstream is the only sound system, it'd be
> > fine, though.
> >> That way we will always play(downmix) all channels and nobody 'lose'
> >> sound. We can then provide configuration GUI's like Totem do to override
> >> this when people have surround capable systems (meaning both capable
> >> card and connected speakers). Do this sound like a reasonable approach t
> >> you?
> > It sounds reasonable to me.
> > Or, you can simply assume number of channels for each preset, i.e. 2ch
> > = default, 4ch = plug:surround40, 5.1ch = plug:surround51, without
> > querying alsa-lib.
> > Takashi
> I'd prefer the "default" device being the default device - that's why
> it's called like this :-) As the default device is usually a stereo
> device, only stereo sound should be played there. Surround sound should
> be played on surround51, surround40, surround71... depending on how many
> channels the stream has. What these devices do with the sound they
> receive is not the problem of the application, IMO.
I see your point. Actually, other PCM name was proposed at first, but
in the end, it was simply merged to "default" because everyone uses
it. We have "front" for the front 2-channel if it really matters.
A question still remains, however: should these outputs be coped with
dmix? For example, we can set up relatively easily the dmix + plug
version of surround51, too.
One possible problem with plug+dmix'ing surround51 is that this would
result in incompatibility with older configuration, and may break the
apps using the current config. For example, plug over plug can result
in unexpected channel routing. This is rather a bug, but a bit hard
to fix, so far.
> After that, ALSA or the distribution or the system admin should make
> sure, that the surroundX devices handle the sound apropriately. I'm sure
> it is possible to alter the predefined surroundX devices in a way so
> they upmix/downmix to the amount of channels the concerned sound card
> actually has. If one is more experienced, he can still overwrite the
> definitions of these predefined devices according to his suites.
The sound-system management is another missing piece in the whole
picture that ALSA currently has. We have a flexible configuration,
but it alone doesn't suffice. Currently, we're trying to provide a
reasonable "default", which can work for _most_ of users OOTB. But,
this isn't apparently enough nowadays. Now the time to consider...
More information about the Alsa-devel