diff options
author | Ramprasad Katkam <katkam@codeaurora.org> | 2017-05-17 23:51:44 +0530 |
---|---|---|
committer | Ramprasad Katkam <katkam@codeaurora.org> | 2017-05-19 02:28:21 +0530 |
commit | 098babd32f752f739e10770a64ce7e20784b9564 (patch) | |
tree | 916197e1ff96c772ac00183b7ad5aea13b15803d /sound | |
parent | 3589a465d72f09ae16154316dd946ee48c3546e3 (diff) |
ASoC: audio_notifier : Change logic for initial boot
In sdm660 due to change of notifier logic, there is a chance of
receiving only service down notifications during bootup. In this case
the initial boot flag is not cleared, as it is only cleared on
service up notification currenly.because of this, the next service down
event during SSR/PDR will be ignored. To fix this, clear initial boot flag
for both first service up/down notification, so that Reset notifications
are not ignored.
Change-Id: Iae3ccc6a81fac5d9e5c640f0fee8bb2aee2271cd
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/msm_sdw/msm_sdw_cdc.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c b/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c index db723e5ec1f4..b91d13c8e010 100644 --- a/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c +++ b/sound/soc/codecs/msm_sdw/msm_sdw_cdc.c @@ -1668,8 +1668,10 @@ static int msm_sdw_notifier_service_cb(struct notifier_block *nb, mutex_lock(&msm_sdw->codec_mutex); switch (opcode) { case AUDIO_NOTIFIER_SERVICE_DOWN: - if (initial_boot) + if (initial_boot) { + initial_boot = false; break; + } msm_sdw->int_mclk1_enabled = false; msm_sdw->dev_up = false; for (i = 0; i < msm_sdw->nr; i++) diff --git a/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c b/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c index 699e7251023f..573b0b633f60 100644 --- a/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c +++ b/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c @@ -3829,8 +3829,10 @@ static int sdm660_cdc_notifier_service_cb(struct notifier_block *nb, switch (opcode) { case AUDIO_NOTIFIER_SERVICE_DOWN: - if (initial_boot) + if (initial_boot) { + initial_boot = false; break; + } dev_dbg(codec->dev, "ADSP is about to power down. teardown/reset codec\n"); msm_anlg_cdc_device_down(codec); |