Skip to content

Commit

Permalink
ASoC: Add support for Conexant CX2072X CODEC
Browse files Browse the repository at this point in the history
Initial commit of the Conexant CX2072X CODEC driver. Some features are
not present.

The CX2072X is a ultra low power stereo audio codec supports I2S/TDM
host interface with EQ, DRC features in playback mode.

Featues of CX2072X codec:

 * Two 24 bits DACs and DACs.
 * Stereo Headphone AMP.
 * 2.8W per channel class-D output.
 * Integrated seven bands per channel EQ and DRC.
 * Fully integrated headset support with detect/switch.
 * Stereo digital microphone for array applications.
 * S/PDIF output.
 * Bi-directional GPIOs.
 * Support analog and digital PC Beeep.
 * One headset button support.
 * Supports a wide variety of host interfaces.
   -wide variety of I2S and similar bit-stream formats
    with word lengths of up to 24 bits.
   -TDM stream supports up to 4 channels.
 * AEC loopback support.

Further fixes by tiwai:
 * Rebase to 5.2+
 * Missing DAPM entry definitions
 * Missing power hooks
 * Fix uninitialized variable warning
 * Rewrite jack detection stuff to use set_jack callback
 * Plumbing jack detection code for Intel ASoC
 * Move clk management into runtime PM
 * Drop incorrect regcache usages
 * Drop untested stuff: OF table, EQ/DRC handling
 * Lots of code cleanups and minor refactoring

The OF code was dropped due to the lack of testability.
It should be easy to re-add once if someone can test it.

v1->v2: No change
v2->v3: Move register tables to appropriate place
	Remove some confusing codes
	Set snd_ctl_boolean_* helpers directly
	Fix EQ put callback
	Rename to "DAC1 Switch" from "DAC1 Mute Switch"
	Drop superfluous regmap calls at shutdown
	Avoid regmap_register_patch()
	Add missing register definitions
	Fix register access on big-endian machine
	Remove regcache messes
v3->v4: Fix the wrong endianess conversion in reg write
	Minor code cleanups
v4->v5: Move clk management to runtime PM
	Sparse warning fixes
	Some more code simplification
	Drop tricky regcache fiddling
	Apply mutex locks around possible racy sequences
	Move exported jack detection stuff into set_jack callback
v5->v6: Drop buggy&untested EQ and DRC codes
	Lots of code reduction/cleanup
	Add more comments about platform-specific stuff

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531
Signed-off-by: Simon Ho <simon.ho@conexant.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
CNXT-Simon authored and broonie committed May 22, 2019
1 parent d281bf5 commit a497a43
Show file tree
Hide file tree
Showing 4 changed files with 2,050 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_CS47L24 if MFD_CS47L24
select SND_SOC_CS53L30 if I2C
select SND_SOC_CX20442 if TTY
select SND_SOC_CX2072X if I2C
select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
select SND_SOC_DA7213 if I2C
select SND_SOC_DA7218 if I2C
Expand Down Expand Up @@ -584,6 +585,12 @@ config SND_SOC_CX20442
tristate
depends on TTY

config SND_SOC_CX2072X
tristate "Conexant CX2072X CODEC"
depends on I2C
help
Enable support for Conexant CX20721 and CX20723 codec chips.

config SND_SOC_JZ4740_CODEC
depends on MIPS || COMPILE_TEST
select REGMAP_MMIO
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ snd-soc-cs4349-objs := cs4349.o
snd-soc-cs47l24-objs := cs47l24.o
snd-soc-cs53l30-objs := cs53l30.o
snd-soc-cx20442-objs := cx20442.o
snd-soc-cx2072x-objs := cx2072x.o
snd-soc-da7210-objs := da7210.o
snd-soc-da7213-objs := da7213.o
snd-soc-da7218-objs := da7218.o
Expand Down Expand Up @@ -341,6 +342,7 @@ obj-$(CONFIG_SND_SOC_CS4349) += snd-soc-cs4349.o
obj-$(CONFIG_SND_SOC_CS47L24) += snd-soc-cs47l24.o
obj-$(CONFIG_SND_SOC_CS53L30) += snd-soc-cs53l30.o
obj-$(CONFIG_SND_SOC_CX20442) += snd-soc-cx20442.o
obj-$(CONFIG_SND_SOC_CX2072X) += snd-soc-cx2072x.o
obj-$(CONFIG_SND_SOC_DA7210) += snd-soc-da7210.o
obj-$(CONFIG_SND_SOC_DA7213) += snd-soc-da7213.o
obj-$(CONFIG_SND_SOC_DA7218) += snd-soc-da7218.o
Expand Down

0 comments on commit a497a43

Please sign in to comment.