From 3589a465d72f09ae16154316dd946ee48c3546e3 Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Thu, 11 May 2017 14:29:25 +0530 Subject: ASOC: APR: Add separate notifier nodes for adsp/modem notifications APR registers for subsys_notification via audio_notifier for both adsp & modem services, with the same notifier node. This causes intermixing of the audio notifier lists of modem and adsp as the same apr notifier node is added to both adsp & modem list.Make separate notifier nodes for apr adsp & modem notifications to avoid this issue. Change-Id: I4a9146fbe340d02e8af0082d5342e5ac8009e0c4 Signed-off-by: Ramprasad Katkam --- drivers/soc/qcom/qdsp6v2/apr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers/soc') diff --git a/drivers/soc/qcom/qdsp6v2/apr.c b/drivers/soc/qcom/qdsp6v2/apr.c index a275537d4e08..5681b8f2e678 100644 --- a/drivers/soc/qcom/qdsp6v2/apr.c +++ b/drivers/soc/qcom/qdsp6v2/apr.c @@ -906,7 +906,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, }; @@ -936,9 +941,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; } -- cgit v1.2.3 From 098babd32f752f739e10770a64ce7e20784b9564 Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Wed, 17 May 2017 23:51:44 +0530 Subject: 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 --- drivers/soc/qcom/qdsp6v2/apr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/soc') diff --git a/drivers/soc/qcom/qdsp6v2/apr.c b/drivers/soc/qcom/qdsp6v2/apr.c index 5681b8f2e678..7547c1597ffb 100644 --- a/drivers/soc/qcom/qdsp6v2/apr.c +++ b/drivers/soc/qcom/qdsp6v2/apr.c @@ -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 -- cgit v1.2.3