[openfirmware] r1455 - cpu/x86/pc/olpc cpu/x86/pc/olpc/via dev/hdaudio ofw/core
svn at openfirmware.info
svn at openfirmware.info
Tue Nov 3 02:11:16 CET 2009
Author: wmb
Date: 2009-11-03 02:11:15 +0100 (Tue, 03 Nov 2009)
New Revision: 1455
Modified:
cpu/x86/pc/olpc/sound.fth
cpu/x86/pc/olpc/via/fw.bth
dev/hdaudio/core.fth
ofw/core/ofwcore.fth
Log:
OLPC trac 9589 - Fixed several cases where the startup sound would
be left playing instead of automatically turning off after one
play of the sound. At the same time, I prevented the frame key
from interrupting the early startup, which could lead to the display
not working right. The startup sound now stops abruptly when you
go to the ok prompt. That is intentional.
Modified: cpu/x86/pc/olpc/sound.fth
===================================================================
--- cpu/x86/pc/olpc/sound.fth 2009-11-03 01:07:21 UTC (rev 1454)
+++ cpu/x86/pc/olpc/sound.fth 2009-11-03 01:11:15 UTC (rev 1455)
@@ -40,6 +40,9 @@
: sound-end ( -- )
" wait-sound" ['] $call-audio catch if 2drop then
;
+: stop-sound ( -- )
+ " stop-sound" ['] $call-audio catch if 2drop then
+;
\ LICENSE_BEGIN
\ Copyright (c) 2006 FirmWorks
Modified: cpu/x86/pc/olpc/via/fw.bth
===================================================================
--- cpu/x86/pc/olpc/via/fw.bth 2009-11-03 01:07:21 UTC (rev 1454)
+++ cpu/x86/pc/olpc/via/fw.bth 2009-11-03 01:11:15 UTC (rev 1455)
@@ -550,7 +550,6 @@
cursor-off
true to text-on?
-
" //null" open-dev to null-ih \ For text-off state
?gui-banner
@@ -639,6 +638,7 @@
?factory-mode
?factory-boot-sequence
+ disable-user-aborts
console-start
board-revision 0= if
@@ -687,6 +687,8 @@
blue-letters ." Type 'help' for more information." black-letters
cr cr
+ enable-user-aborts
+ stop-sound
quit
;
Modified: dev/hdaudio/core.fth
===================================================================
--- dev/hdaudio/core.fth 2009-11-03 01:07:21 UTC (rev 1454)
+++ dev/hdaudio/core.fth 2009-11-03 01:11:15 UTC (rev 1455)
@@ -450,7 +450,6 @@
;
: write-done ( -- )
- wait-stream-done
stop-stream
free-bdl
release-sound-buffer
@@ -460,12 +459,21 @@
4 to sd# audio-out install-playback-alarm true to playing?
;
+false value stop-lock
+: stop-sound ( -- )
+ true to stop-lock
+ playing? if write-done false to playing? then
+ false to stop-lock
+;
+
\ Alarm handle to stop the stream when the content has been played.
: playback-completed-alarm ( -- )
- sd# ( sd# )
- 4 to sd# ( sd# )
- stream-done? if write-done false to playing? then ( sd# )
- to sd# ( )
+ stop-lock if exit then
+ playing? if
+ sd# 4 to sd# ( sd# )
+ stream-done? if write-done false to playing? then ( sd# )
+ to sd# ( )
+ then
;
' playback-completed-alarm is playback-alarm
Modified: ofw/core/ofwcore.fth
===================================================================
--- ofw/core/ofwcore.fth 2009-11-03 01:07:21 UTC (rev 1454)
+++ ofw/core/ofwcore.fth 2009-11-03 01:11:15 UTC (rev 1455)
@@ -173,9 +173,12 @@
\ From reenter.fth
headerless
nuser aborted? aborted? off
+1 value allow-user-aborts? \ Must be 0/1 instead of false/true because of the incrementing in the low-level handler
+: enable-user-aborts ( -- ) 1 to allow-user-aborts? ;
+: disable-user-aborts ( -- ) 0 to allow-user-aborts? ;
headers
-: user-abort ( -- ) 1 aborted? ! ;
+: user-abort ( -- ) allow-user-aborts? aborted? ! ;
headerless
\ System and version identification
More information about the openfirmware
mailing list