History log of /linux-master/sound/soc/codecs/tlv320aic32x4.h
Revision Date Author Comments
# cac1636e 31-Aug-2023 Biju Das <biju.das.jz@bp.renesas.com>

ASoC: codec: tlv320aic32x4: Add enum aic32x4_type to aic32x4_probe()

Add enum aic32x4_type to aic32x4_probe() and drop using dev_set_drvdata()
from tlv320aic32x4_{i2c,spi} drivers.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230831194622.87653-2-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 11e756cc 13-Aug-2023 Guiting Shen <aarongt.shen@gmail.com>

ASoC: tlv320aic32x4: Fix the divide by zero

The value of register(NDAC,MDAC,NADC,MADC,BCLKN) maybe zero lead to
divide by zero in clk_aic32x4_div_recalc_rate().And the rate should be
divide by 128 if the value was zero in this function according to the
datasheet.

Add the macro AIC32X4_DIV_MAX to present the 128 and return 0 if failing
to read the value of register.

Signed-off-by: Guiting Shen <aarongt.shen@gmail.com>
Link: https://lore.kernel.org/r/20230813125520.11067-1-aarongt.shen@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0f884099 15-Oct-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: tlv320aic32x4: Make aic32x4_remove() return void

Up to now aic32x4_remove() returns zero unconditionally. Make it return
void instead which makes it easier to see in the callers that there is
no error to handle.

Also the return value of i2c and spi remove callbacks is ignored anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211015071113.2795767-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# b4525b61 17-Jun-2021 Claudius Heine <ch@denx.de>

ASoC: tlv320aic32x4: add support for TAS2505

This adds support for TAS2505 and TAS2521 to the tlv320aic32x4 driver.

The TAS2505 seems to be a stripped down version of the TLV320AIC32X4 so
it makes sense to handle them in the same driver.

Signed-off-by: Claudius Heine <ch@denx.de>
Link: https://lore.kernel.org/r/20210617085230.1851503-3-ch@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# 688d47cd 17-Jun-2021 Claudius Heine <ch@denx.de>

ASoC: tlv320aic32x4: add type to device private data struct

While this driver can already handle different device variants, the
variant information cannot be used in the driver code and therefor
cannot have different code paths depending on the device variant.

This change adds a `type` value into the `aic32x4_priv` structure, that
contains a device variant identifier, which was set when the driver was
bound to the device.

Signed-off-by: Claudius Heine <ch@denx.de>
Link: https://lore.kernel.org/r/20210617085230.1851503-2-ch@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# ec96690d 11-Sep-2020 Miquel Raynal <miquel.raynal@bootlin.com>

ASoC: tlv320aic32x4: Enable fast charge

At power-up the analog circuits may take up to one full second before
being charged with the default configuration. Using the analog blocks
before they are ready generates a *very* crappy sound.

Enable the fast charge feature, which will require a bit more power
than normal charge but will definitely speed up the starting operation
by shrinking this delay to up to 40 ms.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20200911173140.29984-4-miquel.raynal@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d3e6e374 03-Apr-2019 Annaliese McDermond <nh6z@nh6z.net>

ASoC: tlv320aic32x4: Add Playback PowerTune Controls

PowerTune controls the power level of the chip. On playback this
indirectly controls things like the gain of the various output
amplifiers. This can allow for the decrease of output levels
from the codec. This adds controls for those power levels to
the driver.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 96c3bb00 21-Mar-2019 Annaliese McDermond <nh6z@nh6z.net>

ASoC: tlv320aic32x4: Dynamically Determine Clocking

The existing code uses a static lookup table to determine the
settings of the various clock devices on board the chip. This is
limiting in a couple of ways. First, this doesn't allow for any
master clock rates other than the three that have been
precalculated. Additionally, new sample rates are difficult to
add to the table. Witness that the chip is capable of 192000 Hz
sampling, but it is not provided by this driver. Last, if the
driver is clocked by something that isn't a crystal, the
upstream clock may not be able to achieve exactly the rate
requested in the driver. This will mean that clocking will be
slightly off for the sampling clock or that it won't work at all.

This patch determines the settings for all of the clocks at
runtime considering the real conditions of the clocks in the
system. The rules for the clocks are in TI's SLAA557 application
guide on pages 37, 51 and 77.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a51b5006 21-Mar-2019 Annaliese McDermond <nh6z@nh6z.net>

ASoC: tlv320aic32x4: Model DAC/ADC dividers in CCF

Model and manage DAC/ADC dividers as components in the Core
Clock Framework. This should allow us to do some more complex
clock management and power control. Also, some of the
on-board chip clocks can be exposed to the outside, and this
change will make those clocks easier to consume by other
parts of the kernel.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 514b044c 21-Mar-2019 Annaliese McDermond <nh6z@nh6z.net>

ASoC: tlv320aic32x4: Model PLL in CCF

Model and manage the on-board PLL as a component in the Core
Clock Framework. This should allow us to do some more complex
clock management and power control. Also, some of the
on-board chip clocks can be exposed to the outside, and this
change will make those clocks easier to consume by other
parts of the kernel.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 04d979d7 09-Jan-2019 b-ak <anur.bhargav@gmail.com>

ASoC: tlv320aic32x4: SND_SOC_DAPM_MICBIAS is deprecated

SND_SOC_DAPM_MICBIAS is deprecated, replace it with SND_SOC_DAPM_SUPPLY.

MICBIAS voltage wasn't supplied to the microphone with the older
SND_SOC_DAPM_MICBIAS widget, hence the microphone wouldn't work.

This patch fixes the problem.

Signed-off-by: b-ak <anur.bhargav@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 64aab899 12-Dec-2017 Andrew F. Davis <afd@ti.com>

ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_hw_params()

Make the code easier to read by using snd_soc_update_bits() over
read/modify/write sequences. Also use separate per-register
variables instead of re-using "data". This can prevent accidental
over-writing and makes it clear for which register each bit value is
intended.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0fe7aa39 12-Dec-2017 Andrew F. Davis <afd@ti.com>

ASoC: tlv320aic32x4: Use BIT and GENMASK for bit field definitions

Inter-register definitions should use BIT and GENMASK definitions
and also be grouped by what register they belong to. This makes it
easy to cross-check with the datasheet and is consistent with other
drivers.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7e2a4dc5 12-Dec-2017 Andrew F. Davis <afd@ti.com>

ASoC: tlv320aic32x4: Drop define mapping from number to number

Drop definition of frequencies that only map from one number to
the same number. This is not needed and if misused can hide
bugs.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1714196c 12-Dec-2017 Andrew F. Davis <afd@ti.com>

ASoC: tlv320aic32x4: Use AIC32X4_REG macro for all register definitions

All register definitions should use the AIC32X4_REG macro, even the ones
in page 0. This makes datasheet lookup more consistent and helps with
alignment both in this file and across other tlv320aic* drivers.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b9045b9c 12-Jul-2017 Dan Murphy <dmurphy@ti.com>

ASoC: tlv320aic32x4: Add gpio configuration to the codec

Add the ability to configure the MFP1->MFP5 registers
as GPIOs. In addition adding ALSA controls to get and set
the GPIO state.

Per the data sheet each MFP can be configured as a GPIO
input only, output only or either an input or output.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3bcfd222 18-Apr-2016 Jeremy McDermond <nh6z@nh6z.net>

ASoC: tlv320aic32x4: Break out I2C support into separate module

To prepare for abstracting adding SPI support, the I2C pieces needs to
be in its own moudle. This patch moves common probe code into aic32x4_probe
and common removal code into aic32x4_remove. It also creates a static
regmap config structure to be copied in the I2C specific driver.

Signed-off-by: Jeremy McDermond <nh6z@nh6z.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 609e6025 27-Jan-2014 Markus Pargmann <mpa@pengutronix.de>

ASoC: tlv320aic32x4: Fix MICPGA input configuration

Currently the Negative Terminal Input Routing Configuration is only set
when there is a special routing configuration. If we don't use one of
the inputs IN1 or IN2 as negative terminal input, the PGA and recording
does not work.

This patch adds a route from CM1L/CM1R to the PGA as negative input by
default. With this configuration the PGA can amplify all input signals
and line-in/mic works again.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# b44aa40f 27-Jan-2014 Markus Pargmann <mpa@pengutronix.de>

ASoC: tlv320aic32x4: Fix mono playback

Playback of a mono stream should output the same stream on both
channels. At the moment only the left analog signal is valid, the right
one is just noise.

This patch maps the left digital channel onto both DACs when receiving a
mono stream.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# a405387c 31-Oct-2012 Javier Martin <javier.martin@vista-silicon.com>

ASoC: tlv320aic32x4: Fix problem with first capture.

In its previous status, the first capture didn't work properly;
nothing was actually recorded from the microphone. This
behaviour was observed using a Visstrim M10 board.

In order to solve this BUG a workaround has been added that,
during the initialization process of the codec, powers on and
off the ADC.

The issue seems related to a HW BUG or some behavior that
is not documented in the datasheet.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1d471cd1 02-Mar-2011 Javier Martin <javier.martin@vista-silicon.com>

ASoC: Add TI tlv320aic32x4 codec support.

This patch adds support for tlv320aic3205 and tlv320aic3254 codecs.
It doesn't include miniDSP support for aic3254.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>