Skip to content

Commit

Permalink
ASoC: msm_sdw: Avoid initial SSR notifications at bootup
Browse files Browse the repository at this point in the history
In MSM soundwire codec, avoid initial bootup SSR
notifications after registration of notifier.

Change-Id: I06b1ffedf3b7247baa1d3ffe92a66584a321e624
Signed-off-by: Laxminath Kasam <[email protected]>
  • Loading branch information
Laxminath Kasam authored and Gerrit - the friendly Code Review server committed Mar 20, 2017
1 parent 352d9b7 commit 3f2c3d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/soc/codecs/msm_sdw/msm_sdw_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,19 +1656,24 @@ 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++)
swrm_wcd_notify(msm_sdw->sdw_ctrl_data[i].sdw_pdev,
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 +
Expand Down

0 comments on commit 3f2c3d8

Please sign in to comment.