Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ecbabd9 authored by Misael Lopez Cruz's avatar Misael Lopez Cruz Committed by Mark Brown
Browse files

ASoC: TWL6040: Add twl6040 codec driver



Initial version of TWL6040 codec driver.

The TWL6040 codec uses a proprietary PDM-based digital audio interface.
Audio paths supported are:

- Input: Main Mic, Sub Mic, Headset Mic, Auxiliary-FM Left/Right
- Output: Headset Left/Right, Handsfree Left/Right

TWL6040 codec supports power-up/down manual and automatic sequence.
Manual sequence is done through a specific register writes sequence.
Automatic sequence is done when the codec is powered-up through the
external AUDPWRON line. The completion of the sequence is signaled
through the audio interrupt.

TWL6040 codec sysclk can be provided by: low-power or high
performance PLL:

- The low-power PLL takes a low-frequency input at 32,768 Hz and
generates an approximate of 17.64 or 19.2 MHz (for 44.1 KHz and 48 KHz
respectively)

- The high-performance PLL generates an exact 19.2 MHz clock signal
from high-frequency input at 12/19.2/26/38.4 MHz.

Low-power playback mode is a special scenario where only headset path
(headset DAC and driver) is active.

For the particular case of headset path, PLL being used defines the
headset power mode: low-power, high-performance.

Signed-off-by: default avatarMisael Lopez Cruz <x0052729@ti.com>
Signed-off-by: default avatarJorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: default avatarMargarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 27648b2f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_TPA6130A2 if I2C
	select SND_SOC_TLV320DAC33 if I2C
	select SND_SOC_TWL4030 if TWL4030_CORE
	select SND_SOC_TWL6040 if TWL4030_CORE
	select SND_SOC_UDA134X
	select SND_SOC_UDA1380 if I2C
	select SND_SOC_WM2000 if I2C
@@ -168,6 +169,9 @@ config SND_SOC_TWL4030
	select TWL4030_CODEC
	tristate

config SND_SOC_TWL6040
	tristate

config SND_SOC_UDA134X
       tristate

+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ snd-soc-tlv320aic26-objs := tlv320aic26.o
snd-soc-tlv320aic3x-objs := tlv320aic3x.o
snd-soc-tlv320dac33-objs := tlv320dac33.o
snd-soc-twl4030-objs := twl4030.o
snd-soc-twl6040-objs := twl6040.o
snd-soc-uda134x-objs := uda134x.o
snd-soc-uda1380-objs := uda1380.o
snd-soc-wm8350-objs := wm8350.o
@@ -85,6 +86,7 @@ obj-$(CONFIG_SND_SOC_TLV320AIC26) += snd-soc-tlv320aic26.o
obj-$(CONFIG_SND_SOC_TLV320AIC3X)	+= snd-soc-tlv320aic3x.o
obj-$(CONFIG_SND_SOC_TLV320DAC33)	+= snd-soc-tlv320dac33.o
obj-$(CONFIG_SND_SOC_TWL4030)	+= snd-soc-twl4030.o
obj-$(CONFIG_SND_SOC_TWL6040)	+= snd-soc-twl6040.o
obj-$(CONFIG_SND_SOC_UDA134X)	+= snd-soc-uda134x.o
obj-$(CONFIG_SND_SOC_UDA1380)	+= snd-soc-uda1380.o
obj-$(CONFIG_SND_SOC_WM8350)	+= snd-soc-wm8350.o