PASDK-577:Add "proof of concept" code for McASP LLD to setCheckRateX
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / audioStreamInpProcNewIO.c
index 84d525c83631c5869794344ccac9edb3121db9df..041aaf9c8510dc5f04017b7b56183136822b85c7 100644 (file)
@@ -1134,7 +1134,8 @@ Int asitSelectDevices(
     PAF_AST_IoInp *pInp
 )
 {
-    Aud_STATUS status;
+    Int32 status;
+    Aud_STATUS audStatus;
     const PAF_SIO_Params *pInPrms;
     mcaspLLDconfig *pLldCfg;
     mcaspLLDconfig *pReqLldCfg;
@@ -1167,13 +1168,18 @@ Int asitSelectDevices(
         {
             d10Initialized = 0; // indicate no Input selected
             
-            // check McASP LLD control API
-            mcaspControlChan(pInp->hMcaspChan, MCASP_CHAN_RESET, NULL);   // Rx reset channel
-            //mcaspControlChan(pInp->hMcaspChan, MCASP_DEVICE_RESET, NULL); // Reset Tx/Rx channel
+            // Reset channel
+            status = mcaspControlChan(pInp->hMcaspChan, MCASP_CHAN_RESET, NULL);   // Rx reset channel
+            //status = mcaspControlChan(pInp->hMcaspChan, MCASP_DEVICE_RESET, NULL); // Reset Tx/Rx channel
+            if (status != MCASP_COMPLETED)
+            {
+                Log_info0("asitSelectDevices(): McASP channel reset failed!\n");
+                return ASIP_ERR_MCASP_CFG;            
+            }
             
             // Delete McASP LLD channel
             status = mcaspDeleteChan(pInp->hMcaspChan);
-            if (status != Aud_EOK)
+            if (status != MCASP_COMPLETED)
             {
                 Log_info0("asitSelectDevices(): McASP channel deletion failed!\n");
                 return ASIP_ERR_MCASP_CFG;
@@ -1220,8 +1226,8 @@ Int asitSelectDevices(
             {
                 // Create McASP LLD channel
                 mcaspChanHandle = NULL;
-                status = mcasplldChanCreate(pReqLldCfg, &mcaspChanHandle);
-                if (status != Aud_EOK) 
+                audStatus = mcasplldChanCreate(pReqLldCfg, &mcaspChanHandle);
+                if (audStatus != Aud_EOK) 
                 {
                     Log_info0("asitSelectDevices(): McASP channel creation failed!\n");
                     return ASIP_ERR_MCASP_CFG;