Skip to contentSkip to conversation

ASoC: tas2781: Add tas2563 into header file

PATCH In review Shenghao Ding 3 participants 7 messages Dec 9, 2023

Subsystems (4)
lore
Share & tools
lore

Shenghao Ding

author maintainer
#0 lore raw

PATCH 1/3 ASoC: tas2781: Add tas2563 into header file

Support tas2563

---
 include/sound/tas2781.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
include/sound/tas2781.h +4 -3
index a6c808b22318..45be543110ac 100644
@@ -1,13 +1,13 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 //
-// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
+// ALSA SoC Texas Instruments TAS2781/TAS2563 Audio Smart Amplifier
 //
 // Copyright (C) 2022 - 2023 Texas Instruments Incorporated
 // https://www.ti.com
 //
-// The TAS2781 driver implements a flexible and configurable
+// The TAS2781/TAS2563 driver implements a flexible and configurable
 // algo coefficient setting for one, two, or even multiple
-// TAS2781 chips.
+// TAS2781/TAS2563 chips.
 //
 // Author: Shenghao Ding <[email protected]>
 // Author: Kevin Lu <[email protected]>
@@ -60,6 +60,7 @@
 
 enum audio_device {
 	TAS2781	= 0,
+	TAS2563
 };
 
 enum device_catlog_id {
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 2/3 ASoC: tas2781: Add tas2563 into driver

Support tas2563.

---
 sound/soc/codecs/tas2781-i2c.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/tas2781-i2c.c +4 -2
index 55cd5e3c23a5..c6afc87f2c69 100644
@@ -5,9 +5,9 @@
 // Copyright (C) 2022 - 2023 Texas Instruments Incorporated
 // https://www.ti.com
 //
-// The TAS2781 driver implements a flexible and configurable
+// The TAS2781/TAS2563 driver implements a flexible and configurable
 // algo coefficient setting for one, two, or even multiple
-// TAS2781 chips.
+// TAS2781/TAS2563 chips.
 //
 // Author: Shenghao Ding <[email protected]>
 // Author: Kevin Lu <[email protected]>
@@ -33,6 +33,7 @@
 
 static const struct i2c_device_id tasdevice_id[] = {
 	{ "tas2781", TAS2781 },
+	{ "tas2563", TAS2563 },
 	{}
 };
 MODULE_DEVICE_TABLE(i2c, tasdevice_id);
@@ -40,6 +41,7 @@ MODULE_DEVICE_TABLE(i2c, tasdevice_id);
 #ifdef CONFIG_OF
 static const struct of_device_id tasdevice_of_match[] = {
 	{ .compatible = "ti,tas2781" },
+	{ .compatible = "ti,tas2563" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, tasdevice_of_match);
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 3/3 ASoC: dt-bindings: Add tas2563 into yaml

In reply to Shenghao Ding

Support tas2563.

---
 .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +10 -7
index a69e6c223308..84e197e15df4 100644
@@ -11,11 +11,11 @@ maintainers:
   - Shenghao Ding <[email protected]>
 
 description:
-  The TAS2781 is a mono, digital input Class-D audio amplifier
-  optimized for efficiently driving high peak power into small
-  loudspeakers. An integrated on-chip DSP supports Texas Instruments
-  Smart Amp speaker protection algorithm. The integrated speaker
-  voltage and current sense provides for real time
+  The TAS2781/TAS2563 is a mono, digital input Class-D audio
+  amplifier optimized for efficiently driving high peak power into
+  small loudspeakers. An integrated on-chip DSP supports Texas
+  Instruments Smart Amp speaker protection algorithm. The
+  integrated speaker voltage and current sense provides for real time
   monitoring of loudspeaker behavior.
 
 allOf:
@@ -25,16 +25,19 @@ properties:
   compatible:
     enum:
       - ti,tas2781
+      - ti,tas2563
 
   reg:
     description:
-      I2C address, in multiple tas2781s case, all the i2c address
+      I2C address, in multiple AMP case, all the i2c address
       aggregate as one Audio Device to support multiple audio slots.
+      For tas2781, i2c address is from 0x38 to 0x3f; For tas2563,
+      i2c address is from 0x4e to 0x4f.
     maxItems: 8
     minItems: 1
     items:
       minimum: 0x38
-      maximum: 0x3f
+      maximum: 0x4f
 
   reset-gpios:
     maxItems: 1
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into yaml

Quoted 29 lines · Shenghao Ding

Support tas2563.

---
 .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +5 -5
index a69e6c223308..84e197e15df4 100644
@@ -11,11 +11,11 @@ maintainers:
   - Shenghao Ding <[email protected]>
 
 description:
-  The TAS2781 is a mono, digital input Class-D audio amplifier
-  optimized for efficiently driving high peak power into small
-  loudspeakers. An integrated on-chip DSP supports Texas Instruments
-  Smart Amp speaker protection algorithm. The integrated speaker
-  voltage and current sense provides for real time
+  The TAS2781/TAS2563 is a mono, digital input Class-D audio
+  amplifier optimized for efficiently driving high peak power into
+  small loudspeakers. An integrated on-chip DSP supports Texas
+  Instruments Smart Amp speaker protection algorithm. The
+  integrated speaker voltage and current sense provides for real time
   monitoring of loudspeaker behavior.
 
 allOf:

Documentation/devicetree/bindings/sound/ti,tas2781.yaml properties: · line 28

Quoted 4 lines
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +1 -0
@@ -25,16 +25,19 @@ properties:
   compatible:
     enum:
       - ti,tas2781
+      - ti,tas2563

Looks like devices are compatible, so express it in the bindings with a fallback and drop driver patches.

Best regards,
Krzysztof

author maintainer
#4 lore raw

RE: [EXTERNAL] Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into yaml

Quoted 43 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Saturday, December 9, 2023 4:13 PM
To: Ding, Shenghao <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXTERNAL] Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into yaml

Quoted 28 lines · Shenghao Ding

Support tas2563.

---
 .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +5 -5
index a69e6c223308..84e197e15df4 100644
@@ -11,11 +11,11 @@ maintainers:
   - Shenghao Ding <[email protected]>
 
 description:
-  The TAS2781 is a mono, digital input Class-D audio amplifier
-  optimized for efficiently driving high peak power into small
-  loudspeakers. An integrated on-chip DSP supports Texas Instruments
-  Smart Amp speaker protection algorithm. The integrated speaker
-  voltage and current sense provides for real time
+  The TAS2781/TAS2563 is a mono, digital input Class-D audio
+ amplifier optimized for efficiently driving high peak power into
+ small loudspeakers. An integrated on-chip DSP supports Texas
+ Instruments Smart Amp speaker protection algorithm. The  integrated
+ speaker voltage and current sense provides for real time
   monitoring of loudspeaker behavior.
 
Quoted 9 lines

Documentation/devicetree/bindings/sound/ti,tas2781.yaml properties: · line 28

Quoted 6 lines
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +1 -0
 allOf:
@@ -25,16 +25,19 @@ properties:
   compatible:
     enum:
       - ti,tas2781
+      - ti,tas2563

Looks like devices are compatible, so express it in the bindings with a fallback and drop driver patches.

Exactly. Do you mean combine the three patches into one patch?

Quoted 3 lines

Best regards,
Krzysztof

#5 lore raw

Re: [EXTERNAL] Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into yaml

Quoted 52 lines · Shenghao
Quoted 43 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Saturday, December 9, 2023 4:13 PM
To: Ding, Shenghao <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXTERNAL] Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into yaml

Quoted 28 lines · Shenghao Ding

Support tas2563.

---
 .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +5 -5
index a69e6c223308..84e197e15df4 100644
@@ -11,11 +11,11 @@ maintainers:
   - Shenghao Ding <[email protected]>
 
 description:
-  The TAS2781 is a mono, digital input Class-D audio amplifier
-  optimized for efficiently driving high peak power into small
-  loudspeakers. An integrated on-chip DSP supports Texas Instruments
-  Smart Amp speaker protection algorithm. The integrated speaker
-  voltage and current sense provides for real time
+  The TAS2781/TAS2563 is a mono, digital input Class-D audio
+ amplifier optimized for efficiently driving high peak power into
+ small loudspeakers. An integrated on-chip DSP supports Texas
+ Instruments Smart Amp speaker protection algorithm. The  integrated
+ speaker voltage and current sense provides for real time
   monitoring of loudspeaker behavior.
 
Quoted 9 lines

Documentation/devicetree/bindings/sound/ti,tas2781.yaml properties: · line 28

Quoted 6 lines
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +1 -0
 allOf:
@@ -25,16 +25,19 @@ properties:
   compatible:
     enum:
       - ti,tas2781
+      - ti,tas2563

Looks like devices are compatible, so express it in the bindings with a fallback and drop driver patches.

Quoted 1 line

Exactly. Do you mean combine the three patches into one patch?

No, driver changes should be dropped - I do not see their value. Compatibility should be expressed in the bindings. Look at example-schema (and hundreds of other bindings).

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into yaml

In reply to Shenghao Ding
Quoted 7 lines · Shenghao Ding

Support tas2563.

---
 .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.

Best regards,
Krzysztof