-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC: tlv320aic31xx: Add basic codec driver implementation
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>
- Loading branch information
Jyri Sarha
authored and
Mark Brown
committed
Mar 13, 2014
1 parent
b46f2c5
commit e00447f
Showing
6 changed files
with
1,628 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Texas Instruments - tlv320aic31xx Codec module | ||
|
||
The tlv320aic31xx serial control bus communicates through I2C protocols | ||
|
||
Required properties: | ||
|
||
- compatible - "string" - One of: | ||
"ti,tlv320aic310x" - Generic TLV320AIC31xx with mono speaker amp | ||
"ti,tlv320aic311x" - Generic TLV320AIC31xx with stereo speaker amp | ||
"ti,tlv320aic3100" - TLV320AIC3100 (mono speaker amp, no MiniDSP) | ||
"ti,tlv320aic3110" - TLV320AIC3110 (stereo speaker amp, no MiniDSP) | ||
"ti,tlv320aic3120" - TLV320AIC3120 (mono speaker amp, MiniDSP) | ||
"ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) | ||
|
||
- reg - <int> - I2C slave address | ||
|
||
|
||
Optional properties: | ||
|
||
- gpio-reset - gpio pin number used for codec reset | ||
- ai31xx-micbias-vg - MicBias Voltage setting | ||
1 or MICBIAS_2_0V - MICBIAS output is powered to 2.0V | ||
2 or MICBIAS_2_5V - MICBIAS output is powered to 2.5V | ||
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD | ||
If this node is not mentioned or if the value is unknown, then | ||
micbias is set to 2.0V. | ||
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | ||
DVDD-supply : power supplies for the device as covered in | ||
Documentation/devicetree/bindings/regulator/regulator.txt | ||
|
||
CODEC output pins: | ||
* HPL | ||
* HPR | ||
* SPL, devices with stereo speaker amp | ||
* SPR, devices with stereo speaker amp | ||
* SPK, devices with mono speaker amp | ||
* MICBIAS | ||
|
||
CODEC input pins: | ||
* MIC1LP | ||
* MIC1RP | ||
* MIC1LM | ||
|
||
The pins can be used in referring sound node's audio-routing property. | ||
|
||
Example: | ||
#include <dt-bindings/sound/tlv320aic31xx-micbias.h> | ||
|
||
tlv320aic31xx: tlv320aic31xx@18 { | ||
compatible = "ti,tlv320aic311x"; | ||
reg = <0x18>; | ||
|
||
ai31xx-micbias-vg = <MICBIAS_OFF>; | ||
|
||
HPVDD-supply = <®ulator>; | ||
SPRVDD-supply = <®ulator>; | ||
SPLVDD-supply = <®ulator>; | ||
AVDD-supply = <®ulator>; | ||
IOVDD-supply = <®ulator>; | ||
DVDD-supply = <®ulator>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef __DT_TLV320AIC31XX_MICBIAS_H | ||
#define __DT_TLV320AIC31XX_MICBIAS_H | ||
|
||
#define MICBIAS_2_0V 1 | ||
#define MICBIAS_2_5V 2 | ||
#define MICBIAS_AVDDV 3 | ||
|
||
#endif /* __DT_TLV320AIC31XX_MICBIAS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.