summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tlv320adc3xxx.c
AgeCommit message (Collapse)AuthorFilesLines
2022-05-09ASoC: tlv320adc3xxx: Add endianness flag in snd_soc_component_driverCharles Keepax1-5/+6
The endianness flag is used on the CODEC side to specify an ambivalence to endian, typically because it is lost over the hardware link. This device receives audio over an I2S DAI and as such should have endianness applied. A fixup is also required to use the width directly rather than relying on the format in hw_params, now both little and big endian would be supported. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220504170905.332415-25-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25ASoC: tlv320*: use i2c_match_id and simple i2c probeStephen Kitt1-10/+11
As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. In the context of an i2c probe, i2c_match_id with the module id table and the probed client never returns null, so removing the null check on the i2c_device_id pointer is safe. The i2c id tables are moved up before the probe function, as suggested by Wolfram Sang, except where the existing code already had a declaration for the of_device_id table. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20220415160613.148882-7-steve@sk2.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-21Merge tag 'asoc-v5.18' of ↵Takashi Iwai1-2/+141
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.18 Quite a quiet release for ASoC, lots of work on drivers and platforms but nothing too groundbreaking but not much on the core itself: - Start of moving SoF to support multiple IPC mechanisms. - Use of NHLT ACPI table to reduce the amount of quirking required for Intel systems. - Some building blocks for use in forthcoming Intel AVS driver for legacy Intel DSP firmwares. - Support for AMD PDM, Atmel PDMC, Awinic AW8738, i.MX cards with TLV320AIC31xx, Intel machines with CS35L41 and ESSX8336, Mediatek MT8181 wideband bluetooth, nVidia Tegra234, Qualcomm SC7280, Renesas RZ/V2L, Texas Instruments TAS585M
2022-02-24ASoC: tlv320adc3xxx: Fix buggy return valueRicard Wanderlof1-4/+8
snd_soc_component_update_bits returns 1 if the operation was successful and some bits were changed, so we cannot return this value directly as it can be interpreted as an error. Instead, do some minor mangling to avoid inadvertently returning an error. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Link: https://lore.kernel.org/r/alpine.DEB.2.21.2202241021420.20760@lnxricardw1.se.axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10ASoC: tlv320adc3xxx: Add IIR filter configurationRicard Wanderlof1-2/+141
The TLV320ADC3001/3101 have an internal DSP, which can either be used in various preset configurations (called "Processing Blocks" in the data sheet), or as a freely programmable (using the "PurePath Studio" graphical programming tool from TI) but rather small DSP ("miniDSP"). Using the default configuration (PRB_R1) it's possible to set up filtering using a first-order IIR, which can be useful for adding a digital high pass filter to the signal chain, for instance. This patch adds support for configuring the IIR filter coefficients. The filter itself is always enabled; the default coefficients implement a pass-through function. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Link: https://lore.kernel.org/r/alpine.DEB.2.21.2202101805360.7068@lnxricardw1.se.axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-23ASoC: codec: tlv320adc3xxx: Fix missing clk_disable_unprepare() on error in ↵Yang Yingliang1-6/+12
adc3xxx_i2c_probe() Fix the missing clk_disable_unprepare() before return from adc3xxx_i2c_probe() in the error handling case. Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20211223082212.3342184-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-20ASoC: codec: tlv320adc3xxx: New codec driverRicard Wanderlof1-0/+1311
New codec driver for Texas Instruments TLV320ADC3001 and TLV320ADC3101 audio ADCs. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Link: https://lore.kernel.org/r/alpine.DEB.2.21.2112151801370.27889@lap5cg0092dnk.se.axis.com Signed-off-by: Mark Brown <broonie@kernel.org>