Changeset 3555


Ignore:
Timestamp:
Feb 14, 2013, 5:01:19 AM (3 years ago)
Author:
quozl
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/x86/pc/olpc/sound.fth

    r3510 r3555  
    2929: louder  ( -- )   2 +volume  ;
    3030
    31 " int:\boot\jingle.wav"  d# 128 config-string jingle
    32 : sound-name$  ( -- adr len )
    33    jingle $file-exists?  if
    34       jingle
    35    else
    36       " rom:splash"
    37    then
     31: sound-int?  ( -- error? )
     32   " int:\boot\jingle.wav" ['] $play-wav catch  dup if nip nip then
     33;
     34
     35: sound-rom?  ( -- error? )
     36   " rom:splash" ['] $play-wav catch  dup if nip nip then
     37;
     38
     39: (sound)
     40   [ifdef] jffs2-support
     41   sound-rom?  drop  \ jffs2 is very slow to mount
     42   [else]
     43   sound-int?  if  sound-rom?  drop  then
     44   [then]
    3845;
    3946
     
    4350   ['] load-started behavior  >r
    4451   ['] noop to load-started
    45    sound-name$ ['] $play-wav catch  if  2drop  then
     52   (sound)
    4653   r> to load-started
    4754   r> to playback-volume
Note: See TracChangeset for help on using the changeset viewer.