Merge branch 'dev_pasdk_govind' into dev_pasdk_frank
authorFrank Livingston <frank-livingston@ti.com>
Wed, 30 Nov 2016 00:50:01 +0000 (18:50 -0600)
committerFrank Livingston <frank-livingston@ti.com>
Wed, 30 Nov 2016 00:50:01 +0000 (18:50 -0600)
pasdk/paf
pasdk/test_dsp/application/acp_main_cus.c
pasdk/test_dsp/application/itopo/evmk2g/alpha/pa_i13_evmk2g_io_a.h
pasdk/test_dsp/application/itopo/evmk2g/io.c
pasdk/test_dsp/sap/sap_d10.c
psdk_cust/pdk_k2g_1_0_1_0_eng/packages/ti/platform/evmk2g/platform_lib/src/evmc66x_audio_dc_adc.c

index 717abf4e05a78fde91fd9b4d10e64a5a6d01a4cf..55a72dd870fe46ba686ce8d539b136eb02d16fef 160000 (submodule)
--- a/pasdk/paf
+++ b/pasdk/paf
@@ -1 +1 @@
-Subproject commit 717abf4e05a78fde91fd9b4d10e64a5a6d01a4cf
+Subproject commit 55a72dd870fe46ba686ce8d539b136eb02d16fef
index 627ae384370bb6e087af6d248c5a6705ff54110c..806caac5aef3b501c008f16a7b483756d0fe5cc3 100644 (file)
@@ -121,8 +121,8 @@ Void ACP_main_cus ()
 #else // SIMULATE_SIO
         //extern const ACP_Unit cus_sigma50_s[];
 #endif // SIMULATE_SIO
-        //extern const ACP_Unit cus_sigma51_s[];
-        //extern const ACP_Unit cus_sigma52_s[];
+        extern const ACP_Unit cus_sigma51_s[];
+        extern const ACP_Unit cus_sigma52_s[];
         //extern const ACP_Unit cus_sigma53_s[];
         //extern const ACP_Unit cus_sigma54_s[];
         //extern const ACP_Unit cus_sigma55_s[];
@@ -176,8 +176,8 @@ Void ACP_main_cus ()
         shortcut[49] = cus_sigma49_s;
         //shortcut[50] = cus_sigma50_s;
 #endif // SIMULATE_SIO
-        //shortcut[51] = cus_sigma51_s;
-        //shortcut[52] = cus_sigma52_s;
+        shortcut[51] = cus_sigma51_s;
+        shortcut[52] = cus_sigma52_s;
         //shortcut[53] = cus_sigma53_s;
         //shortcut[54] = cus_sigma54_s;
         //shortcut[55] = cus_sigma55_s;
index ef3deddaa0d741d5f9315d95d836eeea18b40f1d..74cf156df0e378d8a0482e8bef3d0c32efc0cab8 100644 (file)
@@ -106,21 +106,29 @@ All rights reserved.
 #define  execPAIOutNone                 0xf130
 #define  execPAIOutAnalog               0xf131 //8 channel output analog (24bit)
 #define  execPAIOutAnalogSlave          0xf132 //8 channel output analog (24bit)
+#define  execPAIOutAnalog12Ch           0xf133 //12 channel output analog (24bit)
+#define  execPAIOutAnalog16Ch           0xf134 //16 channel output analog (24bit)
 
 // These values reflect the definition of devout[]
 #define DEVOUT_NULL             0
 #define DEVOUT_DAC              1
 #define DEVOUT_DAC_SLAVE        2
-#define DEVOUT_N                3
+#define DEVOUT_DAC_12CH         3
+#define DEVOUT_DAC_16CH         4
+#define DEVOUT_N                5
 
 
 #define wroteOBSioCommandNone                0xca00+STD_BETA_OB,0x0500+DEVOUT_NULL
 #define wroteOBSioCommandAnalog              0xca00+STD_BETA_OB,0x0500+DEVOUT_DAC
 #define wroteOBSioCommandAnalogSlave         0xca00+STD_BETA_OB,0x0500+DEVOUT_DAC_SLAVE
+#define wroteOBSioCommandAnalog12Ch          0xca00+STD_BETA_OB,0x0500+DEVOUT_DAC_12CH
+#define wroteOBSioCommandAnalog16Ch          0xca00+STD_BETA_OB,0x0500+DEVOUT_DAC_16CH
 
 #define wroteOBSioSelectNone                 0xca00+STD_BETA_OB,0x0580+DEVOUT_NULL
 #define wroteOBSioSelectAnalog               0xca00+STD_BETA_OB,0x0580+DEVOUT_DAC
 #define wroteOBSioSelectAnalogSlave          0xca00+STD_BETA_OB,0x0580+DEVOUT_DAC_SLAVE
+#define wroteOBSioSelectAnalog12Ch           0xca00+STD_BETA_OB,0x0580+DEVOUT_DAC_12CH
+#define wroteOBSioSelectAnalog16Ch           0xca00+STD_BETA_OB,0x0580+DEVOUT_DAC_16CH
 // -----------------------------------------------------------------------------
 
 #endif // _PAI_EVMK2G_IO_A_H_
index 9e6f82a94f6110022f207b675696cb3a381de615..e36a164e378451577c65df9ea5a8ef39f52cefad 100644 (file)
@@ -453,6 +453,8 @@ const struct
         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
 };
 
 #else // SIMULATE_SIO
@@ -600,4 +602,39 @@ const ACP_Unit cus_sigma50_s[] = {
     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), \
+    0xcdf0,execPAIOutAnalog12Ch
+
+#pragma DATA_SECTION(cus_sigma51_s0, ".none")
+const ACP_Unit cus_sigma51_s0[] = {
+    0xc900 + 0 - 1,
+    CUS_SIGMA51_S,
+};
+
+const ACP_Unit cus_sigma51_s[] = {
+    0xc900 + sizeof (cus_sigma51_s0) / 2 - 1,
+    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), \
+    0xcdf0,execPAIOutAnalog16Ch
+
+#pragma DATA_SECTION(cus_sigma52_s0, ".none")
+const ACP_Unit cus_sigma52_s0[] = {
+    0xc900 + 0 - 1,
+    CUS_SIGMA52_S,
+};
+
+const ACP_Unit cus_sigma52_s[] = {
+    0xc900 + sizeof (cus_sigma52_s0) / 2 - 1,
+    CUS_SIGMA52_S,
+};
 // EOF
index 3b2034b09641eca1f0d88894a5923a04afe50a93..395c4ae1b57b971a54dccabc85e793b2e43782ae 100644 (file)
@@ -318,7 +318,7 @@ static const MCASP_ConfigXmt txConfigDAC =
         MCASP_AFSXCTL_XMOD_OF(2),
         MCASP_AFSXCTL_FXWID_WORD,
         MCASP_AFSXCTL_FSXM_INTERNAL,
-        MCASP_AFSXCTL_FSXP_ACTIVEHIGH),
+               MCASP_AFSXCTL_FSXP_ACTIVELOW),
     MCASP_ACLKXCTL_RMK(
         MCASP_ACLKXCTL_CLKXP_FALLING,
         MCASP_ACLKXCTL_ASYNC_ASYNC,
@@ -348,7 +348,7 @@ static const MCASP_ConfigXmt txConfigDACSlave =
         MCASP_AFSXCTL_XMOD_OF(2),
         MCASP_AFSXCTL_FXWID_WORD,
         MCASP_AFSXCTL_FSXM_INTERNAL,
-        MCASP_AFSXCTL_FSXP_ACTIVEHIGH),
+               MCASP_AFSXCTL_FSXP_ACTIVELOW),
     MCASP_ACLKXCTL_RMK(
         MCASP_ACLKXCTL_CLKXP_FALLING,
         MCASP_ACLKXCTL_ASYNC_ASYNC,
@@ -634,6 +634,34 @@ const SAP_D10_Tx_Params SAP_D10_TX_STEREO_DAC_SLAVE =
     0,0,0                                       // unused[3]
 };
 
+const SAP_D10_Tx_Params SAP_D10_TX_DAC_12CH =
+{
+    sizeof (SAP_D10_Tx_Params),                 // size
+    "SAP",                                      // name
+    MCASP_DEV0,                                 // moduleNum --> mcasp #
+    (Void *)&txConfigDAC,                       // pConfig
+    4,                                          // wordSize (in bytes)
+    24,                                         // precision (in bits)
+    D10_sapControl,                             // control
+    0x1600003F,                                 // pinMask
+    0,                                          // mode
+    0,0,0                                       // unused[3]
+};
+
+const SAP_D10_Tx_Params SAP_D10_TX_DAC_16CH =
+{
+    sizeof (SAP_D10_Tx_Params),                 // size
+    "SAP",                                      // name
+    MCASP_DEV0,                                 // moduleNum --> mcasp #
+    (Void *)&txConfigDAC,                       // pConfig
+    4,                                          // wordSize (in bytes)
+    24,                                         // precision (in bits)
+    D10_sapControl,                             // control
+    0x160000FF,                                 // pinMask
+    0,                                          // mode
+    0,0,0                                       // unused[3]
+};
+
 
 // -----------------------------------------------------------------------------
 // One time initialization of the DA10x audio hardware.
index 5e8e1b0195dd316cdf86d77178c3952eb88de873..098c8b909812f307ea3b2cffd1feddc14c267743 100644 (file)
  **/
 static const AdcRegDefConfig Pcm186xReg[] = {
        {0x00, 0x00}, /** ================ Changing to Page 0 ================ */
-       {0x01, 0x00}, /** PGA CH1_L to 0dB */
-       {0x02, 0x00}, /** PGA CH1_R to 0dB */
-       {0x03, 0x00}, /** PGA CH2_L to 0dB */
-       {0x04, 0x00}, /** PGA CH2_R to 0dB */
+       {0x01, 0xE8}, /** PGA CH1_L to -12dB */
+       {0x02, 0xE8}, /** PGA CH1_R to -12dB */
+       {0x03, 0xE8}, /** PGA CH2_L to -12dB */
+       {0x04, 0xE8}, /** PGA CH2_R to -12dB */
        {0x05, 0x86}, /** SMOOTH : Smooth change,LINK : Independent control
                                  DPGA_CLIP_EN : Disable,MAX_ATT : -3dB,START_ATT : 10,
                                  AGC_EN : Disable */