PASDK-218: Fixed a bug involving insufficient num of spare EDMA params used by the...
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / sap / sap.c
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);