Merge "mmc: msm_sdcc: Add mmc-async-req support" into msm-3.0
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index b216027..6f33d86 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -543,6 +543,14 @@
help
Support for the Qualcomm MSM8625 Reference Design.
+config MACH_MSM8625_EVT
+ depends on ARCH_MSM8625
+ depends on !MSM_STACKED_MEMORY
+ default y
+ bool "MSM8625 EVT"
+ help
+ Support for the Qualcomm MSM8625 Reference Design.
+
config MACH_MSM7X30_SURF
depends on ARCH_MSM7X30
depends on !MSM_STACKED_MEMORY
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 860d7fd..c5b0081 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -243,6 +243,7 @@
obj-$(CONFIG_MACH_MSM8625_EVB) += board-qrd7627a.o board-7627a-all.o
obj-$(CONFIG_MACH_MSM8625_QRD7) += board-qrd7627a.o board-7627a-all.o
obj-$(CONFIG_MACH_MSM8625_FFA) += board-msm7x27a.o board-7627a-all.o
+obj-$(CONFIG_MACH_MSM8625_EVT) += board-msm7x27a.o board-7627a-all.o
obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o memory_topology.o
obj-$(CONFIG_ARCH_MSM7X30) += clock-local.o clock-7x30.o acpuclock-7x30.o clock-pll.o
obj-$(CONFIG_MACH_MSM7X25_SURF) += board-msm7x27.o devices-msm7x25.o
diff --git a/arch/arm/mach-msm/board-msm7627a-bt.c b/arch/arm/mach-msm/board-msm7627a-bt.c
index 81abbc0..75d5f15 100644
--- a/arch/arm/mach-msm/board-msm7627a-bt.c
+++ b/arch/arm/mach-msm/board-msm7627a-bt.c
@@ -102,7 +102,8 @@
u32 socinfo = socinfo_get_platform_version();
if (machine_is_msm7627a_qrd1())
gpio_bt_sys_rest_en = 114;
- if (machine_is_msm7627a_evb() || machine_is_msm8625_evb())
+ if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt())
gpio_bt_sys_rest_en = 16;
if (machine_is_msm8625_qrd7())
gpio_bt_sys_rest_en = 88;
diff --git a/arch/arm/mach-msm/board-msm7627a-camera.c b/arch/arm/mach-msm/board-msm7627a-camera.c
index e330f21..e97fdad 100644
--- a/arch/arm/mach-msm/board-msm7627a-camera.c
+++ b/arch/arm/mach-msm/board-msm7627a-camera.c
@@ -314,14 +314,15 @@
sensor_board_info_ov5647.num_vreg = 0;
}
platform_device_register(&msm_camera_server);
- if (machine_is_msm8625_surf() || machine_is_msm8625_evb()) {
+ if (machine_is_msm8625_surf() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()) {
platform_device_register(&msm8625_device_csic0);
platform_device_register(&msm8625_device_csic1);
} else {
platform_device_register(&msm7x27a_device_csic0);
platform_device_register(&msm7x27a_device_csic1);
}
- if (machine_is_msm8625_evb())
+ if (machine_is_msm8625_evb() || machine_is_msm8625_evt())
*(int *) msm7x27a_device_clkctl.dev.platform_data = 1;
platform_device_register(&msm7x27a_device_clkctl);
platform_device_register(&msm7x27a_device_vfe);
@@ -1053,7 +1054,8 @@
pr_debug("msm7627a_camera_init Entered\n");
/* LCD and camera power (VREG & LDO) init */
- if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) {
+ if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()) {
lcd_camera_power_init();
evb_camera_gpio_cfg();
}
@@ -1063,7 +1065,8 @@
qrd1_camera_gpio_cfg();
platform_add_devices(camera_devices_qrd,
ARRAY_SIZE(camera_devices_qrd));
- } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) {
+ } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()) {
platform_add_devices(camera_devices_evb,
ARRAY_SIZE(camera_devices_evb));
} else if (machine_is_msm7627a_qrd3())
@@ -1073,7 +1076,8 @@
ARRAY_SIZE(camera_devices_msm));
#endif
if (!machine_is_msm7627a_qrd1() || !machine_is_msm7627a_evb()
- || !machine_is_msm8625_evb())
+ || !machine_is_msm8625_evb()
+ || !machine_is_msm8625_evt())
register_i2c_devices();
#ifndef CONFIG_MSM_CAMERA_V4L2
rc = regulator_bulk_get(NULL, ARRAY_SIZE(regs_camera), regs_camera);
@@ -1099,7 +1103,8 @@
i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID,
i2c_camera_devices_qrd,
ARRAY_SIZE(i2c_camera_devices_qrd));
- } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) {
+ } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()) {
pr_debug("machine_is_msm7627a_evb i2c_register_board_info\n");
i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID,
i2c_camera_devices_evb,
diff --git a/arch/arm/mach-msm/board-msm7627a-display.c b/arch/arm/mach-msm/board-msm7627a-display.c
index c1915fb..89b9378 100644
--- a/arch/arm/mach-msm/board-msm7627a-display.c
+++ b/arch/arm/mach-msm/board-msm7627a-display.c
@@ -500,6 +500,9 @@
} else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) {
if (!strncmp(name, "mipi_cmd_nt35510_wvga", 21))
ret = 0;
+ } else if (machine_is_msm8625_evt()) {
+ if (!strncmp(name, "mipi_video_nt35510_wvga", 23))
+ ret = 0;
}
#if !defined(CONFIG_FB_MSM_LCDC_AUTO_DETECT) && \
@@ -733,7 +736,8 @@
if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa())
fb_size = MSM7x25A_MSM_FB_SIZE;
- else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb())
+ else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt())
fb_size = MSM8x25_MSM_FB_SIZE;
else
fb_size = MSM_FB_SIZE;
@@ -947,7 +951,8 @@
if (machine_is_msm7627a_qrd1())
rc = msm_fb_dsi_client_qrd1_reset();
- else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb())
+ else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt())
rc = msm_fb_dsi_client_qrd3_reset();
else
rc = msm_fb_dsi_client_msm_reset();
@@ -1243,7 +1248,8 @@
if (machine_is_msm7627a_qrd1())
rc = mipi_dsi_panel_qrd1_power(on);
- else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb())
+ else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt())
rc = mipi_dsi_panel_qrd3_power(on);
else
rc = mipi_dsi_panel_msm_power(on);
@@ -1286,7 +1292,8 @@
if (machine_is_msm7627a_qrd1())
platform_add_devices(qrd_fb_devices,
ARRAY_SIZE(qrd_fb_devices));
- else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) {
+ else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()) {
mipi_NT35510_pdata.bl_lock = 1;
mipi_NT35516_pdata.bl_lock = 1;
platform_add_devices(evb_fb_devices,
diff --git a/arch/arm/mach-msm/board-msm7627a-storage.c b/arch/arm/mach-msm/board-msm7627a-storage.c
index 946e109..93a430b 100644
--- a/arch/arm/mach-msm/board-msm7627a-storage.c
+++ b/arch/arm/mach-msm/board-msm7627a-storage.c
@@ -152,6 +152,7 @@
{
if (machine_is_msm7627a_qrd1() || machine_is_msm7627a_evb()
|| machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()
|| machine_is_msm7627a_qrd3()
|| machine_is_msm8625_qrd7())
gpio_sdc1_hw_det = 42;
@@ -256,6 +257,7 @@
if (machine_is_msm7627a_qrd1() ||
machine_is_msm7627a_evb() ||
machine_is_msm8625_evb() ||
+ machine_is_msm8625_evt() ||
machine_is_msm7627a_qrd3() ||
machine_is_msm8625_qrd7())
status = !gpio_get_value(gpio_sdc1_hw_det);
diff --git a/arch/arm/mach-msm/board-msm7627a-wlan.c b/arch/arm/mach-msm/board-msm7627a-wlan.c
index 5c2f801..07b7ab0 100644
--- a/arch/arm/mach-msm/board-msm7627a-wlan.c
+++ b/arch/arm/mach-msm/board-msm7627a-wlan.c
@@ -50,6 +50,7 @@
{
if (machine_is_msm7627a_qrd1() || machine_is_msm7627a_evb()
|| machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()
|| machine_is_msm7627a_qrd3()
|| machine_is_msm8625_qrd7())
gpio_wlan_sys_rest_en = 124;
@@ -234,6 +235,7 @@
*/
if (machine_is_msm7627a_qrd1() || machine_is_msm7627a_evb()
|| machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()
|| machine_is_msm7627a_qrd3()
|| machine_is_msm8625_qrd7()) {
rc = gpio_tlmm_config(GPIO_CFG(gpio_wlan_sys_rest_en, 0,
@@ -312,6 +314,7 @@
*/
if (machine_is_msm7627a_qrd1() || machine_is_msm7627a_evb()
|| machine_is_msm8625_evb()
+ || machine_is_msm8625_evt()
|| machine_is_msm7627a_qrd3()
|| machine_is_msm8625_qrd7()) {
rc = gpio_tlmm_config(GPIO_CFG(gpio_wlan_sys_rest_en, 0,
diff --git a/arch/arm/mach-msm/board-qrd7627a.c b/arch/arm/mach-msm/board-qrd7627a.c
index abc2cef..f565075 100644
--- a/arch/arm/mach-msm/board-qrd7627a.c
+++ b/arch/arm/mach-msm/board-qrd7627a.c
@@ -808,7 +808,8 @@
static void __init add_platform_devices(void)
{
- if (machine_is_msm8625_evb() || machine_is_msm8625_qrd7()) {
+ if (machine_is_msm8625_evb() || machine_is_msm8625_qrd7()
+ || machine_is_msm8625_evt()) {
platform_add_devices(msm8625_evb_devices,
ARRAY_SIZE(msm8625_evb_devices));
platform_add_devices(qrd3_devices,
@@ -966,3 +967,13 @@
.init_early = qrd7627a_init_early,
.handle_irq = gic_handle_irq,
MACHINE_END
+MACHINE_START(MSM8625_EVT, "QRD MSM8625 EVT")
+ .boot_params = PHYS_OFFSET + 0x100,
+ .map_io = msm8625_map_io,
+ .reserve = msm8625_reserve,
+ .init_irq = msm8625_init_irq,
+ .init_machine = msm_qrd_init,
+ .timer = &msm_timer,
+ .init_early = qrd7627a_init_early,
+ .handle_irq = gic_handle_irq,
+MACHINE_END
diff --git a/arch/arm/mach-msm/idle-v7.S b/arch/arm/mach-msm/idle-v7.S
index 0028286..b73ddc8 100644
--- a/arch/arm/mach-msm/idle-v7.S
+++ b/arch/arm/mach-msm/idle-v7.S
@@ -44,6 +44,15 @@
skip\@:
.endm
+/* Add NOPs for 8x25 target */
+.macro DELAY_8x25, rept
+#ifdef CONFIG_ARCH_MSM8625
+ .rept \rept
+ nop
+ .endr
+#endif
+.endm
+
ENTRY(msm_arch_idle)
wfi
#ifdef CONFIG_ARCH_MSM8X60
@@ -130,6 +139,7 @@
SET_SMP_COHERENCY OFF
wfi
+ DELAY_8x25 300
mcr p15, 0, r4, c1, c0, 0 /* restore d/i cache */
isb
diff --git a/arch/arm/mach-msm/pm2.c b/arch/arm/mach-msm/pm2.c
index 4a5078e..f4bfe23 100644
--- a/arch/arm/mach-msm/pm2.c
+++ b/arch/arm/mach-msm/pm2.c
@@ -1205,17 +1205,19 @@
*/
if (cpu_is_msm8625()) {
/*
- * on system reset default value of MPA5_GDFS_CNT_VAL
- * is = 0xFF, later power driver reprogrammed this
- * as: 0x000300FF. Currently based on the value of
- * MPA5_GDFS_CNT_VAL register decide whether it is
- * a modem early exit are not.
+ * on system reset, default value of MPA5_GDFS_CNT_VAL
+ * is = 0x0, later modem reprogram this value to
+ * 0x00030004. Once APPS did a power collapse and
+ * coming out of it expected value of this register
+ * always be 0x00030004. Incase if APPS sees the value
+ * as 0x00030002 consider this case as a modem early
+ * exit.
*/
val = __raw_readl(MSM_CFG_CTL_BASE + 0x38);
- if (val != 0xFF)
- modem_early_exit = 1;
- else
+ if (val != 0x00030002)
power_collapsed = 1;
+ else
+ modem_early_exit = 1;
}
#ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 0aa88ff..ed160f1 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1144,3 +1144,4 @@
msm8625_evb MACH_MSM8625_EVB MSM8625_EVB 4042
msm8625_qrd7 MACH_MSM8625_QRD7 MSM8625_QRD7 4095
msm8625_ffa MACH_MSM8625_FFA MSM8625_FFA 4166
+msm8625_evt MACH_MSM8625_EVT MSM8625_EVT 4193
diff --git a/drivers/media/video/msm/msm.c b/drivers/media/video/msm/msm.c
index 254cf3a..8720d70 100644
--- a/drivers/media/video/msm/msm.c
+++ b/drivers/media/video/msm/msm.c
@@ -1568,6 +1568,7 @@
struct msm_cam_v4l2_device *pcam = video_drvdata(f);
struct msm_cam_v4l2_dev_inst *pcam_inst;
struct msm_cam_media_controller *pmctl = NULL;
+ struct msm_cam_server_queue *queue = NULL;
D("%s\n", __func__);
@@ -1609,12 +1610,11 @@
pcam->vnode_id, pcam->use_count);
pcam->use_count++;
if (pcam->use_count == 1) {
- struct msm_cam_server_queue *queue;
pcam->server_queue_idx = server_q_idx;
queue = &g_server_dev.server_queue[server_q_idx];
queue->ctrl = NULL;
queue->ctrl_data = kzalloc(sizeof(uint8_t) *
- max_control_command_size, GFP_KERNEL);
+ max_control_command_size, GFP_KERNEL);
msm_queue_init(&queue->ctrl_q, "control");
msm_queue_init(&queue->eventData_q, "eventdata");
queue->queue_active = 1;
@@ -1623,7 +1623,7 @@
if (rc < 0) {
pr_err("%s: cam_server_open_session failed %d\n",
__func__, rc);
- goto err;
+ goto msm_cam_server_open_session_failed;
}
pmctl = msm_camera_get_mctl(pcam->mctl_handle);
@@ -1636,26 +1636,26 @@
/* Should be set to sensor ops if any but right now its OK!! */
if (!pmctl->mctl_open) {
- D("%s: media contoller is not inited\n",
- __func__);
+ D("%s: media contoller is not inited\n", __func__);
rc = -ENODEV;
- goto err;
+ goto mctl_open_failed;
}
/* Now we really have to activate the camera */
D("%s: call mctl_open\n", __func__);
rc = pmctl->mctl_open(pmctl, MSM_APPS_ID_V4L2);
-
if (rc < 0) {
pr_err("%s: HW open failed rc = 0x%x\n", __func__, rc);
- goto err;
+ goto mctl_open_failed;
}
pmctl->pcam_ptr = pcam;
rc = msm_setup_v4l2_event_queue(&pcam_inst->eventHandle,
- pcam->pvdev);
+ pcam->pvdev);
if (rc < 0) {
- goto err;
+ pr_err("%s: msm_setup_v4l2_event_queue failed %d",
+ __func__, rc);
+ goto mctl_event_q_setup_failed;
}
}
pcam_inst->vbqueue_initialized = 0;
@@ -1666,21 +1666,26 @@
D("f->private_data = 0x%x, pcam = 0x%x\n",
(u32)f->private_data, (u32)pcam_inst);
-
if (pcam->use_count == 1) {
rc = msm_send_open_server(pcam);
if (rc < 0) {
- mutex_unlock(&pcam->vid_lock);
- pr_err("%s failed\n", __func__);
- return rc;
+ pr_err("%s: msm_send_open_server failed %d\n",
+ __func__, rc);
+ goto msm_send_open_server_failed;
}
}
mutex_unlock(&pcam->vid_lock);
D("%s: end", __func__);
- /* rc = msm_cam_server_open_session(g_server_dev, pcam);*/
return rc;
-err:
+msm_send_open_server_failed:
+ v4l2_fh_del(&pcam_inst->eventHandle);
+ v4l2_fh_exit(&pcam_inst->eventHandle);
+mctl_event_q_setup_failed:
+ if (pmctl->mctl_release)
+ if (pmctl->mctl_release(pmctl) < 0)
+ pr_err("%s: mctl_release failed\n", __func__);
+mctl_open_failed:
if (pcam->use_count == 1) {
#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
if (ion_client_created) {
@@ -1688,6 +1693,20 @@
kref_put(&pmctl->refcount, msm_release_ion_client);
}
#endif
+ if (msm_cam_server_close_session(&g_server_dev, pcam) < 0)
+ pr_err("%s: msm_cam_server_close_session failed\n",
+ __func__);
+ }
+msm_cam_server_open_session_failed:
+ if (pcam->use_count == 1) {
+ queue->queue_active = 0;
+ msm_drain_eventq(&queue->eventData_q);
+ kfree(queue->ctrl_data);
+ queue->ctrl_data = NULL;
+ msm_queue_drain(&queue->ctrl_q, list_control);
+ msm_drain_eventq(&queue->eventData_q);
+ queue = NULL;
+
pcam->dev_inst[i] = NULL;
pcam->use_count = 0;
}
@@ -1909,16 +1928,18 @@
switch (cmd) {
case MSM_CAM_V4L2_IOCTL_GET_CAMERA_INFO:
if (copy_from_user(&temp_cam_info,
- (void __user *)ioctl_ptr->ioctl_ptr,
- sizeof(struct msm_camera_info))) {
+ (void __user *)ioctl_ptr->ioctl_ptr,
+ sizeof(struct msm_camera_info))) {
rc = -EINVAL;
return rc;
}
for (i = 0; i < g_server_dev.camera_info.num_cameras; i++) {
if (copy_to_user((void __user *)
- temp_cam_info.video_dev_name[i],
- g_server_dev.camera_info.video_dev_name[i],
- strlen(g_server_dev.camera_info.video_dev_name[i]))) {
+ temp_cam_info.video_dev_name[i],
+ g_server_dev.camera_info.video_dev_name[i],
+ strnlen(
+ g_server_dev.camera_info.video_dev_name[i],
+ MAX_DEV_NAME_LEN))) {
rc = -EINVAL;
return rc;
}
@@ -2059,6 +2080,7 @@
break;
}
default:
+ pr_err("%s: Invalid IOCTL = %d", __func__, cmd);
break;
}
return rc;
@@ -2152,7 +2174,7 @@
D("%s: cmd %d\n", __func__, _IOC_NR(cmd));
switch (cmd) {
- /* memory management shall be handeld here*/
+ /* memory management shall be handeld here*/
case MSM_CAM_IOCTL_REGISTER_PMEM:
return msm_register_pmem(
&config_cam->p_mctl->stats_info.pmem_stats_list,
@@ -2164,31 +2186,38 @@
&config_cam->p_mctl->stats_info.pmem_stats_list,
(void __user *)arg, config_cam->p_mctl->client);
break;
+
case VIDIOC_SUBSCRIBE_EVENT:
if (copy_from_user(&temp_sub,
(void __user *)arg,
sizeof(struct v4l2_event_subscription))) {
- rc = -EINVAL;
- return rc;
+ rc = -EINVAL;
+ return rc;
}
rc = msm_server_v4l2_subscribe_event
(&config_cam->config_stat_event_queue.eventHandle,
- &temp_sub);
- if (rc < 0)
+ &temp_sub);
+ if (rc < 0) {
+ pr_err("%s: cam_v4l2_subscribe_event failed rc=%d\n",
+ __func__, rc);
return rc;
+ }
break;
case VIDIOC_UNSUBSCRIBE_EVENT:
if (copy_from_user(&temp_sub, (void __user *)arg,
- sizeof(struct v4l2_event_subscription))) {
+ sizeof(struct v4l2_event_subscription))) {
rc = -EINVAL;
return rc;
}
rc = msm_server_v4l2_unsubscribe_event
(&config_cam->config_stat_event_queue.eventHandle,
- &temp_sub);
- if (rc < 0)
+ &temp_sub);
+ if (rc < 0) {
+ pr_err("%s: server_unsubscribe_event failed rc=%d\n",
+ __func__, rc);
return rc;
+ }
break;
case VIDIOC_DQEVENT: {
@@ -2334,8 +2363,8 @@
static int msm_open_config(struct inode *inode, struct file *fp)
{
int rc;
- struct msm_cam_config_dev *config_cam =
- container_of(inode->i_cdev, struct msm_cam_config_dev, config_cdev);
+ struct msm_cam_config_dev *config_cam = container_of(inode->i_cdev,
+ struct msm_cam_config_dev, config_cdev);
D("%s: open %s\n", __func__, fp->f_path.dentry->d_name.name);
@@ -2404,7 +2433,7 @@
};
int msm_setup_v4l2_event_queue(struct v4l2_fh *eventHandle,
- struct video_device *pvdev)
+ struct video_device *pvdev)
{
int rc = 0;
/* v4l2_fh support */
@@ -2414,6 +2443,7 @@
rc = v4l2_fh_init(eventHandle, pvdev);
if (rc < 0)
return rc;
+
if (eventHandle->events == NULL) {
rc = v4l2_event_init(eventHandle);
if (rc < 0)
@@ -2427,7 +2457,6 @@
v4l2_fh_add(eventHandle);
return rc;
-
}
static int msm_setup_config_dev(int node, char *device_name)
@@ -2448,8 +2477,8 @@
D("%s\n", __func__);
devno = MKDEV(MAJOR(msm_devno), dev_num+1);
- device_config = device_create(msm_class, NULL, devno, NULL,
- "%s%d", device_name, dev_num);
+ device_config = device_create(msm_class, NULL, devno, NULL, "%s%d",
+ device_name, dev_num);
if (IS_ERR(device_config)) {
rc = PTR_ERR(device_config);
@@ -2457,8 +2486,7 @@
goto config_setup_fail;
}
- cdev_init(&config_cam->config_cdev,
- &msm_fops_config);
+ cdev_init(&config_cam->config_cdev, &msm_fops_config);
config_cam->config_cdev.owner = THIS_MODULE;
rc = cdev_add(&config_cam->config_cdev, devno, 1);
@@ -2467,12 +2495,12 @@
device_destroy(msm_class, devno);
goto config_setup_fail;
}
- g_server_dev.config_info.config_dev_name[dev_num]
- = dev_name(device_config);
+
+ g_server_dev.config_info.config_dev_name[dev_num] =
+ dev_name(device_config);
D("%s Connected config device %s\n", __func__,
g_server_dev.config_info.config_dev_name[dev_num]);
- g_server_dev.config_info.config_dev_id[dev_num]
- = dev_num;
+ g_server_dev.config_info.config_dev_id[dev_num] = dev_num;
config_cam->config_stat_event_queue.pvdev = video_device_alloc();
if (config_cam->config_stat_event_queue.pvdev == NULL) {
@@ -2485,6 +2513,7 @@
config_cam->config_stat_event_queue.pvdev);
if (rc < 0) {
pr_err("%s failed to initialize event queue\n", __func__);
+ video_device_release(config_cam->config_stat_event_queue.pvdev);
goto config_setup_fail;
}
@@ -2493,7 +2522,6 @@
config_setup_fail:
kfree(config_cam);
return rc;
-
}
static void msm_cam_server_subdev_notify(struct v4l2_subdev *sd,
@@ -2697,13 +2725,13 @@
video_set_drvdata(g_server_dev.video_dev, &g_server_dev);
strlcpy(g_server_dev.media_dev.model, "qcamera",
- sizeof(g_server_dev.media_dev.model));
+ sizeof(g_server_dev.media_dev.model));
g_server_dev.media_dev.dev = &pdev->dev;
rc = media_device_register(&g_server_dev.media_dev);
g_server_dev.v4l2_dev.mdev = &g_server_dev.media_dev;
rc = video_register_device(g_server_dev.video_dev,
- VFL_TYPE_GRABBER, 100);
+ VFL_TYPE_GRABBER, 100);
mutex_init(&g_server_dev.server_lock);
mutex_init(&g_server_dev.server_queue_lock);
@@ -2719,8 +2747,11 @@
&g_server_dev.server_command_queue.eventHandle,
g_server_dev.server_command_queue.pvdev);
- if (rc < 0)
+ if (rc < 0) {
pr_err("%s failed to initialize event queue\n", __func__);
+ video_device_release(g_server_dev.server_command_queue.pvdev);
+ return rc;
+ }
for (i = 0; i < MAX_NUM_ACTIVE_CAMERA; i++) {
struct msm_cam_server_queue *queue;
diff --git a/drivers/media/video/msm/msm.h b/drivers/media/video/msm/msm.h
index 671dfd7..04e224c 100644
--- a/drivers/media/video/msm/msm.h
+++ b/drivers/media/video/msm/msm.h
@@ -244,7 +244,7 @@
struct v4l2_subdev *ispif_sdev; /* ispif sub device */
struct v4l2_subdev *gemini_sdev; /* gemini sub device */
struct v4l2_subdev *vpe_sdev; /* vpe sub device */
- struct v4l2_subdev *axi_sdev; /* vpe sub device */
+ struct v4l2_subdev *axi_sdev; /* axi sub device */
struct v4l2_subdev *eeprom_sdev; /* eeprom sub device */
struct msm_isp_ops *isp_sdev; /* isp sub device : camif/VFE */
diff --git a/drivers/media/video/msm/msm_mctl.c b/drivers/media/video/msm/msm_mctl.c
index d791771..e878063 100644
--- a/drivers/media/video/msm/msm_mctl.c
+++ b/drivers/media/video/msm/msm_mctl.c
@@ -583,23 +583,22 @@
if (rc < 0) {
pr_err("%s: msm_mctl_register_subdevs failed:%d\n",
__func__, rc);
- goto msm_open_done;
+ goto register_sdev_failed;
}
- /* then sensor - move sub dev later*/
+ /* then sensor - move sub dev later */
rc = v4l2_subdev_call(p_mctl->sensor_sdev, core, s_power, 1);
-
if (rc < 0) {
- pr_err("%s: isp init failed: %d\n", __func__, rc);
- goto msm_open_done;
+ pr_err("%s: sensor powerup failed: %d\n", __func__, rc);
+ goto sensor_sdev_failed;
}
+
if (p_mctl->act_sdev)
rc = v4l2_subdev_call(p_mctl->act_sdev,
- core, s_power, 1);
-
+ core, s_power, 1);
if (rc < 0) {
pr_err("%s: act power failed:%d\n", __func__, rc);
- goto msm_open_done;
+ goto act_power_up_failed;
}
if (camdev->is_csiphy) {
@@ -607,8 +606,8 @@
VIDIOC_MSM_CSIPHY_INIT, NULL);
if (rc < 0) {
pr_err("%s: csiphy initialization failed %d\n",
- __func__, rc);
- goto msm_open_done;
+ __func__, rc);
+ goto csiphy_init_failed;
}
}
@@ -617,17 +616,18 @@
VIDIOC_MSM_CSID_INIT, &csid_version);
if (rc < 0) {
pr_err("%s: csid initialization failed %d\n",
- __func__, rc);
- goto msm_open_done;
+ __func__, rc);
+ goto csid_init_failed;
}
}
+
if (camdev->is_csic) {
rc = v4l2_subdev_call(p_mctl->csic_sdev, core, ioctl,
VIDIOC_MSM_CSIC_INIT, &csid_version);
if (rc < 0) {
pr_err("%s: csic initialization failed %d\n",
- __func__, rc);
- goto msm_open_done;
+ __func__, rc);
+ goto csic_init_failed;
}
}
@@ -638,7 +638,7 @@
if (rc < 0) {
pr_err("%s: isp init failed: %d\n",
__func__, rc);
- goto msm_open_done;
+ goto isp_open_failed;
}
}
@@ -646,9 +646,9 @@
rc = v4l2_subdev_call(p_mctl->axi_sdev, core, ioctl,
VIDIOC_MSM_AXI_INIT, p_mctl);
if (rc < 0) {
- pr_err("%s: vpe initialization failed %d\n",
- __func__, rc);
- goto msm_open_done;
+ pr_err("%s: axi initialization failed %d\n",
+ __func__, rc);
+ goto axi_init_failed;
}
}
@@ -658,7 +658,7 @@
if (rc < 0) {
pr_err("%s: vpe initialization failed %d\n",
__func__, rc);
- goto msm_open_done;
+ goto vpe_init_failed;
}
}
@@ -667,23 +667,65 @@
VIDIOC_MSM_ISPIF_INIT, &csid_version);
if (rc < 0) {
pr_err("%s: ispif initialization failed %d\n",
- __func__, rc);
- goto msm_open_done;
+ __func__, rc);
+ goto ispif_init_failed;
}
}
if (camdev->is_ispif) {
pm_qos_add_request(&p_mctl->pm_qos_req_list,
- PM_QOS_CPU_DMA_LATENCY,
- PM_QOS_DEFAULT_VALUE);
+ PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);
pm_qos_update_request(&p_mctl->pm_qos_req_list,
- MSM_V4L2_SWFI_LATENCY);
+ MSM_V4L2_SWFI_LATENCY);
}
p_mctl->apps_id = apps_id;
p_mctl->opencnt++;
+ } else {
+ D("%s: camera is already open", __func__);
}
+ mutex_unlock(&p_mctl->lock);
-msm_open_done:
+ return rc;
+
+ispif_init_failed:
+ if (camdev->is_vpe)
+ if (v4l2_subdev_call(p_mctl->vpe_sdev, core, ioctl,
+ VIDIOC_MSM_VPE_RELEASE, NULL) < 0)
+ pr_err("%s: vpe release failed %d\n", __func__, rc);
+vpe_init_failed:
+ if (p_mctl->axi_sdev)
+ if (v4l2_subdev_call(p_mctl->axi_sdev, core, ioctl,
+ VIDIOC_MSM_AXI_RELEASE, NULL) < 0)
+ pr_err("%s: axi release failed %d\n", __func__, rc);
+axi_init_failed:
+ if (p_mctl->isp_sdev && p_mctl->isp_sdev->isp_release)
+ p_mctl->isp_sdev->isp_release(p_mctl->isp_sdev->sd);
+isp_open_failed:
+ if (camdev->is_csic)
+ if (v4l2_subdev_call(p_mctl->csic_sdev, core, ioctl,
+ VIDIOC_MSM_CSIC_RELEASE, NULL) < 0)
+ pr_err("%s: csic release failed %d\n", __func__, rc);
+csic_init_failed:
+ if (camdev->is_csid)
+ if (v4l2_subdev_call(p_mctl->csid_sdev, core, ioctl,
+ VIDIOC_MSM_CSID_RELEASE, NULL) < 0)
+ pr_err("%s: csid release failed %d\n", __func__, rc);
+csid_init_failed:
+ if (camdev->is_csiphy)
+ if (v4l2_subdev_call(p_mctl->csiphy_sdev, core, ioctl,
+ VIDIOC_MSM_CSIPHY_RELEASE, NULL) < 0)
+ pr_err("%s: csiphy release failed %d\n", __func__, rc);
+csiphy_init_failed:
+ if (p_mctl->act_sdev)
+ if (v4l2_subdev_call(p_mctl->act_sdev, core,
+ s_power, 0) < 0)
+ pr_err("%s: act power down failed:%d\n", __func__, rc);
+act_power_up_failed:
+ if (v4l2_subdev_call(p_mctl->sensor_sdev, core, s_power, 0) < 0)
+ pr_err("%s: sensor powerdown failed: %d\n", __func__, rc);
+sensor_sdev_failed:
+register_sdev_failed:
+ wake_unlock(&p_mctl->wake_lock);
mutex_unlock(&p_mctl->lock);
return rc;
}
diff --git a/drivers/media/video/msm/msm_vfe32.c b/drivers/media/video/msm/msm_vfe32.c
index e265b25..becdd95 100644
--- a/drivers/media/video/msm/msm_vfe32.c
+++ b/drivers/media/video/msm/msm_vfe32.c
@@ -4177,16 +4177,18 @@
switch (cmd) {
case VIDIOC_MSM_AXI_INIT:
rc = msm_axi_subdev_init(sd,
- (struct msm_cam_media_controller *)arg);
+ (struct msm_cam_media_controller *)arg);
break;
case VIDIOC_MSM_AXI_CFG:
rc = msm_axi_config(sd, arg);
break;
case VIDIOC_MSM_AXI_IRQ:
msm_axi_process_irq(sd, arg);
+ rc = 0;
break;
case VIDIOC_MSM_AXI_RELEASE:
msm_axi_subdev_release(sd);
+ rc = 0;
break;
default:
pr_err("%s: command not found\n", __func__);
diff --git a/drivers/media/video/msm/sensors/msm_sensor.c b/drivers/media/video/msm/sensors/msm_sensor.c
index d4d07cd..ff5bb49 100644
--- a/drivers/media/video/msm/sensors/msm_sensor.c
+++ b/drivers/media/video/msm/sensors/msm_sensor.c
@@ -587,6 +587,7 @@
msm_sensor_enable_i2c_mux(data->sensor_platform_info->i2c_conf);
return rc;
+
enable_clk_failed:
msm_camera_config_gpio_table(data, 0);
config_gpio_failed:
@@ -643,13 +644,14 @@
s_ctrl->sensor_id_info->sensor_id_reg_addr, &chipid,
MSM_CAMERA_I2C_WORD_DATA);
if (rc < 0) {
- CDBG("%s: read id failed\n", __func__);
+ pr_err("%s: %s: read id failed\n", __func__,
+ s_ctrl->sensordata->sensor_name);
return rc;
}
CDBG("msm_sensor id: %d\n", chipid);
if (chipid != s_ctrl->sensor_id_info->sensor_id) {
- CDBG("msm_sensor_match_id chip id doesnot match\n");
+ pr_err("msm_sensor_match_id chip id doesnot match\n");
return -ENODEV;
}
return rc;
@@ -726,10 +728,30 @@
int rc = 0;
struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd);
mutex_lock(s_ctrl->msm_sensor_mutex);
- if (on)
+ if (on) {
rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl);
- else
+ if (rc < 0) {
+ pr_err("%s: %s power_up failed rc = %d\n", __func__,
+ s_ctrl->sensordata->sensor_name, rc);
+ } else {
+ if (s_ctrl->func_tbl->sensor_match_id)
+ rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl);
+ else
+ rc = msm_sensor_match_id(s_ctrl);
+ if (rc < 0) {
+ pr_err("%s: %s match_id failed rc=%d\n",
+ __func__,
+ s_ctrl->sensordata->sensor_name, rc);
+ if (s_ctrl->func_tbl->sensor_power_down(s_ctrl)
+ < 0)
+ pr_err("%s: %s power_down failed\n",
+ __func__,
+ s_ctrl->sensordata->sensor_name);
+ }
+ }
+ } else {
rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl);
+ }
mutex_unlock(s_ctrl->msm_sensor_mutex);
return rc;
}
diff --git a/drivers/mfd/pm8xxx-misc.c b/drivers/mfd/pm8xxx-misc.c
index a311029..080a87c 100644
--- a/drivers/mfd/pm8xxx-misc.c
+++ b/drivers/mfd/pm8xxx-misc.c
@@ -145,6 +145,11 @@
#define MP3_1_SHIFT 5
#define MP3_2_SHIFT 2
+#define REG_HSED_BIAS0_CNTL2 0xA1
+#define REG_HSED_BIAS1_CNTL2 0x135
+#define REG_HSED_BIAS2_CNTL2 0x138
+#define HSED_EN_MASK 0xC0
+
struct pm8xxx_misc_chip {
struct list_head link;
struct pm8xxx_misc_platform_data pdata;
@@ -1100,6 +1105,52 @@
}
EXPORT_SYMBOL_GPL(pm8xxx_aux_clk_control);
+int pm8xxx_hsed_bias_control(enum pm8xxx_hsed_bias bias, bool enable)
+{
+ struct pm8xxx_misc_chip *chip;
+ unsigned long flags;
+ int rc = 0;
+ u16 addr;
+
+ switch (bias) {
+ case PM8XXX_HSED_BIAS0:
+ addr = REG_HSED_BIAS0_CNTL2;
+ break;
+ case PM8XXX_HSED_BIAS1:
+ addr = REG_HSED_BIAS1_CNTL2;
+ break;
+ case PM8XXX_HSED_BIAS2:
+ addr = REG_HSED_BIAS2_CNTL2;
+ break;
+ default:
+ pr_err("Invalid BIAS line\n");
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&pm8xxx_misc_chips_lock, flags);
+
+ /* Loop over all attached PMICs and call specific functions for them. */
+ list_for_each_entry(chip, &pm8xxx_misc_chips, link) {
+ switch (chip->version) {
+ case PM8XXX_VERSION_8058:
+ case PM8XXX_VERSION_8921:
+ rc = pm8xxx_misc_masked_write(chip, addr,
+ HSED_EN_MASK, enable ? HSED_EN_MASK : 0);
+ if (rc < 0)
+ pr_err("Enable HSED BIAS failed rc=%d\n", rc);
+ break;
+ default:
+ /* Functionality not supported */
+ break;
+ }
+ }
+
+ spin_unlock_irqrestore(&pm8xxx_misc_chips_lock, flags);
+
+ return rc;
+}
+EXPORT_SYMBOL(pm8xxx_hsed_bias_control);
+
static int __devinit pm8xxx_misc_probe(struct platform_device *pdev)
{
const struct pm8xxx_misc_platform_data *pdata = pdev->dev.platform_data;
diff --git a/include/linux/mfd/pm8xxx/misc.h b/include/linux/mfd/pm8xxx/misc.h
index 77683ce..c4b0ea4 100644
--- a/include/linux/mfd/pm8xxx/misc.h
+++ b/include/linux/mfd/pm8xxx/misc.h
@@ -89,6 +89,12 @@
XO_DIV_64,
};
+enum pm8xxx_hsed_bias {
+ PM8XXX_HSED_BIAS0,
+ PM8XXX_HSED_BIAS1,
+ PM8XXX_HSED_BIAS2,
+};
+
#if defined(CONFIG_MFD_PM8XXX_MISC) || defined(CONFIG_MFD_PM8XXX_MISC_MODULE)
/**
@@ -210,6 +216,14 @@
enum pm8xxx_aux_clk_div divider,
bool enable);
+/**
+ * pm8xxx_hsed_bias_control - Control the HSED_BIAS signal
+ * @bias: the bias line to be controlled (of the 3)
+ * @enable: enable/disable the bias line
+ *
+ * RETURNS: an appropriate -ERRNO error value on error, or zero for success.
+ */
+int pm8xxx_hsed_bias_control(enum pm8xxx_hsed_bias bias, bool enable);
#else
static inline int pm8xxx_reset_pwr_off(int reset)
@@ -259,6 +273,11 @@
{
return -ENODEV;
}
+static inline int pm8xxx_hsed_bias_control(enum pm8xxx_hsed_bias bias,
+ bool enable)
+{
+ return -ENODEV;
+}
#endif
diff --git a/sound/soc/codecs/wcd9304.c b/sound/soc/codecs/wcd9304.c
index 4b6d83b..9041bd7 100644
--- a/sound/soc/codecs/wcd9304.c
+++ b/sound/soc/codecs/wcd9304.c
@@ -1498,7 +1498,7 @@
struct sitar_priv *sitar = snd_soc_codec_get_drvdata(codec);
unsigned int cfilt;
- switch (sitar->micbias) {
+ switch (sitar->mbhc_cfg.micbias) {
case SITAR_MICBIAS1:
cfilt = sitar->pdata->micbias.bias1_cfilt_sel;
micbias_regs->mbhc_reg = SITAR_A_MICB_1_MBHC;
diff --git a/sound/soc/msm/apq8064.c b/sound/soc/msm/apq8064.c
index b0244af..f8ddb0b 100644
--- a/sound/soc/msm/apq8064.c
+++ b/sound/soc/msm/apq8064.c
@@ -845,6 +845,13 @@
user_set_tx_ch = msm_slim_0_tx_ch;
else if (codec_dai->id == 4)
user_set_tx_ch = params_channels(params);
+ else if (codec_dai->id == 5) {
+ /* DAI 5 is used for external EC reference from codec.
+ * Since Rx is fed as reference for EC, the config of
+ * this DAI is based on that of the Rx path.
+ */
+ user_set_tx_ch = msm_slim_0_rx_ch;
+ }
pr_debug("%s: %s_tx_dai_id_%d_ch=%d\n", __func__,
codec_dai->name, codec_dai->id, user_set_tx_ch);
@@ -1505,7 +1512,7 @@
.codec_name = "tabla_codec",
.codec_dai_name = "tabla_rx2",
.no_pcm = 1,
- /* .be_id = do not care */
+ .be_id = MSM_BACKEND_DAI_EXTPROC_RX,
.be_hw_params_fixup = msm_slim_0_rx_be_hw_params_fixup,
.init = &msm_stubrx_init,
.ops = &msm_be_ops,
@@ -1518,7 +1525,7 @@
.codec_name = "tabla_codec",
.codec_dai_name = "tabla_tx1",
.no_pcm = 1,
- /* .be_id = do not care */
+ .be_id = MSM_BACKEND_DAI_EXTPROC_TX,
.be_hw_params_fixup = msm_slim_0_tx_be_hw_params_fixup,
.ops = &msm_be_ops,
},
@@ -1588,6 +1595,22 @@
.init = &msm_incall_rec_init,
.ops = &msm_slimbus_4_be_ops,
},
+ {
+ .name = LPASS_BE_STUB_1_TX,
+ .stream_name = "Stub1 Capture",
+ .cpu_dai_name = "msm-dai-stub",
+ .platform_name = "msm-pcm-routing",
+ .codec_name = "tabla_codec",
+ .codec_dai_name = "tabla_tx3",
+ .no_pcm = 1,
+ .be_id = MSM_BACKEND_DAI_EXTPROC_EC_TX,
+ /* This BE is used for external EC reference from codec. Since
+ * Rx is fed as reference for EC, the config of this DAI is
+ * based on that of the Rx path.
+ */
+ .be_hw_params_fixup = msm_slim_0_rx_be_hw_params_fixup,
+ .ops = &msm_be_ops,
+ },
};
struct snd_soc_card snd_soc_card_msm = {
diff --git a/sound/soc/msm/msm-pcm-routing.c b/sound/soc/msm/msm-pcm-routing.c
index 4f0e952..7cb58cb 100644
--- a/sound/soc/msm/msm-pcm-routing.c
+++ b/sound/soc/msm/msm-pcm-routing.c
@@ -135,6 +135,8 @@
{ SLIMBUS_4_RX, 0, 0, 0, 0, 0},
{ SLIMBUS_4_TX, 0, 0, 0, 0, 0},
{ SLIMBUS_EXTPROC_RX, 0, 0, 0, 0, 0},
+ { SLIMBUS_EXTPROC_RX, 0, 0, 0, 0, 0},
+ { SLIMBUS_EXTPROC_RX, 0, 0, 0, 0, 0},
};
@@ -150,6 +152,16 @@
{INVALID_SESSION, INVALID_SESSION},
};
+static uint8_t is_be_dai_extproc(int be_dai)
+{
+ if (be_dai == MSM_BACKEND_DAI_EXTPROC_RX ||
+ be_dai == MSM_BACKEND_DAI_EXTPROC_TX ||
+ be_dai == MSM_BACKEND_DAI_EXTPROC_EC_TX)
+ return 1;
+ else
+ return 0;
+}
+
static void msm_pcm_routing_build_matrix(int fedai_id, int dspst_id,
int path_type)
{
@@ -161,7 +173,7 @@
MSM_AFE_PORT_TYPE_RX : MSM_AFE_PORT_TYPE_TX);
for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if ((i != MSM_BACKEND_DAI_EXTPROC_RX) &&
+ if (!is_be_dai_extproc(i) &&
(afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
(msm_bedais[i].active) &&
(test_bit(fedai_id, &msm_bedais[i].fe_sessions)))
@@ -200,7 +212,7 @@
fe_dai_map[fedai_id][session_type] = dspst_id;
for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if ((i != MSM_BACKEND_DAI_EXTPROC_RX) &&
+ if (!is_be_dai_extproc(i) &&
(afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
(msm_bedais[i].active) &&
(test_bit(fedai_id, &msm_bedais[i].fe_sessions))) {
@@ -243,7 +255,7 @@
if (eq_data[fedai_id].enable)
msm_send_eq_values(fedai_id);
for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if ((i != MSM_BACKEND_DAI_EXTPROC_RX) &&
+ if (!is_be_dai_extproc(i) &&
(afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
(msm_bedais[i].active) &&
(test_bit(fedai_id, &msm_bedais[i].fe_sessions))) {
@@ -296,7 +308,7 @@
mutex_lock(&routing_lock);
for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if ((i != MSM_BACKEND_DAI_EXTPROC_RX) &&
+ if (!is_be_dai_extproc(i) &&
(afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
(msm_bedais[i].active) &&
(test_bit(fedai_id, &msm_bedais[i].fe_sessions)))
@@ -1227,7 +1239,7 @@
};
static const struct snd_kcontrol_new tx_voice_stub_mixer_controls[] = {
- SOC_SINGLE_EXT("STUB_TX_HL", MSM_BACKEND_DAI_EXTPROC_RX,
+ SOC_SINGLE_EXT("STUB_TX_HL", MSM_BACKEND_DAI_EXTPROC_TX,
MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
msm_routing_put_voice_stub_mixer),
SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX,
@@ -1236,6 +1248,9 @@
SOC_SINGLE_EXT("SLIM_1_TX", MSM_BACKEND_DAI_SLIMBUS_1_TX,
MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
msm_routing_put_voice_stub_mixer),
+ SOC_SINGLE_EXT("STUB_1_TX_HL", MSM_BACKEND_DAI_EXTPROC_EC_TX,
+ MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
+ msm_routing_put_voice_stub_mixer),
};
static const struct snd_kcontrol_new sbus_0_rx_port_mixer_controls[] = {
@@ -1580,6 +1595,7 @@
SND_SOC_DAPM_AIF_IN("STUB_TX", "Stub Capture", 0, 0, 0, 0),
SND_SOC_DAPM_AIF_OUT("SLIMBUS_1_RX", "Slimbus1 Playback", 0, 0, 0, 0),
SND_SOC_DAPM_AIF_IN("SLIMBUS_1_TX", "Slimbus1 Capture", 0, 0, 0, 0),
+ SND_SOC_DAPM_AIF_IN("STUB_1_TX", "Stub1 Capture", 0, 0, 0, 0),
/* Switch Definitions */
SND_SOC_DAPM_SWITCH("SLIMBUS_DL_HL", SND_SOC_NOPM, 0, 0,
@@ -1845,6 +1861,7 @@
{"Voice Stub Tx Mixer", "STUB_TX_HL", "STUB_TX"},
{"Voice Stub Tx Mixer", "SLIM_1_TX", "SLIMBUS_1_TX"},
{"Voice Stub Tx Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
+ {"Voice Stub Tx Mixer", "STUB_1_TX_HL", "STUB_1_TX"},
{"VOICE_STUB_UL", NULL, "Voice Stub Tx Mixer"},
{"STUB_RX Mixer", "Voice Stub", "VOICE_STUB_DL"},
diff --git a/sound/soc/msm/msm-pcm-routing.h b/sound/soc/msm/msm-pcm-routing.h
index b7c7631..26ce53c 100644
--- a/sound/soc/msm/msm-pcm-routing.h
+++ b/sound/soc/msm/msm-pcm-routing.h
@@ -37,6 +37,7 @@
#define LPASS_BE_STUB_TX "(Backend) STUB_TX"
#define LPASS_BE_SLIMBUS_1_RX "(Backend) SLIMBUS_1_RX"
#define LPASS_BE_SLIMBUS_1_TX "(Backend) SLIMBUS_1_TX"
+#define LPASS_BE_STUB_1_TX "(Backend) STUB_1_TX"
#define LPASS_BE_SLIMBUS_4_RX "(Backend) SLIMBUS_4_RX"
#define LPASS_BE_SLIMBUS_4_TX "(Backend) SLIMBUS_4_TX"
@@ -89,6 +90,8 @@
MSM_BACKEND_DAI_SLIMBUS_4_RX,
MSM_BACKEND_DAI_SLIMBUS_4_TX,
MSM_BACKEND_DAI_EXTPROC_RX,
+ MSM_BACKEND_DAI_EXTPROC_TX,
+ MSM_BACKEND_DAI_EXTPROC_EC_TX,
MSM_BACKEND_DAI_MAX,
};