ASoC:Add support for cs42l73 codec
Subsystems (3)
PATCH v6 1/1 ASoC:Add support for cs42l73 codec
This patch adds support for Cirrus Logic CS42L73
low power stereo codec
--- sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs42l73.c | 1255 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs42l73.h | 227 ++++++++ 4 files changed, 1488 insertions(+), 0 deletions(-) create mode 100644 sound/soc/codecs/cs42l73.c create mode 100644 sound/soc/codecs/cs42l73.h
sound/soc/codecs/Kconfig +4 -0
@@ -28,6 +28,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_ALC5623 if I2C select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC select SND_SOC_CS42L51 if I2C + select SND_SOC_CS42L73 if I2C select SND_SOC_CS4270 if I2C select SND_SOC_CS4271 if SND_SOC_I2C_AND_SPI select SND_SOC_CX20442
@@ -175,6 +176,9 @@ config SND_SOC_CQ0093VC config SND_SOC_CS42L51 tristate +config SND_SOC_CS42L73 + tristate + # Cirrus Logic CS4270 Codec config SND_SOC_CS4270 tristate
sound/soc/codecs/Makefile +2 -0
@@ -15,6 +15,7 @@ snd-soc-ak4642-objs := ak4642.o snd-soc-ak4671-objs := ak4671.o snd-soc-cq93vc-objs := cq93vc.o snd-soc-cs42l51-objs := cs42l51.o +snd-soc-cs42l73-objs := cs42l73.o snd-soc-cs4270-objs := cs4270.o snd-soc-cs4271-objs := cs4271.o snd-soc-cx20442-objs := cx20442.o
@@ -115,6 +116,7 @@ obj-$(CONFIG_SND_SOC_AK4671) += snd-soc-ak4671.o obj-$(CONFIG_SND_SOC_ALC5623) += snd-soc-alc5623.o obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o obj-$(CONFIG_SND_SOC_CS42L51) += snd-soc-cs42l51.o +obj-$(CONFIG_SND_SOC_CS42L73) += snd-soc-cs42l73.o obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o obj-$(CONFIG_SND_SOC_CS4271) += snd-soc-cs4271.o obj-$(CONFIG_SND_SOC_CX20442) += snd-soc-cx20442.o
sound/soc/codecs/cs42l73.c new file +1255 -0
1,255 lines not on this page · raw message
sound/soc/codecs/cs42l73.h new file +227 -0
227 lines not on this page · raw message
Signature · 1 line
1.7.7.1
Quoted 5 lines · Brian Austin
Signed-off-by Brian Austin <[email protected]>Signed-off-by Georgi Vlaev <[email protected]>This patch adds support for Cirrus Logic CS42L73
low power stereo codec
Changelogs and signoffs are supposed to go in the other order.
sound/soc/codecs/cs42l73.c line 137
Quoted 8 lines
sound/soc/codecs/cs42l73.c new file +7
-0+static const char *const charge_pump_freq_text[] = { +"0" ,"1" ,"2" ,"3" ,"4" , +"5" ,"6" ,"7" ,"8" ,"9" , +"10" ,"11" ,"12" ,"13" ,"14" ,"15" }; +static const struct soc_enum charge_pump_enum = +SOC_ENUM_SINGLE (CS42L73_CPFCHC ,4 , +ARRAY_SIZE (charge_pump_freq_text), charge_pump_freq_text);
Is there no meaningful text you can use here? I'd expect there must be as I've no idea how anyone should figure out what to set here, but if not then making it an enum isn't really worthwhile, just use SOC_SINGLE.
sound/soc/codecs/cs42l73.c line 1118
Quoted 7 lines
sound/soc/codecs/cs42l73.c new file +7
-0+static int cs42l73_probe (struct snd_soc_codec *codec) +{ +int ret; +unsigned int devid =0 ; +struct cs42l73_private *cs42l73 =snd_soc_codec_get_drvdata (codec); + + ret =snd_soc_codec_set_cache_io (codec,8 ,8 ,SND_SOC_I2C );
It'd be better to move this to using SND_SOC_REGMAP and pushing the cache down into the register map API with the basic device presence verification done in the I2C probe but that's not essential yet.
sound/soc/codecs/cs42l73.c line 1237
Quoted 2 lines
sound/soc/codecs/cs42l73.c new file +2
-0+if (ret !=0 ) { +printk (KERN_ERR "%s: can't add i2c driver\n" , __func__);
pr_err().
Quoted 2 lines · Brian Austin
Signed-off-by Brian Austin <[email protected]>Signed-off-by Georgi Vlaev <[email protected]>
Sorry - I also meant to also say that this looks like it's almost there, the comments are very minor.
Quoted 3 lines · Mark Brown
Sorry - I also meant to also say that this looks like it's almost there, the comments are very minor.
Thanks,
I'll make the changes including the regmap.