Merge "ASoC: audio_notifier : Change logic for initial boot"
This commit is contained in:
commit
36d10a3882
4 changed files with 20 additions and 7 deletions
|
@ -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:
|
||||
|
|
|
@ -886,8 +886,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
|
||||
|
@ -907,7 +909,12 @@ done:
|
|||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block service_nb = {
|
||||
static struct notifier_block adsp_service_nb = {
|
||||
.notifier_call = apr_notifier_service_cb,
|
||||
.priority = 0,
|
||||
};
|
||||
|
||||
static struct notifier_block modem_service_nb = {
|
||||
.notifier_call = apr_notifier_service_cb,
|
||||
.priority = 0,
|
||||
};
|
||||
|
@ -937,9 +944,9 @@ static int __init apr_init(void)
|
|||
|
||||
is_initial_boot = true;
|
||||
subsys_notif_register("apr_adsp", AUDIO_NOTIFIER_ADSP_DOMAIN,
|
||||
&service_nb);
|
||||
&adsp_service_nb);
|
||||
subsys_notif_register("apr_modem", AUDIO_NOTIFIER_MODEM_DOMAIN,
|
||||
&service_nb);
|
||||
&modem_service_nb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -3813,8 +3813,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);
|
||||
|
|
Loading…
Add table
Reference in a new issue