Skip to content

Commit

Permalink
ASoC: Add AK4375 support
Browse files Browse the repository at this point in the history
AK4375 is a 32-bit stereo DAC with headphones amplifier.
There's no documentation for it on akm.com, and only a brief
datasheet can be found floating on the internets [1].

Thanks to Oriane BAYERD <obayerd@eurocomposant.fr>
for finally answering my inquiries through akm.com, if only to tell
me that this chip is EOL following AKM factory burning in october 2020
and thus no detailed documentation is available anymore...

AK4331 is advertised [2] as pin and register compatible with AK4375
so some scraps of its datasheet were used and this driver might be
used as a base for it, but this is totally untested.

So this driver is mainly based on downstream code [3] and [4]
by Hu Jin from AKM (no known email).

Tested on msm8916-alcatel-idol347 and msm8939-alcatel-idol3,
which both use PLL driven clock with bypass of SRC (sample rate
converter), so only this setup is supported for now.

[1] https://datasheetspdf.com/pdf-file/1400317/AKM/AK4375A/1
[2] https://www.akm.com/content/dam/documents/products/audio/audio-dac/ak4331ecb/ak4331ecb-en-datasheet.pdf
[3] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/alcatel-idol347/sound/soc/codecs/idol347/ak4375.c
[4] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/alcatel-idol347/sound/soc/codecs/ak4375.c

Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
Link: https://lore.kernel.org/r/20211220193725.2650356-2-vincent.knecht@mailoo.org
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Vincent Knecht authored and Mark Brown committed Dec 21, 2021
1 parent 70ba14c commit 53778b8
Show file tree
Hide file tree
Showing 3 changed files with 632 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config SND_SOC_ALL_CODECS
imply SND_SOC_ADS117X
imply SND_SOC_AK4104
imply SND_SOC_AK4118
imply SND_SOC_AK4375
imply SND_SOC_AK4458
imply SND_SOC_AK4535
imply SND_SOC_AK4554
Expand Down Expand Up @@ -523,6 +524,16 @@ config SND_SOC_AK4118
depends on I2C
select REGMAP_I2C

config SND_SOC_AK4375
tristate "AKM AK4375 CODEC"
depends on I2C
select REGMAP_I2C
help
Enable support for the Asahi-Kasei AK4375 codec.

To compile this driver as a module, choose M here: the module
will be called snd-soc-ak4375.

config SND_SOC_AK4458
tristate "AKM AK4458 CODEC"
depends on I2C
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ snd-soc-adav803-objs := adav803.o
snd-soc-ads117x-objs := ads117x.o
snd-soc-ak4104-objs := ak4104.o
snd-soc-ak4118-objs := ak4118.o
snd-soc-ak4375-objs := ak4375.o
snd-soc-ak4458-objs := ak4458.o
snd-soc-ak4535-objs := ak4535.o
snd-soc-ak4554-objs := ak4554.o
Expand Down Expand Up @@ -371,6 +372,7 @@ obj-$(CONFIG_SND_SOC_ADAV803) += snd-soc-adav803.o
obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o
obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o
obj-$(CONFIG_SND_SOC_AK4118) += snd-soc-ak4118.o
obj-$(CONFIG_SND_SOC_AK4375) += snd-soc-ak4375.o
obj-$(CONFIG_SND_SOC_AK4458) += snd-soc-ak4458.o
obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o
obj-$(CONFIG_SND_SOC_AK4554) += snd-soc-ak4554.o
Expand Down
Loading

0 comments on commit 53778b8

Please sign in to comment.