[pulseaudio-discuss] module-device-restore: Volume save and restore for all ports?
Tanu Kaskinen
tanuk at iki.fi
Mon Jan 4 21:29:39 PST 2010
ma, 2010-01-04 kello 23:10 +0100, Lennart Poettering kirjoitti:
> On Fri, 01.01.10 05:52, Tanu Kaskinen (tanuk at iki.fi) wrote:
> > - Track port volume and mute individually. That is, whenever the active
> > port is switched, the previous port's volume and mute state should be
> > saved to a database and the new port's volume and mute state should be
> > loaded from the database.
>
> Makes sense.
>
> An easy fix could be to reuse the current m-d-r database but always
> store two entries each time we want to save the device settings: one
> for $SINKNAME and one for $SINKNAME@$PORTNAME or suchlike. And when
> reading from the database we'd first look for $SINKNAME@$PORTNAME in
> the db and fall back to $SINKNAME if we dont find that.
Sounds good.
> > - Don't treat the options as separate ports, but create a new concept
> > for them: port options.
>
> Hmm, should those really be _port_ options? Not _device_ options?
At least the state should be saved per-port. That is, if I select an
option for some port, I possibly (and even probably) don't want to have
the option selected in all the other ports also. When writing the alsa
mixer config files, it may make sense to configure options in the
Mapping section, but even then I suspect that there are sound cards with
options that are not relevant with all ports, so I think we have two
acceptable design options: make the options configurable A) in the path
config only or B) both in the path and the mapping config.
> > - Port options are things that you can switch on and off, or choose from
> > an enumeration.
>
> This dangerously sounds like the complex ALSA mixer which I'd rather
> avoid. Before we approach this, could we get a more complete list of
> options that would be covered with this, in addition to the amplifier
> settings?
I'm not aware of any other sensible options that exist on real hardware.
I mentioned selectable EQ settings earlier, but I've not personally seen
or heard about any sound card actually having such options.
If you can't come up with other options either, maybe it's not worth the
effort to implement the port options just for the amplification switch
(UIs would have to be updated too). I still think that the concept makes
perfect sense, though.
> > Lennart, any comments? Would you accept a patch that made these changes?
>
> Yes, but let's discuss this more first ;-)
Here's something more to discuss: saving stream volumes per physical
output (per sink and per port, that is). I'll make a separate thread.
--
Tanu Kaskinen
More information about the pulseaudio-discuss
mailing list