ASoC: msm: Add incall recording support
Add two backend DAIs, and add two mixer controls to route
capture stream to the new backend DAIs. Start/stop record
commands will be sent to CVD if starting/stoping recording,
after voice call is established.
Change-Id: Iabff5390ca8c50ba05ae2dfa31fa3f1a8797f1db
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8960.c b/arch/arm/mach-msm/board-8960.c
index bd39579..e6ca8e0c 100644
--- a/arch/arm/mach-msm/board-8960.c
+++ b/arch/arm/mach-msm/board-8960.c
@@ -1772,6 +1772,8 @@
&msm_lpa_pcm,
&msm_compr_dsp,
&msm_cpudai_incall_music_rx,
+ &msm_cpudai_incall_record_rx,
+ &msm_cpudai_incall_record_tx,
#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE)
@@ -1833,6 +1835,8 @@
&msm_pcm_afe,
&msm_compr_dsp,
&msm_cpudai_incall_music_rx,
+ &msm_cpudai_incall_record_rx,
+ &msm_cpudai_incall_record_tx,
&msm_pcm_hostless,
&msm_bus_apps_fabric,
&msm_bus_sys_fabric,
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index 0bb159a..2d06d97 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -1425,6 +1425,16 @@
.id = 0x8005,
};
+struct platform_device msm_cpudai_incall_record_rx = {
+ .name = "msm-dai-q6",
+ .id = 0x8004,
+};
+
+struct platform_device msm_cpudai_incall_record_tx = {
+ .name = "msm-dai-q6",
+ .id = 0x8003,
+};
+
/*
* Machine specific data for AUX PCM Interface
* which the driver will be unware of.
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 384aced..0d6aa09 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -174,6 +174,8 @@
extern struct platform_device msm_pcm_afe;
extern struct platform_device msm_compr_dsp;
extern struct platform_device msm_cpudai_incall_music_rx;
+extern struct platform_device msm_cpudai_incall_record_rx;
+extern struct platform_device msm_cpudai_incall_record_tx;
extern struct platform_device msm_pil_q6v3;
extern struct platform_device msm_8960_q6_lpass;