[yast-commit] r56517 - in /trunk/sound: package/yast2-sound.changes sound/src/routines.ycp
Author: lslezak Date: Tue Mar 31 20:09:02 2009 New Revision: 56517 URL: http://svn.opensuse.org/viewcvs/yast?rev=56517&view=rev Log: - convert Autoyast volume settings to the expected format Modified: trunk/sound/package/yast2-sound.changes trunk/sound/sound/src/routines.ycp Modified: trunk/sound/package/yast2-sound.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/package/yast2-sound.changes?rev=56517&r1=56516&r2=56517&view=diff ============================================================================== --- trunk/sound/package/yast2-sound.changes (original) +++ trunk/sound/package/yast2-sound.changes Tue Mar 31 20:09:02 2009 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Mar 31 20:03:27 CEST 2009 - lslezak@suse.cz + +- convert Autoyast volume settings to the expected format + +------------------------------------------------------------------- Tue Mar 31 19:00:20 CEST 2009 - lslezak@suse.cz - improved logging in alsa-agent when a requested volume Modified: trunk/sound/sound/src/routines.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/sound/src/routines.ycp?rev=56517&r1=56516&r2=56517&view=diff ============================================================================== --- trunk/sound/sound/src/routines.ycp (original) +++ trunk/sound/sound/src/routines.ycp Tue Mar 31 20:09:02 2009 @@ -410,6 +410,37 @@ else return it; }); } + + if (is(vol_settings, list<list<map> >)) + { + y2milestone("AutoYast data detected, converting..."); + /* convert + [ + [ $["mute":false, "name":"Master", "volume":96], ... ] + [ ... ] + ] + to + [ + [ ["PCM", 32, false], ["Master", 100, true]], + [ [....], ..... ] + ] + */ + + list cnv_vol_settings = maplist(list<map> card_setting, (list<list<map> >)vol_settings, + { + return maplist(map channel_config, card_setting, + { + return [ channel_config["name"]:"", channel_config["volume"]:0, channel_config["mute"]:true ]; + } + ); + } + ); + + y2milestone("Volume settings converted: %1 -> %2", vol_settings, cnv_vol_settings); + + vol_settings = cnv_vol_settings; + } + any item = vol_settings [0]:nil; if (is (item, map)) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org