PASDK-576:Update IO shortcuts
authorFrank Livingston <frank-livingston@ti.com>
Thu, 3 May 2018 16:00:30 +0000 (11:00 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Thu, 3 May 2018 16:00:30 +0000 (11:00 -0500)
Update Output shortcuts to respond only when requested SIO select update
is observed (or timeout).
change all compile-time at-boot shortcuts so Input shortcut is invoked
before Output shortcut (Output has dependency on Input selection /
initialization).

pasdk/paf
pasdk/test_dsp/application/itopo/evmk2g/atboot.c
pasdk/test_dsp/application/itopo/evmk2g/io.c
pasdk/test_dsp/application/itopo/evmk2g/mcasp_cfg.c

index 587437b7b2bbd6c98a286f266cbb9dac9f19b5fd..a9e416fc03127930c18b4e27fa0b87a54cd926ec 160000 (submodule)
--- a/pasdk/paf
+++ b/pasdk/paf
@@ -1 +1 @@
-Subproject commit 587437b7b2bbd6c98a286f266cbb9dac9f19b5fd
+Subproject commit a9e416fc03127930c18b4e27fa0b87a54cd926ec
index b20d170c3cccef8db5b2d9b88b604d3b72ce46b5..3140c4bdddd33354df7c0c15ad7a3ef6de008ca7 100644 (file)
@@ -55,14 +55,14 @@ All rights reserved.
 #ifdef DTS_ATBOOT_CFG    
 //DTS_ATBOOT_CFG
 #define CUS_ATBOOT_S \
-       writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
-       writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
-       writeVOLControlMasterN(0), \
-       writeVOLOffsetMasterN(0x7fff), \
-       writeSYSRecreationModeDirect, \
-       writeSYSChannelConfigurationRequestSurround4_1, \
-       execPAIOutAnalog, \
-       execPAIInHDMIStereo
+    writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+    writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+    writeVOLControlMasterN(0), \
+    writeVOLOffsetMasterN(0x7fff), \
+    writeSYSRecreationModeDirect, \
+    writeSYSChannelConfigurationRequestSurround4_1, \
+    execPAIInHDMIStereo, \
+    execPAIOutAnalog
 #else 
 //Not DTS_ATBOOT_CFG
 
@@ -85,8 +85,8 @@ All rights reserved.
     writeVOLOffsetMasterN(0x7fff), \
     writeSYSRecreationModeDirect, \
     writeSYSChannelConfigurationRequestSurround4_1, \
-    execPAIOutAnalog, \
-    execPAIInHDMI
+    execPAIInHDMI, \
+    execPAIOutAnalog
 #else
 // Performing PCM high-sampling rate + SRC + CAR benchmarking
 // 4XI2S HDMI input for multi-ch PCM
@@ -97,8 +97,8 @@ All rights reserved.
     writeVOLOffsetMasterN(0x7fff), \
     writeSYSRecreationModeDirect, \
     writeSYSChannelConfigurationRequestSurround4_1, \
-    execPAIOutAnalog, \
     execPAIInHDMI, \
+    execPAIOutAnalog, \
     writeSRCModeDisable, \
     writeCARModeDisable
 #endif    
@@ -115,8 +115,8 @@ All rights reserved.
     writeVOLOffsetMasterN(0x7fff), \
     writeSYSRecreationModeDirect, \
     writeSYSChannelConfigurationRequestSurround4_1, \
-    execPAIOutAnalog, \
-    execPAIInHDMIStereo
+    execPAIInHDMIStereo, \
+    execPAIOutAnalog
     
 #endif // DDP_ATBOOT_CFG
 #endif // NOT DTS_ATBOOT_CFG
index efc4046a0698ca3da96fbb0517b495cf3eb0c43a..9521ced329c2cd302c01191d0889774bcbce327f 100644 (file)
@@ -81,19 +81,19 @@ const struct
     DEVINP_N,
         // These values reflect the definitions DEVINP_* in pa*io_a.h:
         NULL,                                               // InNone
-               (const PAF_SIO_Params *) &SAP_D10_RX_HDMI_STEREO,    // InHDMIStereo
-               (const PAF_SIO_Params *) &SAP_D10_RX_HDMI,          // InHDMI
-               (const PAF_SIO_Params *) &SAP_D10_RX_DIR,           // InDigital
-               (const PAF_SIO_Params *) &SAP_D10_RX_ADC_44100HZ,   // InAnalog
+        (const PAF_SIO_Params *) &SAP_D10_RX_HDMI_STEREO,   // InHDMIStereo
+        (const PAF_SIO_Params *) &SAP_D10_RX_HDMI,          // InHDMI
+        (const PAF_SIO_Params *) &SAP_D10_RX_DIR,           // InDigital
+        (const PAF_SIO_Params *) &SAP_D10_RX_ADC_44100HZ,   // InAnalog
 };
 
 
 // .............................................................................
 // execPAIInNone
 #define CUS_SIGMA32_S \
-       writeDECSourceSelectNone, \
-       writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
-       wroteDECSourceProgramUnknown, \
+    writeDECSourceSelectNone, \
+    writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
+    wroteDECSourceProgramUnknown, \
     writeIBSampleRateOverrideUnknown, \
     writeIBSioSelectN(DEVINP_NULL), \
     0xcdf0,execPAIInNone
@@ -113,14 +113,14 @@ const ACP_Unit cus_sigma32_s[] = {
 #define CUS_SIGMA33_S \
     writeDECSourceSelectNone, \
     writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
-       writePCMChannelConfigurationProgramStereoUnknown, \
+    writePCMChannelConfigurationProgramStereoUnknown, \
     writePCMScaleVolumeN(0), \
     writeDECChannelMapFrom2(0,1), \
     writeIBUnknownTimeoutN(8*1024), \
     writeIBScanAtHighSampleRateModeEnable, \
     writeIBEmphasisOverrideNo, \
     writeIBPrecisionOverride24, \
-       writeIBSampleRateOverrideStandard, \
+    writeIBSampleRateOverrideStandard, \
     writeIBSioSelectN(DEVINP_HDMI_STEREO), \
     wroteDECSourceProgramUnknown, \
     writeDECSourceSelectAuto, \
@@ -168,7 +168,7 @@ const ACP_Unit cus_sigma34_s[] = {
 
 // execPAIInDigital
 #define CUS_SIGMA35_S \
-  writeDECSourceSelectNone, \
+    writeDECSourceSelectNone, \
     writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
     writeIBUnknownTimeoutN(2*2048), \
     writeIBScanAtHighSampleRateModeDisable, \
@@ -235,9 +235,9 @@ const struct
         // These values reflect the definitions DEVOUT_* in pa*io_a.h:
         NULL,                                               // OutNone
         (const PAF_SIO_Params *) &SAP_D10_TX_DAC,           // OutAnalog
-               (const PAF_SIO_Params *) &SAP_D10_TX_DAC_SLAVE,           // OutAnalogSlave
-               (const PAF_SIO_Params *) &SAP_D10_TX_DAC_12CH,           // OutAnalog_12ch
-               (const PAF_SIO_Params *) &SAP_D10_TX_DAC_16CH,           // OutAnalog_16ch
+        (const PAF_SIO_Params *) &SAP_D10_TX_DAC_SLAVE,     // OutAnalogSlave
+        (const PAF_SIO_Params *) &SAP_D10_TX_DAC_12CH,      // OutAnalog_12ch
+        (const PAF_SIO_Params *) &SAP_D10_TX_DAC_16CH,      // OutAnalog_16ch
 };
 
 
@@ -262,9 +262,10 @@ const ACP_Unit cus_sigma48_s[] = {
 // .............................................................................
 // execPAIOutAnalog
 #define CUS_SIGMA49_S \
-       writeOBSioSelectN(DEVOUT_DAC), \
-       writeENCChannelMapTo16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
-       0xcdf0,execPAIOutAnalog
+    writeOBSioSelectN(DEVOUT_DAC), \
+    writeENCChannelMapTo16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
+    writePA3Await(rb32OBSioSelect,ob32OBSioSelect(DEVOUT_DAC)), \
+    0xcdf0,execPAIOutAnalog
 
 #pragma DATA_SECTION(cus_sigma49_s0, ".none")
 const ACP_Unit cus_sigma49_s0[] = {
@@ -281,7 +282,8 @@ const ACP_Unit cus_sigma49_s[] = {
 // execPAIOutAnalogSlave
 #define CUS_SIGMA50_S \
     writeOBSioSelectN(DEVOUT_DAC_SLAVE), \
-       writeENCChannelMapTo16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
+    writeENCChannelMapTo16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
+    writePA3Await(rb32OBSioSelect,ob32OBSioSelect(DEVOUT_DAC_SLAVE)), \
     0xcdf0,execPAIOutAnalogSlave
 
 #pragma DATA_SECTION(cus_sigma50_s0, ".none")
@@ -299,7 +301,8 @@ const ACP_Unit cus_sigma50_s[] = {
 // execPAIOutAnalog12Ch
 #define CUS_SIGMA51_S \
     writeOBSioSelectN(DEVOUT_DAC_12CH), \
-       writeENCChannelMapTo16(0,6,1,7,2,8,3,9,4,10,5,11,-3,-3,-3,-3), \
+    writeENCChannelMapTo16(0,6,1,7,2,8,3,9,4,10,5,11,-3,-3,-3,-3), \
+    writePA3Await(rb32OBSioSelect,ob32OBSioSelect(DEVOUT_DAC_12CH)), \
     0xcdf0,execPAIOutAnalog12Ch
 
 #pragma DATA_SECTION(cus_sigma51_s0, ".none")
@@ -317,7 +320,8 @@ const ACP_Unit cus_sigma51_s[] = {
 // execPAIOutAnalog16Ch
 #define CUS_SIGMA52_S \
     writeOBSioSelectN(DEVOUT_DAC_16CH), \
-       writeENCChannelMapTo16(0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15), \
+    writeENCChannelMapTo16(0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15), \
+    writePA3Await(rb32OBSioSelect,ob32OBSioSelect(DEVOUT_DAC_16CH)), \
     0xcdf0,execPAIOutAnalog16Ch
 
 #pragma DATA_SECTION(cus_sigma52_s0, ".none")
index ba664ce9f2d6aa4f8d9376eb5d685f879403eb98..481cc7221666ae66505d0c164956cca5ee6f7cad 100644 (file)
@@ -143,8 +143,8 @@ Mcasp_HwSetupData mcaspXmtSetupDAC = {
         /* .xstat    = */ 0x000001FF, /* reset any existing status bits       */
         /* .xevtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */
         {
-             /* .aclkxctl  = */ 0X000000E1,  // Transmit bit clock divide ratio = 2 --> works for 48khz PCM but not for DDP
-//             /* .aclkxctl  = */ 0X000000E7,  // Transmit bit clock divide ratio = 8 --> working for DDP/MAT/THD 48khz but not for PCM
+//             /* .aclkxctl  = */ 0X000000E1,  // Transmit bit clock divide ratio = 2 --> works for 48khz PCM but not for DDP
+             /* .aclkxctl  = */ 0X000000E7,  // Transmit bit clock divide ratio = 8 --> working for DDP/MAT/THD 48khz but not for PCM
 //             /* .aclkxctl  = */ 0X000000E3,  // Transmit bit clock divide ratio = 4 --> THD 96khz
 //             /* .aclkxctl  = */ 0X000000E1,  // Transmit bit clock divide ratio = 2 --> THD 192khz
              /* .ahclkxctl = */ 0x00004000,