Dne 15. 02. 20 v 7:29 Tanu Kaskinen napsal(a):
What's the difference between PlaybackVolume, PlaybackMixerElem and
PlaybackMasterElem? Other than the obvious difference that
PlaybackVolume is used only to configure the volume control, whereas
PlaybackMixerElem and PlaybackMasterElem are used also to configure the
mute control.
At first, I don't really know if someone uses PlaybackVolume/PlaybackSwitch.
It was defined for the direct control interface (not the mixer interface). I
do not think that we should support this.
I defined new PlaybackMixerElem to select the simple mixer element which
controls both volume and switch (mute) in the ALSA API. The master volume
might be also in the chain (thus PlaybackMasterElem) was introduced.
It seems that it might be not enough and I play with an idea to build custom
mixer description to handle the special cases (like several speakers with the
different volume controls connected to the single stereo stream etc.).
To keep things simple, I would probably hide all functionality to
PlaybackMixer/PlaybackMixerElem and CaptureMixer/CaptureMixerElem . The
special mixer name will create the abstract mixer for the applications and
only one simple mixer element control will set the appropriate volume for
the stream (like pulseaudio actually does for the legacy ALSA support - volume
synthetizer). So UCM will describe the mixer for alsa-lib and application will
use only abstract interface to set / get the volume and mute state.
Actually, I am also trying to resolve the description of the speaker
configuration. It may not be only enough to give the PCM device, because we
don't know, if user connected the stereo or surround speakers to the sound
card output for example. I play with an idea to add device variants to UCM,
but the question is, how we can map this to pulseaudio profile/port schematics.
My quick idea is to export those variants via the verbs, so the exported verb
names might look like:
HiFi:Speaker-Stereo
HiFi:Speaker-5.1
Where 'HiFi' is the verb name, 'Speaker' is the device name and 'Stereo' is
the variant name.
If we need to define multiple variants, all may be exported like:
HiFi:Speaker-5.1,Mic-4.0
Also, we can enhance this and store the configuration to a file, thus 'HiFi'
can refer to 'HiFi@Speaker-5.1,Mic-4.0' by default.
I welcome any opinions on this. The goal is to provide the complete abstract
description of the sound hardware for sound servers like pulseaudio. We can
use this abstraction for the command line ALSA applications, too.
Thanks,
Jaroslav
--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel