[openfirmware] r1290 - dev/hdaudio
svn at openfirmware.info
svn at openfirmware.info
Sun Aug 9 06:00:58 CEST 2009
Author: wmb
Date: 2009-08-09 06:00:58 +0200 (Sun, 09 Aug 2009)
New Revision: 1290
Modified:
dev/hdaudio/conexant.fth
dev/hdaudio/core.fth
Log:
HD Audio selftest improvements from Luke Gorrie.
Modified: dev/hdaudio/conexant.fth
===================================================================
--- dev/hdaudio/conexant.fth 2009-08-09 03:38:09 UTC (rev 1289)
+++ dev/hdaudio/conexant.fth 2009-08-09 04:00:58 UTC (rev 1290)
@@ -27,6 +27,7 @@
: pin-sense? ( -- ? ) h# f0900 cmd? h# 8000.0000 and 0<> ;
: set-connection ( n -- ) h# 70100 or cmd ;
: enable-hp-input ( -- ) h# 70721 cmd ;
+: disable-hp-input ( -- ) h# 70700 cmd ;
: cx2058x-enable-recording ( -- )
mic-in to node pin-sense? if
@@ -36,7 +37,10 @@
then
;
-: cx2058x-disable-recording ( -- ) ;
+: cx2058x-disable-recording ( -- )
+ mic-in to node disable-hp-input
+ mic to node disable-hp-input
+;
: cx2058x-enable-playback ( -- )
h# 10 to node h# 70640 cmd h# 20000 stream-format or cmd
Modified: dev/hdaudio/core.fth
===================================================================
--- dev/hdaudio/core.fth 2009-08-09 03:38:09 UTC (rev 1289)
+++ dev/hdaudio/core.fth 2009-08-09 04:00:58 UTC (rev 1290)
@@ -262,8 +262,7 @@
0 value open-count
: open ( -- flag )
- open-count 0= if init-controller then
- init-codec
+ open-count 0= if init-controller init-codec then
open-count 1+ to open-count
true
;
@@ -429,7 +428,7 @@
: open-out ( -- )
4 to sd#
- 48kHz
+ d# 48.000 set-sample-rate
;
: audio-out ( adr len -- actual )
@@ -456,7 +455,7 @@
;
: write ( adr len -- actual )
- open-out audio-out install-playback-alarm
+ 4 to sd# audio-out install-playback-alarm
;
\ Alarm handle to stop the stream when the content has been played.
@@ -479,7 +478,7 @@
0 value recbuf-phys
d# 65535 value /recbuf
-: open-in ( -- ) 48kHz ;
+: open-in ( -- ) d# 48.000 set-sample-rate ;
: record-stream ( -- )
0 to sd#
More information about the openfirmware
mailing list