From 727455f34d7b279271e402b1873dc4e42c9c78de Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Sun, 19 Mar 2017 16:20:24 +0530 Subject: [PATCH] ASoC: msm_sdw: Avoid initial SSR notifications at bootup In MSM soundwire codec, avoid initial bootup SSR notifications after registration of notifier. Change-Id: I06b1ffedf3b7247baa1d3ffe92a66584a321e624 Signed-off-by: Laxminath Kasam --- sound/soc/codecs/msm_sdw/msm_sdw_cdc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c b/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c index 1d1dd0f61f28..b7b785f0732c 100644 --- a/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c +++ b/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c @@ -1656,12 +1656,15 @@ static int msm_sdw_notifier_service_cb(struct notifier_block *nb, service_nb); bool adsp_ready = false; unsigned long timeout; + static bool initial_boot = true; pr_debug("%s: Service opcode 0x%lx\n", __func__, opcode); mutex_lock(&msm_sdw->codec_mutex); switch (opcode) { case AUDIO_NOTIFIER_SERVICE_DOWN: + if (initial_boot) + break; msm_sdw->int_mclk1_enabled = false; msm_sdw->dev_up = false; for (i = 0; i < msm_sdw->nr; i++) @@ -1669,6 +1672,8 @@ static int msm_sdw_notifier_service_cb(struct notifier_block *nb, SWR_DEVICE_DOWN, NULL); break; case AUDIO_NOTIFIER_SERVICE_UP: + if (initial_boot) + initial_boot = false; if (!q6core_is_adsp_ready()) { dev_dbg(msm_sdw->dev, "ADSP isn't ready\n"); timeout = jiffies + -- 2.11.0