ASOC: msm: Allocate separate memory for VoIP calibration
In current design, voice and voip calls share the same
memory for calibration data. But DSP doesn't support to map
the same memory twice. This will cause crash in DSP when trying
to make voice call and voip call concurrently.
In voice driver, allocate the separate memory to store voip
calibration data.
Change-Id: I52bf0554f88610ab8088571739aa0a72cff69f39
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
diff --git a/sound/soc/msm/qdsp6/q6voice.h b/sound/soc/msm/qdsp6/q6voice.h
index 0edf1c9..0fc7a01 100644
--- a/sound/soc/msm/qdsp6/q6voice.h
+++ b/sound/soc/msm/qdsp6/q6voice.h
@@ -13,6 +13,7 @@
#define __QDSP6VOICE_H__
#include <mach/qdsp6v2/apr.h>
+#include <linux/ion.h>
#define MAX_VOC_PKT_SIZE 642
#define SESSION_NAME_LEN 20
@@ -871,6 +872,12 @@
struct voice_rec_route_state rec_route_state;
};
+struct cal_mem {
+ struct ion_handle *handle;
+ uint32_t phy;
+ void *buf;
+};
+
#define MAX_VOC_SESSIONS 2
#define SESSION_ID_BASE 0xFFF0
@@ -887,6 +894,10 @@
/* APR to CVP in the Q6 */
void *apr_q6_cvp;
+ struct ion_client *client;
+ struct cal_mem cvp_cal;
+ struct cal_mem cvs_cal;
+
struct mutex common_lock;
struct mvs_driver_info mvs_info;