Skip to contentSkip to conversation

Add tas2770 driver code

PATCH In review [email protected] 2 participants 2 messages Sep 5, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add tas2770 driver code

From 5b539e7dbebebf7e58c38a6b54f222bc116d63f3 Mon Sep 17 00:00:00 2001
From: Shi Fu <[email protected]>
Date: Mon, 1 Jul 2019 11:00:13 +0800

Subject: [PATCH v5] dt: tas2770: Add tas2770 smart PA dt bindings.

Add tas2770 smart PA dt bindings.

---
 Documentation/devicetree/bindings/tas2770.txt | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/tas2770.txt
Documentation/devicetree/bindings/tas2770.txt new file +38 -0
new file mode 100644
index 0000000..f70b310
@@ -0,0 +1,38 @@
+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,left-slot:   - Sets TDM RX left time slots.
+ - ti,right-slot:  - Sets TDM RX right time slots.
+ - ti,imon-slot-no:- TDM TX current sense time slot.
+ - ti,vmon-slot-no:- TDM TX voltage sense time slot.
+
+Optional properties:
+
+ - reset-gpio: Reset GPIO number of left device.
+ - irq-gpio:  IRQ GPIO number of left device.
+
+Examples:
+
+    tas2770@4c {
+                compatible = "ti,tas2770";
+                reg = <0x4c>;
+                reset-gpio = <&gpio15 1 GPIO_ACTIVE_LOW>;
+                irq-gpio = <&gpio16 1 GPIO_ACTIVE_LOW>;
+                ti,asi-format = <0>;
+                ti,left-slot = <0>;
+                ti,right-slot = <1>;
+                ti,imon-slot-no = <0>;
+                ti,vmon-slot-no = <2>;
+        };
+
Signature · 25 lines
2.7.4





From 167a85aa30a41471ccddd9912b192d92800a4212 Mon Sep 17 00:00:00 2001
From: TS Shi Fu <[email protected]>
Date: Mon, 24 Jun 2019 18:26:09 +0800
Subject: [PATCH v5] Add tas2770 driver code

Add tas2770 driver code
Date: Wed, 15 May 2019 12:08:42 +0800
From: Shi Fu <[email protected]>
Signed-off-by: Shi Fu <[email protected]>

Change-Id: Ibd5b04b4c0d0021a8057023aa6b43f97bba372b1
---
 sound/soc/codecs/Kconfig   |    5 +
 sound/soc/codecs/Makefile  |    2 +
 sound/soc/codecs/tas2770.c | 1103 ++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/tas2770.h |  173 +++++++
 4 files changed, 1283 insertions(+)
 create mode 100644 sound/soc/codecs/tas2770.c
 create mode 100644 sound/soc/codecs/tas2770.h
sound/soc/codecs/Kconfig +5 -0
index 8f3e787..cc92da3 100644
@@ -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
index 5305cc6..1b58d08 100644
@@ -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 +1103 -0

1,103 lines not on this page · raw message

sound/soc/codecs/tas2770.h new file +173 -0

173 lines not on this page · raw message

Signature · 22 lines
2.7.4





Frank Shi 石扶 
Thunder Software Technology Co., Ltd. 中科创达软件股份有限公司 
Mobile: +86-13002957678 | Email: [email protected] 
Add: 10F, #1, Digital China Technology Park, No.20, Zhangba Rd. 4th, High-tech Zone, Xi'an City, Shaanxi Province, 710075, P.R. China 
西安市高新区丈八四路20号神州数码科技园1号楼10层,710075 
www.thundersoft.com 


CONFIDENTIALITY. This e-mail and its attachments are intended only for the person or entity whose address is listed above and may contain confidential and/or privileged material. Any retransmission, dissemination or other use of this information by persons or entities other than the intended recipient is prohibited. If you received this e-mail in error, please do not disclose the contents to anyone, but notify the sender by email immediately, and delete this e-mail and any attachments from your system. Thank you. 

保密提示。本电子邮件及其附件仅适用于上述地址的个人或实体,并可能包含机密和/或特许资料。禁止对目标收件人以外的个人或实体进行此类信息 的任何转播,传播或其他使用。如果您误收了此电子邮件,请不要向任何人透露这些内容,而应立即以邮件形式通知发件人,并从您的系统中删除本邮 件和任何附件。谢谢。 

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#1 lore raw
Quoted 8 lines · On Thu, Sep 05, 2019 at 01:35:04PM +0800, [email protected] wrote:

From 5b539e7dbebebf7e58c38a6b54f222bc116d63f3 Mon Sep 17 00:00:00 2001
From: Shi Fu <[email protected]>
Date: Mon, 1 Jul 2019 11:00:13 +0800

Subject: [PATCH v5] dt: tas2770: Add tas2770 smart PA dt bindings.

Add tas2770 smart PA dt bindings.
---

This looks like it's a whole patch series sent as a single mail, and there's some confusing with things like Signed-off-by and general formatting. Please see submitting-patches.rst in the kernel source for how to send patches, it's worth taking a look at other posts on the list and trying to ensure that your mails look the same as them. As things stand it's really hard to read this since whatever happened with the way this has been sent seems to have mangled the indention so it doesn't look like normal kernel code unfortunately.