PASDK-218: Fixed a bug involving insufficient num of spare EDMA params used by the...
authorGovind Jeyaram <govind.j@ti.com>
Thu, 20 Jul 2017 20:39:56 +0000 (13:39 -0700)
committerGovind Jeyaram <govind.j@ti.com>
Thu, 20 Jul 2017 20:39:56 +0000 (13:39 -0700)
pasdk/test_dsp/sap/sap.c
pasdk/test_dsp/sap/sap.h

index 08f09681619c64a01bacdcf1b91de88188309341..862494d54ed62c3132f2892fd8b94f73d6c96f4c 100644 (file)
@@ -66,6 +66,7 @@ All rights reserved.
 #include <ti/csl/cslr_device.h>
 
 #define EDMA_HINV NULL
+#define EDMA_NUM_PARAMS 6
 
 #include "sap_mcasp.h"
 #include <pafsio.h>
@@ -973,7 +974,8 @@ Int SAP_open (DEV2_Handle device, String name)
     pDevExt->firstTCC = 0;
     pDevExt->optLevel = 0;
     pDevExt->numParamSetup = 0;
-    pDevExt->numEdmaParams = 4;
+    pDevExt->numEdmaParams = EDMA_NUM_PARAMS;          // We need more than 4 spare params to handle the immediate transition from Unknown
+                                                                                               // to a Known program. Cheap resource to spend.
 
     // use dev match to fetch function table pointer for SAP
     DEV2_match(SAP_NAME, &entry);
index 8f14f423820088d9e34e16d926564f82055f28f0..65c51e66bd9295f80c944b8cc208aae5ba4dfcdc 100644 (file)
@@ -235,13 +235,13 @@ typedef struct SAP_DeviceExtension
     Uint16  numSers;
     Uint16  numSlots;
 
-    Void  *pPortExt; // unused for now
-    Void  *pDmaExt;
+    Void  *pPortExt; //unused - remove me
+    Void  *pDmaExt; //unused - remove me
 
     SAP_EDMA_Param    edmaParams[MAX_EDMA_PARAM_ENTRIES];
 
-    Int    optLevel;
-    Int    numParamSetup;
+    Int    optLevel;   //unused - remove me
+    Int    numParamSetup;      //unused - remove me
 
 } SAP_DeviceExtension;