]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - pasdk/test_dsp/sap/sap_d10.c
PASDK-258:Merge remote-tracking branch 'origin/dev_pasdk_pp_pasdk258HigherSampleRateS...
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / sap / sap_d10.c
index 7d026c088cb25045415b160c83cff49a816bb2ec..5eb381dd9d54cb0f037cabd1d5e4ba16d4e9beaa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
-Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
 All rights reserved.
 
 * Redistribution and use in source and binary forms, with or without 
@@ -69,6 +69,9 @@ All rights reserved.
 #include <audio_dc_cfg.h>
 #include "vproccmds_a.h"
 
+#include "dbgBenchmark.h" // PCM high-sampling rate + SRC + CAR benchmarking
+
+
 // -----------------------------------------------------------------------------
 // Local function declarations
 
@@ -849,22 +852,27 @@ static int manageInput (DEV2_Handle device, const SAP_D10_Rx_Params *pParams, PA
 
         pStatusIn->emphasis = PAF_IEC_PREEMPHASIS_NO;
 
+#ifndef ___ENABLE_BENCHMARK_PCMHSR_SRC_CAR_  //TODO: For all the cases it works. 
+        //
+        // Input interface rate hard-coded to 192 kHz to avoid I2C transactions.
+        // Temporary fix works for EC3 and MLP/MAT formats.
+        //
         pStatusIn->lock = 1;
         pStatusIn->nonaudio = PAF_IEC_AUDIOMODE_AUDIO;
         RateHdmi = PAF_SAMPLERATE_192000HZ;
         pStatusIn->sampleRateMeasured = RateTable_hdmi[RateHdmi];
         pStatusIn->sampleRateData = pStatusIn->sampleRateMeasured;
 
-#if 0
+#else // _ENABLE_BENCHMARK_PCMHSR_SRC_CAR_
+        //
+        // Need to update input interface rate by consulting HSR4 over I2C for benchmarking configuration.
+        //
         if(!HDMIGpioGetState())
        {
-               Log_info0("SAP_D10: Entering HMINT!\n");
                clear_hdmi_hmint();
                gHmint_ctr++;
 
-               Log_info0("SAP_D10: Clearing HMINT!\n");
                RateHdmi=read_hdmi_samprate();
-               RateHdmi = PAF_SAMPLERATE_192000HZ;
                        pStatusIn->sampleRateMeasured = RateTable_hdmi[RateHdmi];
                        pStatusIn->sampleRateData = pStatusIn->sampleRateMeasured;
                        PrevSampRate = pStatusIn->sampleRateMeasured;
@@ -913,8 +921,7 @@ static int manageInput (DEV2_Handle device, const SAP_D10_Rx_Params *pParams, PA
                pStatusIn->sampleRateMeasured = PrevSampRate;
                pStatusIn->sampleRateData = pStatusIn->sampleRateMeasured;
        }
-#endif
-
+#endif // _ENABLE_BENCHMARK_PCMHSR_SRC_CAR_
        }
 
     else