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>
This commit is contained in:
Ramprasad Katkam 2017-05-17 23:51:44 +05:30
parent 3589a465d7
commit 098babd32f
4 changed files with 12 additions and 4 deletions

View file

@ -414,8 +414,10 @@ static int lpi_notifier_service_cb(struct notifier_block *this,
switch (opcode) {
case AUDIO_NOTIFIER_SERVICE_DOWN:
if (initial_boot)
if (initial_boot) {
initial_boot = false;
break;
}
lpi_dev_up = false;
break;
case AUDIO_NOTIFIER_SERVICE_UP:

View file

@ -885,8 +885,10 @@ static int apr_notifier_service_cb(struct notifier_block *this,
* recovery notifications during initial boot
* up since everything is expected to be down.
*/
if (is_initial_boot)
if (is_initial_boot) {
is_initial_boot = false;
break;
}
if (cb_data->domain == AUDIO_NOTIFIER_MODEM_DOMAIN)
apr_modem_down(opcode);
else

View file

@ -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++)

View file

@ -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);