Modified messaging code after code review.
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / audioStreamInpProc.c
index 7645149f80e61ad8e6732759c3289ea01b28da52..4b783ce11a840f6ce0166eb25434a6b8f990c5fe 100644 (file)
@@ -839,7 +839,8 @@ Void taskAsipFxn(
         if(AspMsgSend(ASP_SLAVE_DEC_SOURCE_SELECT, ASP_MASTER_DEC_SOURCE_SELECT_DONE,
                       asipMsgBuf, NULL) != ASP_MSG_NO_ERR)
         {
-            TRACE_VERBOSE0("TaskAsip: error in sending source select message");
+            TRACE_VERBOSE0("TaskAsip: error in sending SOURCE_SELECT message");
+            SW_BREAKPOINT;
         }
         
         // set to unknown so that we can ensure, for IOS purposes, that sourceDecode = NONE
@@ -870,7 +871,12 @@ Void taskAsipFxn(
         Task_setPri(pAsitCfg->taskHandle, Task_getPri(pAsitCfg->taskHandle)+1);
 
         // FL: send dec exit message to slave
-        AspMsgSend(ASP_SLAVE_DEC_EXIT, ASP_MASTER_DEC_EXIT_DONE, NULL, NULL);
+        if( AspMsgSend(ASP_SLAVE_DEC_EXIT, ASP_MASTER_DEC_EXIT_DONE, NULL, NULL)
+            != ASP_MSG_NO_ERR)
+        {
+            TRACE_VERBOSE0("TaskAsip: error in sending DEC_EXIT message");
+            SW_BREAKPOINT;                
+        }
 
     } // End of main processing loop for (;;)
     
@@ -2327,7 +2333,7 @@ PAF_ASIT_decodeInit(
             if(AspMsgSend(ASP_SLAVE_DEC_ACTIVATE, ASP_MASTER_DEC_ACTIVATE_DONE, 
                           decMsgBuf, NULL) != ASP_MSG_NO_ERR)
             {
-                TRACE_TERSE0("decodeInit: error in sending dec activate message ");
+                TRACE_TERSE0("decodeInit: error in sending DEC_ACTIVATE message ");
                 SW_BREAKPOINT; // temporary
                 return -1; // temporary
             }           
@@ -2342,7 +2348,7 @@ PAF_ASIT_decodeInit(
             if(AspMsgSend(ASP_SLAVE_DEC_RESET, ASP_MASTER_DEC_RESET_DONE, 
                           decMsgBuf, decMsgBuf) != ASP_MSG_NO_ERR)
             {
-                TRACE_TERSE0("decodeInit: error in sending dec reset message ");
+                TRACE_TERSE0("decodeInit: error in sending DEC_RESET message ");
                 SW_BREAKPOINT; // temporary
                 return -1; // temporary
             }
@@ -2641,7 +2647,7 @@ PAF_ASIT_decodeInfo(
             if(AspMsgSend(ASP_SLAVE_DEC_INFO, ASP_MASTER_DEC_INFO_DONE, 
                           decMsgBuf, decMsgBuf) != ASP_MSG_NO_ERR)
             {
-                TRACE_TERSE0("decodeInfo: error in sending dec info message ");
+                TRACE_TERSE0("decodeInfo: error in sending DEC_INFO message ");
                 SW_BREAKPOINT; // temporary
                 return -1;     // temporary
             }
@@ -2939,7 +2945,9 @@ PAF_ASIT_decodeDecode(
             if(AspMsgSend(ASP_SLAVE_DEC_DECODE, ASP_MASTER_DEC_DECODE_DONE, 
                           decMsgBuf, decMsgBuf) != ASP_MSG_NO_ERR)
             {
+                TRACE_TERSE0("decodeDecode: error in sending DEC_DECODE message ");
                 SW_BREAKPOINT; // temporary
+                return -1;     // temporary
             }
             else 
             {
@@ -3213,9 +3221,9 @@ PAF_ASIT_decodeComplete(
             if(AspMsgSend(ASP_SLAVE_DEC_DEACTIVATE, ASP_MASTER_DEC_DEACTIVATE_DONE,
                           decMsgBuf, NULL) != ASP_MSG_NO_ERR)
             {
-                TRACE_TERSE0("Decoder message failure.");
-                errno = -1; // temporary
-                return errno;
+                TRACE_TERSE0("decodeComplete: error in sending DEC_DEACTIVATE message.");
+                SW_BREAKPOINT;
+                return -1;
             }
 
 #if 0 // FL: decoder deactivate call, slave