[openfirmware] [commit] r3555 - cpu/x86/pc/olpc
repository service
svn at openfirmware.info
Thu Feb 14 06:01:19 CET 2013
Author: quozl
Date: Thu Feb 14 06:01:19 2013
New Revision: 3555
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3555
Log:
OLPC - startup sound. Avoid searching jffs2 filesystem on XO-1 because mounting it takes a long time. Avoid checking for file existence; just try and if we fail, fallback to the built-in sound. Avoids one microSD or eMMC power cycle from boot on XO-1.5, XO-1.75, and XO-4 when the startup sound is present.
Modified:
cpu/x86/pc/olpc/sound.fth
Modified: cpu/x86/pc/olpc/sound.fth
==============================================================================
--- cpu/x86/pc/olpc/sound.fth Thu Feb 14 05:37:52 2013 (r3554)
+++ cpu/x86/pc/olpc/sound.fth Thu Feb 14 06:01:19 2013 (r3555)
@@ -28,13 +28,20 @@
: softer ( -- ) -2 +volume ;
: louder ( -- ) 2 +volume ;
-" int:\boot\jingle.wav" d# 128 config-string jingle
-: sound-name$ ( -- adr len )
- jingle $file-exists? if
- jingle
- else
- " rom:splash"
- then
+: sound-int? ( -- error? )
+ " int:\boot\jingle.wav" ['] $play-wav catch dup if nip nip then
+;
+
+: sound-rom? ( -- error? )
+ " rom:splash" ['] $play-wav catch dup if nip nip then
+;
+
+: (sound)
+ [ifdef] jffs2-support
+ sound-rom? drop \ jffs2 is very slow to mount
+ [else]
+ sound-int? if sound-rom? drop then
+ [then]
;
: sound ( -- )
@@ -42,7 +49,7 @@
playback-volume >r get-saved-volume to playback-volume
['] load-started behavior >r
['] noop to load-started
- sound-name$ ['] $play-wav catch if 2drop then
+ (sound)
r> to load-started
r> to playback-volume
;
More information about the openfirmware
mailing list