[Feature][ZXW-29]add voice config and codec support
Change-Id: If6162ece461d2158949dc42b7c47e5596833d14b
diff --git a/ap/os/linux/linux-3.4.x/sound/soc/sanechips/zx297520v3_nau8810.c b/ap/os/linux/linux-3.4.x/sound/soc/sanechips/zx297520v3_nau8810.c
index 08db05c..b5a5715 100644
--- a/ap/os/linux/linux-3.4.x/sound/soc/sanechips/zx297520v3_nau8810.c
+++ b/ap/os/linux/linux-3.4.x/sound/soc/sanechips/zx297520v3_nau8810.c
@@ -373,6 +373,8 @@
static int zx297520v3_nau8810_setup_pins(struct zx297520v3_nau8810_platform_data *codec_pins, char *fun)
{
int ret;
+//xf.li@20230428 modify for codec start
+ u32 aon_clk_out2_sel = 0;
ret = gpio_request(ZX29_GPIO_17, "codec_refclk");
if (ret < 0) {
@@ -380,7 +382,11 @@
return ret;
}
zx29_gpio_config(ZX29_GPIO_17, GPIO17_CLK_OUT2);
+ aon_clk_out2_sel = ioread32(ZX_TOP_CRM_BASE+0x94);
+ aon_clk_out2_sel |= (1<<0) | (1<<2);
+ iowrite32(aon_clk_out2_sel,(ZX_TOP_CRM_BASE+0x94));
+//xf.li@20230428 modify for codec end
return 0;
}
diff --git a/ap/project/zx297520v3/prj_vehicle_dc/config/normal/config.linux b/ap/project/zx297520v3/prj_vehicle_dc/config/normal/config.linux
index a26b56c..24d8cc3 100755
--- a/ap/project/zx297520v3/prj_vehicle_dc/config/normal/config.linux
+++ b/ap/project/zx297520v3/prj_vehicle_dc/config/normal/config.linux
@@ -1397,7 +1397,93 @@
# CONFIG_FB is not set
# CONFIG_EXYNOS_VIDEO is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-# CONFIG_SOUND is not set
+#xf.li@20230428 add for codec start
+CONFIG_SOUND=y
+
+# CONFIG_SOUND_OSS_CORE is not set
+
+CONFIG_SND=y
+
+CONFIG_SND_TIMER=y
+
+CONFIG_SND_PCM=y
+
+CONFIG_SND_JACK=y
+
+# CONFIG_SND_SEQUENCER is not set
+
+# CONFIG_SND_MIXER_OSS is not set
+
+# CONFIG_SND_PCM_OSS is not set
+
+# CONFIG_SND_HRTIMER is not set
+
+# CONFIG_SND_DYNAMIC_MINORS is not set
+
+CONFIG_SND_SUPPORT_OLD_API=y
+
+CONFIG_SND_VERBOSE_PROCFS=y
+
+# CONFIG_SND_VERBOSE_PRINTK is not set
+
+# CONFIG_SND_DEBUG is not set
+
+# CONFIG_SND_RAWMIDI_SEQ is not set
+
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+
+# CONFIG_SND_SBAWE_SEQ is not set
+
+# CONFIG_SND_EMU10K1_SEQ is not set
+
+CONFIG_SND_DRIVERS=y
+
+# CONFIG_SND_DUMMY is not set
+
+# CONFIG_SND_ALOOP is not set
+
+# CONFIG_SND_MTPAV is not set
+
+# CONFIG_SND_SERIAL_U16550 is not set
+
+# CONFIG_SND_MPU401 is not set
+
+CONFIG_SND_ARM=y
+
+CONFIG_SND_SPI=y
+
+CONFIG_SND_SOC=y
+
+CONFIG_SND_SOC_SANECHIPS=y
+
+# CONFIG_SND_SOC_ZX297520V3_TI3100 is not set
+
+CONFIG_SND_SOC_ZX297520V3_NAU8810=y
+
+# CONFIG_SND_SOC_ZX297520V3_ES8374 is not set
+
+# CONFIG_SND_SOC_ZX297520V3_ES8312 is not set
+
+CONFIG_SND_SOC_ZX_VOICE=y
+
+CONFIG_SND_SOC_ZX297520V3=y
+
+CONFIG_SND_SOC_ZX_I2S=y
+
+CONFIG_SND_SOC_ZX_PCM=y
+
+CONFIG_SND_SOC_NAU8810=y
+
+# CONFIG_SND_EXTRA_CTRL is not set
+
+CONFIG_SND_SOC_I2C_AND_SPI=y
+
+# CONFIG_SND_SOC_ALL_CODECS is not set
+
+# CONFIG_SOUND_PRIME is not set
+#xf.li@20230428 add for codec end
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_ARCH_HAS_OHCI is not set
# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -1635,7 +1721,11 @@
#
# ZX297520 volte driver
#
-# CONFIG_VOLTE_DRV is not set
+#xf.li@20230428 add for add voice config start
+CONFIG_VOLTE_DRV=y
+
+CONFIG_VOICE_DRV=y
+#xf.li@20230428 add for add voice config end
#
# ZX297520V3 camera driver