Merge "msm: iommu: Split rotator/mdp iommu domains" into msm-3.4
diff --git a/arch/arm/configs/msm8660-perf_defconfig b/arch/arm/configs/msm8660-perf_defconfig
index ea4c0f6..173dcca 100644
--- a/arch/arm/configs/msm8660-perf_defconfig
+++ b/arch/arm/configs/msm8660-perf_defconfig
@@ -416,6 +416,8 @@
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
CONFIG_MSM_SSBI=y
+CONFIG_MSM_IOMMU=y
+# CONFIG_IOMMU_PGTABLES_L2 is not set
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/msm8660_defconfig b/arch/arm/configs/msm8660_defconfig
index 20557e5..f329c81 100644
--- a/arch/arm/configs/msm8660_defconfig
+++ b/arch/arm/configs/msm8660_defconfig
@@ -288,6 +288,8 @@
# CONFIG_I2C_MSM is not set
CONFIG_I2C_QUP=y
CONFIG_I2C_SSBI=y
+CONFIG_MSM_IOMMU=y
+# CONFIG_IOMMU_PGTABLES_L2 is not set
CONFIG_SPI=y
CONFIG_SPI_QUP=y
CONFIG_SPI_SPIDEV=m
diff --git a/arch/arm/mach-msm/iommu_domains.c b/arch/arm/mach-msm/iommu_domains.c
index e92b5c5..42f0438 100644
--- a/arch/arm/mach-msm/iommu_domains.c
+++ b/arch/arm/mach-msm/iommu_domains.c
@@ -400,6 +400,9 @@
struct iommu_domains_pdata *p = pdev->dev.platform_data;
int i, j;
+ if (!msm_use_iommu())
+ return -ENODEV;
+
if (!p)
return -ENODEV;
diff --git a/arch/arm/mach-msm/qdsp5/audio_mvs.c b/arch/arm/mach-msm/qdsp5/audio_mvs.c
index 9b524b4..158dd46 100644
--- a/arch/arm/mach-msm/qdsp5/audio_mvs.c
+++ b/arch/arm/mach-msm/qdsp5/audio_mvs.c
@@ -425,6 +425,8 @@
set_voc_mode_msg.min_rate = cpu_to_be32(audio->rate_type);
set_voc_mode_msg.max_rate = cpu_to_be32(audio->rate_type);
+ MM_DBG("audio->mvs_mode %d audio->rate_type %d\n",
+ audio->mvs_mode, audio->rate_type);
msm_rpc_setup_req(&set_voc_mode_msg.rpc_hdr,
audio->rpc_prog,
audio->rpc_ver,
@@ -923,10 +925,14 @@
MM_DBG("UL AMR frame_type %d\n",
be32_to_cpu(*args));
- } else if ((frame_mode == MVS_FRAME_MODE_PCM_UL) ||
- (frame_mode == MVS_FRAME_MODE_VOC_TX)) {
- /* PCM and EVRC don't have frame_type */
+ } else if (frame_mode == MVS_FRAME_MODE_PCM_UL) {
+ /* PCM doesn't have frame_type */
buf_node->frame.frame_type = 0;
+ } else if (frame_mode == MVS_FRAME_MODE_VOC_TX) {
+ /* Extracting EVRC current buffer frame rate*/
+ buf_node->frame.frame_type = be32_to_cpu(*args);
+ pr_debug("%s: UL EVRC frame_type %d\n",
+ __func__, be32_to_cpu(*args));
} else if (frame_mode == MVS_FRAME_MODE_G711_UL) {
/* Extract G711 frame type. */
buf_node->frame.frame_type = be32_to_cpu(*args);
@@ -1056,7 +1062,7 @@
cpu_to_be32(AUDIO_MVS_PKT_NORMAL);
} else if (frame_mode == MVS_FRAME_MODE_VOC_RX) {
dl_reply.cdc_param.gnr_arg.param1 =
- cpu_to_be32(audio->rate_type);
+ cpu_to_be32(buf_node->frame.frame_type);
dl_reply.cdc_param.gnr_arg.param2 = 0;
dl_reply.cdc_param.\
gnr_arg.valid_pkt_status_ptr =
@@ -1488,7 +1494,8 @@
case AUDIO_GET_MVS_CONFIG: {
struct msm_audio_mvs_config config;
- MM_DBG("IOCTL GET_MVS_CONFIG\n");
+ MM_DBG("GET_MVS_CONFIG mvs_mode %d rate_type %d\n",
+ config.mvs_mode, config.rate_type);
mutex_lock(&audio->lock);
config.mvs_mode = audio->mvs_mode;
diff --git a/include/linux/msm_audio_mvs.h b/include/linux/msm_audio_mvs.h
index 1807cb0..6fe5b70 100644
--- a/include/linux/msm_audio_mvs.h
+++ b/include/linux/msm_audio_mvs.h
@@ -9,10 +9,10 @@
(AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned)
/* MVS modes */
-#define MVS_MODE_IS733 0x1
-#define MVS_MODE_IS127 0x2
-#define MVS_MODE_4GV_NB 0x3
-#define MVS_MODE_4GV_WB 0x4
+#define MVS_MODE_IS733 0x1 /*QCELP 13K*/
+#define MVS_MODE_IS127 0x2 /*EVRC-8k*/
+#define MVS_MODE_4GV_NB 0x3 /*EVRC-B*/
+#define MVS_MODE_4GV_WB 0x4 /*EVRC-WB*/
#define MVS_MODE_AMR 0x5
#define MVS_MODE_EFR 0x6
#define MVS_MODE_FR 0x7
@@ -47,12 +47,17 @@
MVS_AMR_MODE_UNDEF
};
+/*The MVS VOC rate type is used to identify the rate of QCELP 13K(IS733),
+EVRC(IS127), 4GV, or 4GV-WB frame.*/
enum msm_audio_voc_rate {
MVS_VOC_0_RATE, /* Blank frame */
MVS_VOC_8_RATE, /* 1/8 rate */
MVS_VOC_4_RATE, /* 1/4 rate */
MVS_VOC_2_RATE, /* 1/2 rate */
- MVS_VOC_1_RATE /* Full rate */
+ MVS_VOC_1_RATE,/* Full rate */
+ MVS_VOC_ERASURE, /* erasure frame */
+ MVS_VOC_RATE_MAX,
+ MVS_VOC_RATE_UNDEF = MVS_VOC_RATE_MAX
};
enum msm_audio_amr_frame_type {
@@ -72,6 +77,11 @@
MVS_G711A_MODE_ALAW
};
+enum msm_audio_g711_mode {
+ MVS_G711_MODE_MULAW,
+ MVS_G711_MODE_ALAW
+};
+
enum mvs_g722_mode_type {
MVS_G722_MODE_01,
MVS_G722_MODE_02,