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

Commit bc1aa855 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 register to modem for SSR callbacks



Voice driver doesn't create any sessions related to voice call
on modem and hence there is no clean up on APSS is required
when modem SSR is triggered. Cleanup the code in voice driver
which is executed during modem SSR.

CRs-Fixed: 955696
Change-Id: I7536162e49b0eb56f63e7c8e59e0c050123c05fe
Signed-off-by: default avatarVenkata Narendra Kumar Gutta <vgutta@codeaurora.org>
parent d171201f
Loading
Loading
Loading
Loading
+45 −110
Original line number Diff line number Diff line
/*  Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/*  Copyright (c) 2012-2016, 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
@@ -474,9 +474,6 @@ static void voc_set_error_state(uint16_t reset_proc)
	int i;

	for (i = 0; i < MAX_VOC_SESSIONS; i++) {
		if (reset_proc == APR_DEST_MODEM  && i == VOC_PATH_FULL)
			continue;

		v = &common.voice[i];
		if (v != NULL)
			v->voc_state = VOC_ERROR;
@@ -586,7 +583,6 @@ static int voice_get_cvd_int_version(char *cvd_ver_string)

static int voice_apr_register(uint32_t session_id)
{
	void *modem_mvm, *modem_cvs, *modem_cvp;

	pr_debug("%s\n", __func__);

@@ -604,21 +600,6 @@ static int voice_apr_register(uint32_t session_id)
			pr_err("%s: Unable to register MVM\n", __func__);
			goto err;
		}

		/*
		 * Register with modem for SSR callback for voice, volte and
		 * modem based QCHAT calls. The APR handle is not stored since
		 * it is used only to receive notifications and not for
		 * communication
		 */
		if (!is_voip_session(session_id)) {
			modem_mvm = apr_register("MODEM", "MVM",
						 qdsp_mvm_callback,
						 0xFFFFFFFF, &common);
			if (modem_mvm == NULL)
				pr_err("%s: Unable to register MVM for MODEM\n",
					__func__);
		}
	}

	if (common.apr_q6_cvs == NULL) {
@@ -633,20 +614,6 @@ static int voice_apr_register(uint32_t session_id)
			goto err;
		}
		rtac_set_voice_handle(RTAC_CVS, common.apr_q6_cvs);
		/*
		 * Register with modem for SSR callback for voice, volte and
		 * modem based QCHAT calls. The APR handle is not stored since
		 * it is used only to receive notifications and not for
		 * communication
		 */
		if (!is_voip_session(session_id)) {
			modem_cvs = apr_register("MODEM", "CVS",
						 qdsp_cvs_callback,
						 0xFFFFFFFF, &common);
			 if (modem_cvs == NULL)
				pr_err("%s: Unable to register CVS for MODEM\n",
					__func__);
		}
	}

	if (common.apr_q6_cvp == NULL) {
@@ -661,20 +628,6 @@ static int voice_apr_register(uint32_t session_id)
			goto err;
		}
		rtac_set_voice_handle(RTAC_CVP, common.apr_q6_cvp);
		/*
		 * Register with modem for SSR callback for voice, volte and
		 * modem based QCHAT calls. The APR handle is not stored since
		 * it is used only to receive notifications and not for
		 * communication
		 */
		if (!is_voip_session(session_id)) {
			modem_cvp = apr_register("MODEM", "CVP",
						 qdsp_cvp_callback,
						 0xFFFFFFFF, &common);
			if (modem_cvp == NULL)
				pr_err("%s: Unable to register CVP for MODEM\n",
					__func__);
		}
	}

	mutex_unlock(&common.common_lock);
@@ -6295,11 +6248,6 @@ static int32_t qdsp_mvm_callback(struct apr_client_data *data, void *priv)
		data->payload_size, data->opcode);

	if (data->opcode == RESET_EVENTS) {

		if (data->reset_proc == APR_DEST_MODEM) {
			pr_debug("%s: Received MODEM reset event\n", __func__);

		} else {
		pr_debug("%s: Reset event received in Voice service\n",
				__func__);

@@ -6337,7 +6285,6 @@ static int32_t qdsp_mvm_callback(struct apr_client_data *data, void *priv)
			common.source_tracking_sh_mem.sh_mem_block.handle =
									NULL;
		}
		}
		/* clean up srvcc rec flag */
		c->srvcc_rec_flag = false;
		voc_set_error_state(data->reset_proc);
@@ -6521,10 +6468,6 @@ static int32_t qdsp_cvs_callback(struct apr_client_data *data, void *priv)
		data->payload_size, data->opcode);

	if (data->opcode == RESET_EVENTS) {
		if (data->reset_proc == APR_DEST_MODEM) {
			pr_debug("%s: Received Modem reset event\n", __func__);

		} else {
		pr_debug("%s: Reset event received in Voice service\n",
				__func__);

@@ -6549,8 +6492,6 @@ static int32_t qdsp_cvs_callback(struct apr_client_data *data, void *priv)
			common.source_tracking_sh_mem.sh_mem_block.handle =
									NULL;
		}
		}

		voc_set_error_state(data->reset_proc);
		return 0;
	}
@@ -6801,10 +6742,6 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv)
	c = priv;

	if (data->opcode == RESET_EVENTS) {
		if (data->reset_proc == APR_DEST_MODEM) {
			pr_debug("%s: Received Modem reset event\n", __func__);

		} else {
		pr_debug("%s: Reset event received in Voice service\n",
				__func__);

@@ -6831,8 +6768,6 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv)
			common.source_tracking_sh_mem.sh_mem_block.handle =
									NULL;
		}
		}

		voc_set_error_state(data->reset_proc);
		return 0;
	}