Changeset 2303


Ignore:
Timestamp:
Jun 21, 2011, 7:24:45 AM (4 years ago)
Author:
wmb
Message:

OLPC - more tweaking of audio analysis parameter passing, hopefully making both XO-1.5 and XO-1.75 builds work.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/1.75/sound.fth

    r2298 r2303  
    531531d# -13 constant fixture-test-volume
    532532d# -22 constant loopback-test-volume
    533 : configure-platform  ( -- )
    534    board-revision  h# 1a28 >=  if  " configure-xo1.75" $call-analyzer  exit  then
    535 ;
     533
     534create analysis-parameters
     535d# -23 ,   \  0 Sample delay
     536d#  40 ,   \  1 #fixture
     537d#  50 ,   \  2 fixture-threshold
     538d#  60 ,   \  3 case-start-left
     539d#  83 ,   \  4 case-start-right
     540d# 400 ,   \  5 case-start-quiet
     541d#  60 ,   \  6 #case-left
     542d#  30 ,   \  7 #case-right
     543d#  25 ,   \  8 case-threshold-left
     544d#  25 ,   \  9 case-threshold-right
     545d#  20 ,   \ 10 #loopback
     546d#  70 ,   \ 11 loopback-threshold
    536547
    537548fload ${BP}/dev/hdaudio/test.fth
     549
    538550
    539551end-package
  • dev/hdaudio/conexant.fth

    r2298 r2303  
    154154d# -23 constant fixture-test-volume
    155155d# -33 constant loopback-test-volume
    156 : configure-platform  ( -- )  ;
     156
     157create analysis-parameters
     158d#   0 ,   \  0 Sample delay
     159d# 100 ,   \  1 #fixture
     160d#  25 ,   \  2 fixture-threshold
     161d#  60 ,   \  3 case-start-left
     162d#  60 ,   \  4 case-start-right
     163d# 400 ,   \  5 case-start-quiet
     164d#  60 ,   \  6 #case-left
     165d# 190 ,   \  7 #case-right
     166d#  25 ,   \  8 case-threshold-left
     167d#  14 ,   \  9 case-threshold-right
     168d#  20 ,   \ 10 #loopback
     169d#  70 ,   \ 11 loopback-threshold
    157170
    158171\ LICENSE_BEGIN
  • dev/hdaudio/noiseburst.fth

    r2260 r2303  
    343343;
    344344
     3450 value analysis-parameters
     346: set-analysis-parameters  ( adr -- )  to analysis-parameters  ;
     347: param@  ( offset -- value )  analysis-parameters swap na+ @  ;
     348: sample-delay          ( -- value )  d# 0 param@  ;
     349: #fixture              ( -- value )  d# 1 param@  ;
     350: fixture-threshold     ( -- value )  d# 2 param@  ;
     351: case-start-left       ( -- value )  d# 3 param@  ;
     352: case-start-right      ( -- value )  d# 4 param@  ;
     353: case-start-quiet      ( -- value )  d# 5 param@  ;
     354: #case-left            ( -- value )  d# 6 param@  ;
     355: #case-right           ( -- value )  d# 7 param@  ;
     356: case-threshold-left   ( -- value )  d# 8 param@  ;
     357: case-threshold-right  ( -- value )  d# 9 param@  ;
     358: #loopback             ( -- value )  d# 10 param@  ;
     359: loopback-threshold    ( -- value )  d# 11 param@  ;
     360
    345361\ sample-delay accounts for the different timing between adc-on and dac-on
    346362\ for different combinations of codec and controller.
    347363
    348 d# 0 value sample-delay
    349364: +sample-delay  ( start #samples -- end' start' )
    350365   swap  sample-delay +  swap bounds
     
    470485;
    471486
    472 d# 100 value #fixture
    473 d# 25 value fixture-threshold
    474487: fixture-ratio-left  ( -- error? )
    475488   left-range  d#  60 #fixture sm-covar-abs-sum nip  ( sum1 )
     
    484497   fixture-threshold <
    485498;
    486 
    487 d#  60 value case-start-left
    488 d#  60 value case-start-right
    489 d# 400 value case-start-quiet
    490 d#  60 value #case-left
    491 d# 190 value #case-right
    492 d#  25 value case-threshold-left
    493 d#  14 value case-threshold-right
    494499
    495500\ This compares the total energy within the impulse response band to the
     
    508513;
    509514
    510 d# 20 value #loopback
    511 d# 70 value loopback-threshold
    512515\ This compares the total energy within the impulse response band to the
    513516\ total energy in a similar-length band
     
    523526   >ratio
    524527   loopback-threshold <
    525 ;
    526 
    527 \ Ideally we would not put platform-specific information in this module.
    528 \ If we add many more platforms, this should be redesigned.
    529 : configure-xo1.75  ( -- )
    530    d# -23 to sample-delay
    531    d# 50 to fixture-threshold
    532    d# 40 to #fixture
    533    d# 83 to case-start-right
    534    d# 30 to #case-right
    535    d# 25 to case-threshold-right
    536528;
    537529
  • dev/hdaudio/test.fth

    r2298 r2303  
    186186\ Returns failure by throwing
    187187: automatic-test  ( -- )
    188    configure-platform   
     188   analysis-parameters " set-analysis-parameters" $call-analyzer
    189189   disconnect-loopback  \ Not for 1.5; it can test internal while loopback is connected
    190190   " smt-test?" evaluate  if
Note: See TracChangeset for help on using the changeset viewer.