dsp: q6voice: call voice MHI start/end APIs

Whenever a voice call starts or ends q6voice shall call
voice_MHI API to enable or disable MHI voting respectively.

Change-Id: Ia1125fb96c67ff6fec2242bc2b482ef7017dfb7d
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
This commit is contained in:
Vikram Panduranga 2019-01-07 18:42:48 -08:00
commit 7dbdc9aa69

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*/
#include <linux/slab.h>
#include <linux/kthread.h>
@ -22,6 +22,7 @@
#include <dsp/q6voice.h>
#include <ipc/apr_tal.h>
#include "adsp_err.h"
#include <dsp/voice_mhi.h>
#define TIMEOUT_MS 300
@ -6809,6 +6810,11 @@ int voc_end_voice_call(uint32_t session_id)
voc_update_session_params(v);
voice_destroy_mvm_cvs_session(v);
ret = voice_mhi_end();
if (ret < 0)
pr_debug("%s: voice_mhi_end failed! %d\n",
__func__, ret);
v->voc_state = VOC_RELEASE;
} else {
pr_err("%s: Error: End voice called in state %d\n",
@ -7144,6 +7150,13 @@ int voc_start_voice_call(uint32_t session_id)
__func__, ret);
}
ret = voice_mhi_start();
if (ret < 0) {
pr_debug("%s: voice_mhi_start failed! %d\n",
__func__, ret);
goto fail;
}
ret = voice_create_mvm_cvs_session(v);
if (ret < 0) {
pr_err("create mvm and cvs failed\n");