MLK-21307: ASoC: fsl_rpmsg_i2s: optimize the message sent to m4
M4 complain that there are two much period done message sent to m4, that
M4 don't have enough time to handle these messages.
The solution for this issue is to reduce the number of period done message.
We allocate a specific memory for period done message, every time there is
period done coming, it will be writed to this memory, not write it directly
to the work queue, that queue will not be overflow, and the old period done
message will be overwrited.
In the rpmsg_i2s_work, we first check if there is period done message, then
send it first, after that, send the command in queue.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit caabdfa176453cc7c8d6521f7865a670a7265a18)
3 files changed