[pulseaudio-discuss] [PATCH 3/3] alsa-ucm: Support Playback/CaptureVolume
Arun Raghavan
arun.raghavan at collabora.co.uk
Wed Sep 25 05:44:10 PDT 2013
On Mon, 2013-09-23 at 15:50 -0700, Felipe Tonello wrote:
> Hi Arun,
>
> On Fri, Sep 20, 2013 at 4:57 AM, Arun Raghavan
> <arun.raghavan at collabora.co.uk> wrote:
> > This allows us to support the PlaybackVolume and CaptureVolume commands
> > in UCM, specifying a mixer control to use for hardware volume control.
> >
> > This only works with ports corresponding to single devices at the
> > moment, and doesn't support stacking controls for combination ports.
> >
> > On the UCM side, this also requires that when disabling the device for
> > the port, the volume should be reset to some default.
>
> What do you mean by that?
It's mostly about good practice. We typically reset the mixer controls
touched by EnableSequence in DisableSequence for a device. The
PlaybackVolume is implicitly modified when the device is active, so it
is probably a good idea to reset it (though depending on the specific
hardware, may not be necessary).
> > When enabling/disabling combination devices, things are a bit iffy since
> > we have no way to reset the volume before switching to a combination
> > device. It would be nice to have a combination-transition-sequence
> > command in UCM to handle this and other similar cases.
> > ---
> > src/modules/alsa/alsa-sink.c | 69 +++++++++++++++-----
> > src/modules/alsa/alsa-source.c | 34 ++++++----
> > src/modules/alsa/alsa-ucm.c | 126 ++++++++++++++++++++++++++++++++++--
> > src/modules/alsa/alsa-ucm.h | 19 +++++-
> > src/modules/alsa/module-alsa-card.c | 4 +-
> > 5 files changed, 215 insertions(+), 37 deletions(-)
> >
>
> Are the devices shared between sinks? For instance, is the
> pa_alsa_path freed when the sink is freed? If that happens will cause
> a problem when we change the card profile.
The pa_alsa_path is associated with the port, whose life cycle is tied
to the card and not sinks/sources.
-- Arun
More information about the pulseaudio-discuss
mailing list