summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkata Narendra Kumar Gutta <vgutta@codeaurora.org>2015-12-21 17:06:48 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:16:01 -0700
commit0e1466b439040e0a89b1be0866af720d984462ef (patch)
tree161763930677a2f5912b5d3069f52978c5664445
parent5a1a6cdec7e3cfa8124fe0ed3582717869015fb2 (diff)
ASoC: msm: qdsp6v2: Don't request to open irrelevant SMD channels
APSS is unable to open apr_voice_svc channel with destination processor as MODEM. This is due to MODEM is no longer opening that channel, also none of the clients on apps are using this channel. Hence, don't request for the SMD channels when the destination is MODEM, but ensure that apr clients should be able to receive SSR notifications from MODEM subsystem. Change-Id: I566dd065ccd75956ab8fd594bb94e09b699258dd Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
-rw-r--r--drivers/soc/qcom/qdsp6v2/apr.c11
-rw-r--r--drivers/soc/qcom/qdsp6v2/apr_v2.c7
-rw-r--r--drivers/soc/qcom/qdsp6v2/apr_v3.c7
-rw-r--r--include/linux/qdsp6v2/apr.h3
4 files changed, 10 insertions, 18 deletions
diff --git a/drivers/soc/qcom/qdsp6v2/apr.c b/drivers/soc/qcom/qdsp6v2/apr.c
index 2da60f96d167..862db9a8fde2 100644
--- a/drivers/soc/qcom/qdsp6v2/apr.c
+++ b/drivers/soc/qcom/qdsp6v2/apr.c
@@ -325,6 +325,7 @@ struct apr_svc *apr_register(char *dest, char *svc_name, apr_fn svc_fn,
int temp_port = 0;
struct apr_svc *svc = NULL;
int rc = 0;
+ bool can_open_channel = true;
if (!dest || !svc_name || !svc_fn)
return NULL;
@@ -332,9 +333,11 @@ struct apr_svc *apr_register(char *dest, char *svc_name, apr_fn svc_fn,
if (!strcmp(dest, "ADSP"))
domain_id = APR_DOMAIN_ADSP;
else if (!strcmp(dest, "MODEM")) {
- /* Register voice services if destination permits */
- if (!apr_register_voice_svc())
- goto done;
+ /* Don't request for SMD channels if destination is MODEM,
+ * as these channels are no longer used and these clients
+ * are to listen only for MODEM SSR events
+ */
+ can_open_channel = false;
domain_id = APR_DOMAIN_MODEM;
} else {
pr_err("APR: wrong destination\n");
@@ -373,7 +376,7 @@ struct apr_svc *apr_register(char *dest, char *svc_name, apr_fn svc_fn,
clnt = &client[dest_id][client_id];
mutex_lock(&clnt->m_lock);
- if (!clnt->handle) {
+ if (!clnt->handle && can_open_channel) {
clnt->handle = apr_tal_open(client_id, dest_id,
APR_DL_SMD, apr_cb_func, NULL);
if (!clnt->handle) {
diff --git a/drivers/soc/qcom/qdsp6v2/apr_v2.c b/drivers/soc/qcom/qdsp6v2/apr_v2.c
index c6e3b7ee6c10..8fc72e499450 100644
--- a/drivers/soc/qcom/qdsp6v2/apr_v2.c
+++ b/drivers/soc/qcom/qdsp6v2/apr_v2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -63,8 +63,3 @@ uint16_t apr_get_reset_domain(uint16_t proc)
{
return proc;
}
-
-bool apr_register_voice_svc()
-{
- return true;
-}
diff --git a/drivers/soc/qcom/qdsp6v2/apr_v3.c b/drivers/soc/qcom/qdsp6v2/apr_v3.c
index 899bb2d0aa14..58ce6cfd74cb 100644
--- a/drivers/soc/qcom/qdsp6v2/apr_v3.c
+++ b/drivers/soc/qcom/qdsp6v2/apr_v3.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -46,8 +46,3 @@ uint16_t apr_get_reset_domain(uint16_t proc)
{
return APR_DEST_QDSP6;
}
-
-bool apr_register_voice_svc()
-{
- return false;
-}
diff --git a/include/linux/qdsp6v2/apr.h b/include/linux/qdsp6v2/apr.h
index f73f2e1eb5b3..a69f0392bb70 100644
--- a/include/linux/qdsp6v2/apr.h
+++ b/include/linux/qdsp6v2/apr.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -174,6 +174,5 @@ enum apr_subsys_state apr_get_q6_state(void);
int apr_set_q6_state(enum apr_subsys_state state);
void apr_set_subsys_state(void);
const char *apr_get_lpass_subsys_name(void);
-bool apr_register_voice_svc(void);
uint16_t apr_get_reset_domain(uint16_t proc);
#endif