tegra-alt: adsp: avoid sleep in send msg
Viraj Karandikar [Thu, 1 Sep 2016 10:25:10 +0000 (15:25 +0530)]
Do not use blocking flag for mailbox send function.
Use mdelay instead of msleep

Bug 200222934

Change-Id: I9c121f50debb46b191ad735f7445bbe5c026e30a
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1217913
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

sound/soc/tegra-alt/tegra210_adsp_alt.c

index ad8528c..3e4b745 100644 (file)
@@ -428,12 +428,12 @@ static int tegra210_adsp_send_msg(struct tegra210_adsp_app *app,
        if (ret < 0) {
                /* Wakeup APM to consume messages and give it some time */
                ret = nvadsp_mbox_send(&app->apm_mbox, apm_cmd_msg_ready,
-                       NVADSP_MBOX_SMSG, true, 100);
+                       NVADSP_MBOX_SMSG, false, 0);
                if (ret) {
                        pr_err("%s: Failed to send mailbox message id %d ret %d\n",
                                __func__, app->apm->mbox_id, ret);
                }
-               msleep(20);
+               mdelay(20);
                /* Attempt queueing again */
                ret = msgq_queue_message(&app->apm->msgq_recv.msgq,
                                &apm_msg->msgq_msg);
@@ -448,7 +448,7 @@ static int tegra210_adsp_send_msg(struct tegra210_adsp_app *app,
                return 0;
 
        ret = nvadsp_mbox_send(&app->apm_mbox, apm_cmd_msg_ready,
-               NVADSP_MBOX_SMSG, true, 100);
+               NVADSP_MBOX_SMSG, false, 0);
        if (ret) {
                pr_err("%s: Failed to send mailbox message id %d ret %d\n",
                        __func__, app->apm->mbox_id, ret);