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

Commit 30c74f58 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: Don't request to open irrelevant SMD channels"

parents f8a13d62 fd7f1f47
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