Managing alsa scenarios and possible issues
Nicola Mfb
nicola.mfb at gmail.com
Wed Jul 14 15:14:43 CEST 2010
Hi!
What's the best pattern to write a simple mixer application capable of
persisting values in alsa scenarios in a reliable way?
There is a "SaveScenario" dbus call but it seems to be not safe, I'm
not sure if what I'm saying here is right, please correct me if I'm
wrong or I'm missing somethings.
Consider the following case:
* an incoming call arrives, scenario is stereoout, the phone rings
* the user answers, scenario is now gsmhandset
* during the call the user adjusts volumes multiple times and the
mixer app saves the gsmhandset scenario automatically or manually (a
save button) by calling SaveScenario(gsmhandset)
if for some reason the scenario switches to stereoout again (for
example because by design when a call ends the stereoout one is
restored), we have a race condition, and may happen that the
gsmhandset scenario will contain values from the stereoout one, with
the immediate consequence that on the next call there will be no sound
from/to GSM.
Finally a couple of "issues":
* when switching audio scenarios the displays turns on (is this a bug
or a feature?)
* the "Scenario" signal is not emitted, so apps have to poll
periodically to be sure some other ones did not switched the current
scenario, as the method is documented, is that going to be
fixed/implemented?
Regards
Niko
More information about the Smartphones-userland
mailing list