On Thursday 04 March 2010, Tom Hacohen wrote: > On Thu, Mar 4, 2010 at 12:56 AM, Niels Heyvaert > > <nielsheyva...@hotmail.com>wrote: > > mdbus2 -s org.freesmartphone.odeviced /org/freesmartphone/Device/Audio > > org.freesmartphone.Device.Audio.SaveScenario voip-handset > > > > org.freesmartphone.InvalidParameter: Scenario not available > > voip-handset got renamed to voiphandset. > > I'm not sure it really got renamed or this was the name from the start, but > now those are the names. For more info: > mdbus2 -s org.freesmartphone.odeviced /org/freesmartphone/Device/Audio > org.freesmartphone.Device.Audio.GetAvailableScenarios
That sounds like a bug to me. Why should we be limited to using the names of already existing scenarios? How are we supposed to create a new scenario if we want one? The whole scenario saving thing has been bugging me for a while now. I think the current method is vulnerable to occasional overwrites of the wrong scenario. For example: In a phone call I'm changing the mixer settings. I hit Save at about the same time as the call gets dropped. Did I just save my modified settings to gsmhandset, or did I just overwrite gsmhandset with the settings from stereoout? It depends who got there first, the SaveScenario(gsmhandset) from the mixer, or the scenario change to stereoout from the dropped call. Possible solution: Normally we want to save the current mixer settings to the current scenario. It doesn't actually matter what the current scenario is called, so there is no reason for SaveScenario to take the scenario name as an argument. This gets us out of the problem above because if the change to stereoout happens first then our SaveScenario() just saves the freshly loaded stereoout scenario over itself, unchanged. We lose our changes to gsmhandset, but we don't unexpectedly write over it and break our next phone call. Occasionally we may want to write to a specific scenario, perhaps to create a new one. To cover this we could add SaveNamedScenario( s ) that behaves like the current SaveScenario( s ) but allows saves to scenarios that don't currently exist. Should we just accept the risk of a problem in this rarely used case? _______________________________________________ smartphones-standards mailing list smartphones-standards@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-standards