OSDN Git Service

msmcobalt: Add delay to check ADSP state during SSR
authorShiv Maliyappanahalli <smaliyap@codeaurora.org>
Wed, 6 Jul 2016 19:19:55 +0000 (12:19 -0700)
committerKyle Yan <kyan@codeaurora.org>
Tue, 12 Jul 2016 01:56:21 +0000 (18:56 -0700)
During SSR(subsystem restart), add a delay when ADSP state
is not yet ready. This will avoid excessive logging when
ADSP state is not ready.

Change-Id: I7e127d97cdd22409d4e70788a7cf2013593d3bfe
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
sound/soc/msm/msmcobalt.c

index 68bde8b..c835fc3 100644 (file)
@@ -1393,6 +1393,13 @@ static int msm_adsp_power_up_config(struct snd_soc_codec *codec)
                        pr_debug("%s: ADSP Audio is ready\n", __func__);
                        adsp_ready = 1;
                        break;
+               } else {
+                       /*
+                        * ADSP will be coming up after subsystem restart and
+                        * it might not be fully up when the control reaches
+                        * here. So, wait for 50msec before checking ADSP state
+                        */
+                       msleep(50);
                }
        } while (time_after(timeout, jiffies));