mbox series

[0/2] Codec driver for TLV320ADC3001 and 3101

Message ID alpine.DEB.2.21.2110041112490.14472@lnxricardw1.se.axis.com (mailing list archive)
Headers show
Series Codec driver for TLV320ADC3001 and 3101 | expand

Message

Ricard Wanderlof Oct. 4, 2021, 9:14 a.m. UTC
This is a codec driver for the TLV320ADC3001 and TLV320ADC3101 2 channel audio
ADC chips from Texas Instruments.

Based on an old driver for these chips that I was referred to by Texas
Instruments, but which apparently was never upstreamed, I've taken patches from
various incarnations, ported them and augmented them with various new features
in order to make a working driver.

There is currently no support for the on-chip "miniDSP".

Although the TLV320ADC3001 and TLV320ADC3101 have similarities with other TI
codec chips for which there are existing drivers, upon closer inspection I
decided the differences were too great to warrant attempting to modify an
existing driver, especially without access to all supported chips and resources
for testing them all.

There are certainly things that could be improved, among others in the area of
PLL register value calculations, but it has been tested on the Axis ARTPEC-8
platform and has been found to work satisfactorily at least with a
TLV320ADC3101 operating as an I2S slave at 48 kHz with 32 bit bit depth, 1 or 2
channels, both with the on-chip PLL enabled and disabled.

I have not tested this on a TLV320ADC3001 chip, but I've retained the apparent
differences from the '3101 (which seem quite small) from the original
driver.

/Ricard

Ricard Wanderlof (2):
  dt-bindings: sound: tlv320adc3xxx: New codec driver
  ASoC: codec: tlv320adc3xxx: New codec driver

 .../bindings/sound/ti,tlv320adc3xxx.yaml      |  126 ++
 include/dt-bindings/sound/tlv320adc3xxx.h     |   33 +
 sound/soc/codecs/Kconfig                      |    7 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/tlv320adc3xxx.c              | 1239 +++++++++++++++++
 sound/soc/codecs/tlv320adc3xxx.h              |  381 +++++
 6 files changed, 1788 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/ti,tlv320adc3xxx.yaml
 create mode 100644 include/dt-bindings/sound/tlv320adc3xxx.h
 create mode 100644 sound/soc/codecs/tlv320adc3xxx.c
 create mode 100644 sound/soc/codecs/tlv320adc3xxx.h