Commit 10f514bd authored by Neil Armstrong's avatar Neil Armstrong Committed by Mark Brown

ASoC: codecs: Add WCD939x Codec driver

Add the main WCD9390/WCD9395 Audio Codec driver to support:
- 4 ADC inputs for up to 5 Analog Microphones
- 4 DMIC inputs for up to 8 Digital Microphones
- 4 Microphone BIAS
- Stereo Headphone output
- Mono EAR output
- MBHC engine for Headset Detection

It makes usage of the generic MBHC and CLSH generic code and
the USB Type-C mux and switch helpers to gather USB-C Events
in order to properly setup Headset Detection mechanism
when connected behind the separate USB-C Mux subsystem.

WCD9390/WCD9395 supports a PCM path for Playback instead
of the actually implemented PDM playback, it will be
implemented later.
Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20231219-topic-sm8650-upstream-wcd939x-codec-v4-5-1c3bbff2d7ab@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent be2af391
...@@ -2060,8 +2060,17 @@ config SND_SOC_WCD938X_SDW ...@@ -2060,8 +2060,17 @@ config SND_SOC_WCD938X_SDW
The WCD9380/9385 is a audio codec IC Integrated in The WCD9380/9385 is a audio codec IC Integrated in
Qualcomm SoCs like SM8250. Qualcomm SoCs like SM8250.
config SND_SOC_WCD939X
depends on SND_SOC_WCD939X_SDW
tristate
depends on SOUNDWIRE || !SOUNDWIRE
depends on TYPEC || !TYPEC
select SND_SOC_WCD_CLASSH
config SND_SOC_WCD939X_SDW config SND_SOC_WCD939X_SDW
tristate "WCD9390/WCD9395 Codec - SDW" tristate "WCD9390/WCD9395 Codec - SDW"
select SND_SOC_WCD939X
select SND_SOC_WCD_MBHC
select REGMAP_IRQ select REGMAP_IRQ
depends on SOUNDWIRE depends on SOUNDWIRE
select REGMAP_SOUNDWIRE select REGMAP_SOUNDWIRE
......
...@@ -313,6 +313,7 @@ snd-soc-wcd9335-objs := wcd9335.o ...@@ -313,6 +313,7 @@ snd-soc-wcd9335-objs := wcd9335.o
snd-soc-wcd934x-objs := wcd934x.o snd-soc-wcd934x-objs := wcd934x.o
snd-soc-wcd938x-objs := wcd938x.o snd-soc-wcd938x-objs := wcd938x.o
snd-soc-wcd938x-sdw-objs := wcd938x-sdw.o snd-soc-wcd938x-sdw-objs := wcd938x-sdw.o
snd-soc-wcd939x-objs := wcd939x.o
snd-soc-wcd939x-sdw-objs := wcd939x-sdw.o snd-soc-wcd939x-sdw-objs := wcd939x-sdw.o
snd-soc-wl1273-objs := wl1273.o snd-soc-wl1273-objs := wl1273.o
snd-soc-wm-adsp-objs := wm_adsp.o snd-soc-wm-adsp-objs := wm_adsp.o
...@@ -704,6 +705,11 @@ ifdef CONFIG_SND_SOC_WCD938X_SDW ...@@ -704,6 +705,11 @@ ifdef CONFIG_SND_SOC_WCD938X_SDW
# avoid link failure by forcing sdw code built-in when needed # avoid link failure by forcing sdw code built-in when needed
obj-$(CONFIG_SND_SOC_WCD938X) += snd-soc-wcd938x-sdw.o obj-$(CONFIG_SND_SOC_WCD938X) += snd-soc-wcd938x-sdw.o
endif endif
obj-$(CONFIG_SND_SOC_WCD939X) += snd-soc-wcd939x.o
ifdef CONFIG_SND_SOC_WCD939X_SDW
# avoid link failure by forcing sdw code built-in when needed
obj-$(CONFIG_SND_SOC_WCD939X) += snd-soc-wcd939x-sdw.o
endif
obj-$(CONFIG_SND_SOC_WL1273) += snd-soc-wl1273.o obj-$(CONFIG_SND_SOC_WL1273) += snd-soc-wl1273.o
obj-$(CONFIG_SND_SOC_WM0010) += snd-soc-wm0010.o obj-$(CONFIG_SND_SOC_WM0010) += snd-soc-wm0010.o
obj-$(CONFIG_SND_SOC_WM1250_EV1) += snd-soc-wm1250-ev1.o obj-$(CONFIG_SND_SOC_WM1250_EV1) += snd-soc-wm1250-ev1.o
......
...@@ -47,6 +47,7 @@ enum wcd_codec_version { ...@@ -47,6 +47,7 @@ enum wcd_codec_version {
/* New CLSH after this */ /* New CLSH after this */
WCD937X = 2, WCD937X = 2,
WCD938X = 3, WCD938X = 3,
WCD939X = 4,
}; };
struct wcd_clsh_ctrl; struct wcd_clsh_ctrl;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment