Hillel:

Note, for reference, this issue is discussed in bugster bug #6606096.

 >> http://thestaticvoid.com/post/2009/11/25/mixer-state-in-opensolaris/
 >
> Nice. Will you propose to integrate it into the distribution?

While the suggested SMF-based approach is an improvement over the
current behavior, I think it does not really work well in a multi-user
environment.

The audio levels should probably be set per-user, and not per-system.
It would seem odd if user A sets the audio levels, shuts down the
system, and then after reboot, user B logs in and finds the audio levels
set to different values than user B had been using when last logged in.
Though the SMF based solution

The GDM-based solution (saving audio values in the GDM PostSession
script and reloading them in the GDM PreSession script) I think works
better.  This approach could work in a per-user fashion by simply saving
the audio settings in the user's $HOME directory in a dot-file.

A downside of the GDM approach is that only works when using GDM.
Console users, for example, would not benefit.  Also, if a user wanted
to use a different display manager or use a xinit script to start their
session, then they would need to re-implement this feature or do
without.

In addition to the settings needing to be saved in a per-user fashion,
they should also be saved in a per-machine and per-device fashion to
work properly since not all devices support the same features.

As I mention above, saving the settings in the user's $HOME directory as
a dot-file takes care of ensuring the settings are saved per-user.
Using a filename like the following would work well to take care of
saving settings in a per-machine and per-device fashion.  Note that
"<devicename>" would be something like "audiohd:0" if
"/dev/sound/audiohd:0" were being used.

   $HOME/.mixerctl/<machinename>-<devicename>

After discussion with Garrett D'Amore, Nathen Bush, and Glen Faden (who
work in the OSS and device allocation areas), there seems to be some
consensus that it would be most sensible to manage this in the Device
Allocation framework by adding hooks to save and set the audio settings
when audio devices are allocated and deallocated.  The advantage of this
approach is that audio settings would be set nicely in a per-user
fashion in a seemless way that is independent of using a particular
display manager (e.g. GDM).

However, I think the people who work on device allocation are busy
working on more important things, and this sort of work is fairly low
on their radar.  So, it might make sense to go with the GDM-based
solution as a workaround until it can be fixed the "right way".

I was hoping to get the GDM workaround integrated in the upcoming
OpenSolaris release, but I have been very busy getting the new GDM 2.28
rewrite ready for integration and have had little time to focus on this
particular problem.  It could likely get done in the next release if it
does not get fixed in the Device Allocation layer first.

Or, if people have any other suggestions to consider, I am all ears.

Brian

cc:ing Garrett and Nathan since I am talking about them.  :)

Reply via email to