dt-bindings: ASoC: Add tas2770 smart PA dt bindings
PATCH v5 1/1 dt-bindings: ASoC: Add tas2770 smart PA dt bindings
From: Frank Shi <[email protected]>
Add tas2770 smart PA dt bindings
--- .../devicetree/bindings/sound/tas2770.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tas2770.txt
Documentation/devicetree/bindings/sound/tas2770.txt new file +37 -0
@@ -0,0 +1,37 @@ +Texas Instruments TAS2770 Smart PA + +The TAS2770 is a mono, digital input Class-D audio amplifier optimized for +efficiently driving high peak power into small loudspeakers. +Integrated speaker voltage and current sense provides for +real time monitoring of loudspeaker behavior. + +Required properties: + + - compatible: - Should contain "ti,tas2770". + - reg: - The i2c address. Should contain <0x4c>, <0x4d>,<0x4e>, or <0x4f>. + - #address-cells - Should be <1>. + - #size-cells - Should be <0>. + - ti,asi-format: - Sets TDM RX capture edge. 0->Rising; 1->Falling. + - ti,imon-slot-no:- TDM TX current sense time slot. + - ti,vmon-slot-no:- TDM TX voltage sense time slot. + +Optional properties: + +- interrupt-parent: the phandle to the interrupt controller which provides + the interrupt. +- interrupts: interrupt specification for data-ready. + +Examples: + + tas2770@4c { + compatible = "ti,tas2770"; + reg = <0x4c>; + #address-cells = <1>; + #size-cells = <0>; + interrupt-parent = <&msm_gpio>; + interrupts = <97 0>; + ti,asi-format = <0>; + ti,imon-slot-no = <0>; + ti,vmon-slot-no = <2>; + }; +
Signature · 1 line
2.7.4
PATCH v5 1/1 tas2770: add tas2770 smart PA kernel driver
From: Frank Shi <[email protected]>
add tas2770 smart PA kernel driver
--- sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/tas2770.c | 933 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/tas2770.h | 166 ++++++++ 4 files changed, 1106 insertions(+) create mode 100644 sound/soc/codecs/tas2770.c create mode 100644 sound/soc/codecs/tas2770.h
sound/soc/codecs/Kconfig +5 -0
@@ -111,6 +111,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_STAC9766 if SND_SOC_AC97_BUS select SND_SOC_STI_SAS select SND_SOC_TAS2552 if I2C + select SND_SOC_TAS2770 if I2C select SND_SOC_TAS5086 if I2C select SND_SOC_TAS571X if I2C select SND_SOC_TFA9879 if I2C
@@ -652,6 +653,10 @@ config SND_SOC_TAS2552 tristate "Texas Instruments TAS2552 Mono Audio amplifier" depends on I2C +config SND_SOC_TAS2770 + tristate "Texas Instruments TAS2770 speaker amplifier" + depends on I2C + config SND_SOC_TAS5086 tristate "Texas Instruments TAS5086 speaker amplifier" depends on I2C
sound/soc/codecs/Makefile +2 -0
@@ -116,6 +116,7 @@ snd-soc-stac9766-objs := stac9766.o snd-soc-sti-sas-objs := sti-sas.o snd-soc-tas5086-objs := tas5086.o snd-soc-tas571x-objs := tas571x.o +snd-soc-tas2770-objs := tas2770.o snd-soc-tfa9879-objs := tfa9879.o snd-soc-tlv320aic23-objs := tlv320aic23.o snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
@@ -332,6 +333,7 @@ obj-$(CONFIG_SND_SOC_STI_SAS) += snd-soc-sti-sas.o obj-$(CONFIG_SND_SOC_TAS2552) += snd-soc-tas2552.o obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o +obj-$(CONFIG_SND_SOC_TAS2770) += snd-soc-tas2770.o obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o
sound/soc/codecs/tas2770.c new file +933 -0
933 lines not on this page · raw message
sound/soc/codecs/tas2770.h new file +166 -0
166 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [alsa-devel] [PATCH v5] tas2770: add tas2770 smart PA kernel driver
Quoted 5 lines
+reload:
+ /* hardware reset and reload */
+tas2770_load_config(tas2770);
Sometimes devices need to be reset to return to normal, and this setting is necessary.
sound/soc/codecs/tas2770.c line 794
Quoted 3 lines
sound/soc/codecs/tas2770.c new file +3
-0+end: +return IRQ_HANDLED ; +}
I see that the other drivers, the return values in irq_handler are IRQ_HANDLED.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Mark Brown
maintainerRe: [PATCH v5] tas2770: add tas2770 smart PA kernel driver
Quoted 5 lines · On Tue, Sep 17, 2019 at 03:40:59PM +0800, [email protected] wrote:
Quoted 3 lines
+reload:
+ /* hardware reset and reload */
+tas2770_load_config(tas2770);Sometimes devices need to be reset to return to normal, and this setting is necessary.
But why do we have systems where the device is being reset? Like I keep saying I'd just get a normal driver merged first, then go back and figure out what's going on with the reset support so it can be reviewed separately.
Quoted 5 lines
sound/soc/codecs/tas2770.c line 794
Quoted 3 lines
sound/soc/codecs/tas2770.c new file +3
-0+end: +return IRQ_HANDLED ; +}I see that the other drivers, the return values in
irq_handlerareIRQ_HANDLED.
If they've actually handled an interrupt. There's some buggy drivers that do it unconditionally, they aren't a good reason to add more.