Hi,
I have a question about the System_linkControl function.
I call System_linkControl on dsp side for sending a message to arm (dspAlgLink to hostFramesInLink) as follow:
System_linkControl(SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0, SYSTEM_CMD_DSP2ARM_ENCODE, &vidFrame, sizeof(VIDFrame_Buf), TRUE);
The message is a frame buffer pointer and the waitAck is true.
On the arm side, I modify the function IpcFramesInLink_tskMain in file ipcFramesInLink_tsk.c as follow:
case SYSTEM_CMD_DSP2ARM_ENCODE:
VIDFrame_Buf *pFrame = NULL;
pFrame = (VIDFrame_Buf *)OSA_msgGetPrm(pMsg);
IpcFramesInLink_setVirtBufAddr(pObj, pFrame, NULL);
if (pObj->createArgs.cbEncodeAck)
{
pObj->createArgs.cbEncodeAck(pObj->createArgs.cbCtx, (Ptr)pFrame);
}
OSA_tskAckOrFreeMsg(pMsg, status);
break;
the cbEncodeAck is a function to process the image frame.
I think , on the dsp side as the waitAck is TRUE, the System_linkControl will be return when the code 'OSA_tskAckOrFreeMsg(pMsg, status);' executed. However, the dsp blocked until the frame processed, it consume about 200 ms.
I add usleep(200) on arm side, the System_linkControl would be return immediately, however when I call the System_linkControl twice in a row, the second call would be return after 200 ms.
So, I think the System_linkControl would be not generate a interrupt from dsp to arm, I post a forum about the messageQ as follow:
Furthermore, I want to set the waitAck is FALSE on dsp side, however I found the function System_ipcMsgQSendMsg as follow:
if (waitAck != TRUE)
{
Vps_printf("MSGQ:Warning!! Forcing waitAck = TRUE as waitAck = FALSE is not supported."
"Fix send cmd [0x%x] to linkId [0x%x",cmd,linkId);
waitAck = TRUE;
}
UTILS_assert(TRUE == waitAck);
So, I think the waitAck must be TRUE on dsp side.
I want to send a message from to dsp and it would not block the dsp. I used rdk 4.0 on DM8167.
Could you give about some advice about the question.
Best Regards,
Tianxing