PASDK-218: Added #pragma directive to isolate the error-transfer NULL buffer to an...
authorGovind Jeyaram <govind.j@ti.com>
Wed, 26 Jul 2017 05:21:16 +0000 (22:21 -0700)
committerGovind Jeyaram <govind.j@ti.com>
Wed, 26 Jul 2017 05:21:16 +0000 (22:21 -0700)
pasdk/test_dsp/sap/sap.c

index 862494d54ed62c3132f2892fd8b94f73d6c96f4c..899fb976ecf538897d86909ab6ef003c66c7c081 100644 (file)
@@ -98,6 +98,7 @@ void swapHdmi(Ptr, int);
 
 #define SAP_UNDER_LEN 8
 
+#pragma DATA_SECTION(sap_UNDER, ".sap_UNDER");
 int sap_UNDER[SAP_UNDER_LEN]; // used for underrun
 int sap_OVER_1LANE = 0;     // used for overrun
 int sap_OVER_4LANE[4] = {0,0,0,0};      // used for overrun
@@ -607,7 +608,8 @@ Int SAP_idle (DEV2_Handle device, Bool flush)
    if (pDevExt->activeEdma != EDMA_HINV)
           EDMA3_DRV_disableTransfer (hEdma, pDevExt->activeEdma, EDMA3_DRV_TRIG_MODE_EVENT);
 
-    pDevExt->numQueued = 0;
+   Log_info0("SAP_idle:Before pDevExt->numQueued = 0");
+   pDevExt->numQueued = 0;
 
     // signal stopped
     pDevExt->runState = 0;
@@ -703,7 +705,7 @@ Int SAP_issue (DEV2_Handle device)
     XDAS_UInt32 parentEdma;
 
     if (device->mode == DEV2_OUTPUT)
-       Log_info1("SAP_issue for output device with pDevExt->errorState = 0x%x", pDevExt->errorState);
+       Log_info3("SAP_issue for output device with pDevExt->errorState = 0x%x, pDevExt->runState = 0x%x, pDevExt->numQueued = 0x%x", pDevExt->errorState, pDevExt->runState, pDevExt->numQueued);
 
     if ((device->mode == DEV2_OUTPUT) && (pDevExt->errorState >= PAF_SIO_ERROR_ERRBUF_XFER))
     {
@@ -801,7 +803,7 @@ Int SAP_issue (DEV2_Handle device)
         pDevExt->shutDown = 0;
 
         //if (device->mode == DEV2_OUTPUT)
-                       //SAP_EDMA_dumpParams(1);
+                       //SAP_EDMA_dumpParams(5);
 
     // special case enables when not yet started
     if (pDevExt->runState == 0) {
@@ -866,11 +868,11 @@ Int SAP_reclaim (DEV2_Handle device)
 
     //TRACE_GEN((&TR_MOD, "SAP_reclaim.%d (0x%x)", __LINE__, device));
     if (device->mode == DEV2_OUTPUT)
-               Log_info2("SAP_reclaim for output device with pDevExt->errorState = 0x%x & runState: 0x%x", pDevExt->errorState, pDevExt->runState);
+               Log_info3("SAP_reclaim for output device with pDevExt->errorState = 0x%x, runState: 0x%x & pDevExt->numQueued = 0x%x", pDevExt->errorState, pDevExt->runState, pDevExt->numQueued);
     // must be running and  error free 
     if ((!pDevExt->runState) || (pDevExt->errorState))
     {
-        Log_info3("SAP_reclaim.%d, not runState: 0x%x, mode = 0x%x", __LINE__, pDevExt->errorState, device->mode);
+        Log_info3("SAP_reclaim.%d, error-state: 0x%x, mode = 0x%x", __LINE__, pDevExt->errorState, device->mode);
         return SIO2_EBADIO;
     }
 
@@ -1209,7 +1211,9 @@ Int SAP_shutdown (DEV2_Handle device)
     // reset counter
     pDevExt->numQueued = 0;
 
-    //DJDBG_SAP_EDMA_dumpParams(1);
+    Log_info0("SAP_shutdown: After pDevExt->numQueued = 0 ");
+
+    //SAP_EDMA_dumpParams(8);
     // make sure active is linked to error
     EDMA3_DRV_linkChannel (hEdma, pDevExt->activeEdma, pDevExt->errorEdma);