Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd7f1f47 authored by Venkata Narendra Kumar Gutta's avatar Venkata Narendra Kumar Gutta Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVenkata Narendra Kumar Gutta <vgutta@codeaurora.org>
parent 9c186765
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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) {
+1 −6
Original line number Diff line number Diff line
/*
 * 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;
}
+1 −6
Original line number Diff line number Diff line
/*
 * 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;
}
+1 −2
Original line number Diff line number Diff line
/* 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