summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic31xx.h
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: tlv320aic31xx: Add button press detectionAndrew F. Davis2019-04-021-1/+2
| | | | | | | | This device can optionally detect headset or microphone button presses. Add support for this by passing this event to the jack layer. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Add headphone/headset detectionAndrew F. Davis2019-04-021-0/+11
| | | | | | | | | | | | | This device can detect the insertion/removal of headphones and headsets. Enable reporting this status by enabling this interrupt and forwarding this to upper-layers if a jack has been defined. This jack definition and the resulting operation from a jack detection event must currently be defined by sound card platform code until CODEC outputs to jack mappings can be defined generically. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Add overflow detection supportAndrew F. Davis2018-09-041-0/+7
| | | | | | | | | | Similar to short circuit detection, when the ADC/DAC is saturated and overflows poor audio quality can result and should be reported to the user. This device support Automatic Dynamic Range Compression (DRC) to reduce this but it is not enabled currently in this driver. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Add short circuit detection supportAndrew F. Davis2018-09-031-0/+16
| | | | | | | | | | These devices support detecting and reporting short circuits across the output stages. Add support for reporting these issue. Do this by registering an interrupt if available and enabling this error to trigger that interrupt in the device. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Do not force power on the DAC/ADC in clock master modePeter Ujfalusi2018-02-191-0/+1
| | | | | | | | | | | | | With P0 R29, Bit2 set the I2S clocks will be running when the DAC/ADC is powered down, but still the codec need to be powered up by needing at least one complete DAPM path for the stream. If the AIF is not needed (analog loopback for example) the I2S clocks will not run as they are not needed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Suggested-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Reformat header file using GENMASK and BIT macrosAndrew F. Davis2017-12-011-187/+133
| | | | | | | | | We also move the comments describing the registers to after the register definition to remove non-uniform vertical white-space, this makes cross-referencing with the datasheet much easier. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'fix/tlv320aic31xx' of ↵Mark Brown2017-12-011-1/+1
|\ | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tlv320aic31xx
| * ASoC: tlv320aic31xx: Fix GPIO1 register definitionAndrew F. Davis2017-11-301-1/+1
| | | | | | | | | | | | | | | | | | GPIO1 control register is number 51, fix this here. Fixes: bafcbfe429eb ("ASoC: tlv320aic31xx: Make the register values human readable") Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* | ASoC: tlv320aic31xx: File header and copyright cleanupAndrew F. Davis2017-11-301-11/+4
|/ | | | | | | | Fix header copyright tags, while we are here, also switch to SPDX and fixup MODULE tags to match. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Add support for tlv320dac3101Peter Ujfalusi2016-11-121-0/+1
| | | | | | | | The DAC3101 is mostly identical to DAC3100 with the exception that it has stereo speaker AMP instead of mono used in DAC3100. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: add explicit support for tlv320dac31xxNikita Yushchenko2016-09-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | tlv320dac31xx is a subset of tlv320aic31xx: - it does not have MIC inputs and ADC, thus capture is not supported, - it has analog inputs AIN1/AIN2 that can be mixed into output. Although tlv320dac31xx does work with tlv320aic31xx driver, this setup does register non-existent widgets and non-existent capture stream. Thus userspace lists non-existent objects in user interfaces, an can access these, causing operations with device registers that are declared as "reserved" in tlv320dac31xx datasheet. This patch fixes this situation by separating controls/widgets/routes into common, aic31xx-specific, and dac31xx-specific parts. Only parts that match actual hardware (as declared in "compatible" device tree property) are registered. Changes from v1: - update device tree binding documentation, - rebased on top of "ASoC: codec duplicated callback function goes to component on tlv320aic31xx" commit. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Make the register values human readablePeter Ujfalusi2016-05-301-66/+68
| | | | | | | | | | | The datasheet uses decimal numbers for the register addresses, convert the register values from hexadecimal to decimal and introduce macro for the register definitions. This way it is easier to look up registers in the documentation. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Enable support for S24_LE formatPeter Ujfalusi2014-09-041-1/+2
| | | | | | | | S24_LE is the same on the bus as S24_3LE, which means the codec can support it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Add basic codec driver implementationJyri Sarha2014-03-131-0/+258
This commit adds a bare bones driver support for TLV320AIC31XX family audio codecs. The driver adds basic stereo playback trough headphone and speaker outputs and mono capture trough microphone inputs. The driver is currently missing support at least for mini DSP features and jack detection. I have tested the driver only on TLV320AIC3111, but based on the data sheets TLV320AIC3100, TLV320AIC3110, and TLV320AIC3120 should work Ok too. The base for the implementation was taken from: git@gitorious.org:ti-codecs/ti-codecs.git ajitk/topics/k3.10.1-aic31xx -branch at commit 77504eba0294764e9e63b4a0c696b44db187cd13. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>