Skip to contentSkip to conversation

ASoC: codecs: add support for TAS5720 digital amplifier

PATCH Superseded Andreas Dannenberg 3 participants 15 messages Apr 25, 2016 – May 13, 2016

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover ASoC: codecs: add support for TAS5720 digital amplifier

Updated driver for TI's TAS5720L/M digital audio amplifiers incorporating previous feedback (thanks Mark Brown). Biggest change is that the driver is no longer using interrupts for codec fault reporting, but instead uses a polling-based approach to check for (and clear) codec fault conditions every 200ms. This is much more graceful and actually lower overhead than trying to keep the actual TAS5720 fault interrupts (that come in every 300us!) under control which is what v2 of the driver was doing. Because of the removal of interrupts the DT doc had to be updated as well, so I did not carry forward Rob Herring's earlier Acked-by because of said change.

--

Andreas Dannenberg
Texas Instruments Inc

Changes since v2:
- Switched fault handling from using interrupts to polling mode
- Remove interrupt related description from DT bindings doc
- Remove unlikely() to simplify an expression
- Remove unnesseary tas5720_set_dai_sysclk() function stub

Changes since v1:
- Simplified DT interrupt documentation (Thanks Rob Herring)
- Fixed potential race condition during codec probe where deferred work that's used by the threaded IRQ handler was setup after the IRQ was initialized (would lead to an issue when the TAS5720 was already throwing interrupts at the time of probe)

Andreas Dannenberg (2):
ASoC: codecs: add TA5720 digital amplifier DT bindings
ASoC: codecs: add support for TAS5720 digital amplifier

 .../devicetree/bindings/sound/tas5720.txt          |  26 +
 sound/soc/codecs/Kconfig                           |  10 +
 sound/soc/codecs/Makefile                          |   2 +
 sound/soc/codecs/tas5720.c                         | 638 +++++++++++++++++++++
 sound/soc/codecs/tas5720.h                         |  90 +++
 5 files changed, 766 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/tas5720.txt
 create mode 100644 sound/soc/codecs/tas5720.c
 create mode 100644 sound/soc/codecs/tas5720.h
Signature · 6 lines
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH v3 1/2 ASoC: codecs: add TA5720 digital amplifier DT bindings

The Texas Instruments TAS5720L/M device is a high-efficiency mono Class-D audio power amplifier optimized for high transient power capability to use the dynamic power headroom of small loudspeakers. Its digital time division multiplexed (TDM) interface enables up to 16 devices to share the same bus.

---
 .../devicetree/bindings/sound/tas5720.txt          | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/tas5720.txt
Documentation/devicetree/bindings/sound/tas5720.txt new file +26 -0
new file mode 100644
index 0000000..439451e
@@ -0,0 +1,26 @@
+Texas Instruments TAS5720 Mono Audio amplifier
+
+The TAS5720 serial control bus communicates through the I2C protocol only. The
+serial bus is also used for periodic codec fault checking/reporting during
+audio playback. For more product information please see the links below:
+
+http://www.ti.com/product/TAS5720L
+http://www.ti.com/product/TAS5720M
+
+Required properties:
+
+- compatible : "ti,tas5720"
+- reg : I2C slave address
+
+Optional properties:
+
+- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
+- pvdd-supply : phandle to a supply used for the Class-D amp and the analog
+
+Example:
+
+tas5720: tas5720@6c {
+	status = "okay";
+	compatible = "ti,tas5720";
+	reg = <0x6c>;
+};
Signature · 1 line
2.6.4
maintainer
#2 lore raw

Re: [PATCH v3 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings

Documentation/devicetree/bindings/sound/tas5720.txt line 18

Quoted 4 lines · Andreas Dannenberg
Documentation/devicetree/bindings/sound/tas5720.txt new file +4 -0
+Optional properties:
+
+- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
+- pvdd-supply : phandle to a supply used for the Class-D amp and the analog

This suggests that the device doesn't need power...

#3 lore raw

Re: [PATCH v3 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings

Quoted 8 lines · Mark Brown

Documentation/devicetree/bindings/sound/tas5720.txt line 18

Quoted 4 lines · Andreas Dannenberg
Documentation/devicetree/bindings/sound/tas5720.txt new file +4 -0
+Optional properties:
+
+- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
+- pvdd-supply : phandle to a supply used for the Class-D amp and the analog

This suggests that the device doesn't need power...

Hi Mark,
no power, now that would be nice! :) What this was supposed to mean is that the properties are optional, the power of course is not. The DT has really no control over how I wire up my HW and I'd argue most folks just permanently power the TAS5720 since the shutdown current is just a few uAs IIRC in order to save some BOM cost. But I suppose the DT description is such that the Kernel can more intelligently handle things based on what the driver is doing if somebody choses and implements additional regulator/power switch HW. Or did I misunderstand your point?

Thanks,
Andreas

maintainer
#4 lore raw

Re: [PATCH v3 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings

Quoted 5 lines · Andreas Dannenberg
Quoted 3 lines · Mark Brown
Quoted 1 line · Andreas Dannenberg

+Optional properties:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
+- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
+- pvdd-supply : phandle to a supply used for the Class-D amp and the analog

This suggests that the device doesn't need power...

no power, now that would be nice! :) What this was supposed to mean is that the properties are optional, the power of course is not. The DT has

They should only be optional if they may really be missing. We may attempt to be liberal in the DTs we accept but we should not encourage sloppily written DTs.

Quoted 6 lines

really no control over how I wire up my HW and I'd argue most folks just permanently power the TAS5720 since the shutdown current is just a few uAs IIRC in order to save some BOM cost. But I suppose the DT description is such that the Kernel can more intelligently handle things based on what the driver is doing if somebody choses and implements additional regulator/power switch HW. Or did I misunderstand your point?

It doesn't really matter if a given system ends up controlling things actively, we still want to be consistent in describing them since it is less error prone when it does become relevant.

#5 lore raw

Re: [PATCH v3 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings

Quoted 9 lines · Mark Brown
Quoted 7 lines · Andreas Dannenberg
Quoted 6 lines · Mark Brown
Quoted 4 lines · Andreas Dannenberg

+Optional properties:

+- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
+- pvdd-supply : phandle to a supply used for the Class-D amp and the analog
Quoted 8 lines
Quoted 4 lines
Quoted 1 line

This suggests that the device doesn't need power...

no power, now that would be nice! :) What this was supposed to mean is that the properties are optional, the power of course is not. The DT has

They should only be optional if they may really be missing. We may attempt to be liberal in the DTs we accept but we should not encourage sloppily written DTs.

Thanks for the guidance and the background. Will move them to "required" but I'll wait a few more days before re-submitting in case there is additional feedback on the patch series.

Regards,
Andreas

Quoted 11 lines
Quoted 7 lines

really no control over how I wire up my HW and I'd argue most folks just permanently power the TAS5720 since the shutdown current is just a few uAs IIRC in order to save some BOM cost. But I suppose the DT description is such that the Kernel can more intelligently handle things based on what the driver is doing if somebody choses and implements additional regulator/power switch HW. Or did I misunderstand your point?

It doesn't really matter if a given system ends up controlling things actively, we still want to be consistent in describing them since it is less error prone when it does become relevant.

#6 lore raw

PATCH v3 2/2 ASoC: codecs: add support for TAS5720 digital amplifier

In reply to Andreas Dannenberg

The Texas Instruments TAS5720L/M device is a high-efficiency mono Class-D audio power amplifier optimized for high transient power capability to use the dynamic power headroom of small loudspeakers. Its digital time division multiplexed (TDM) interface enables up to 16 devices to share the same bus.

---
 sound/soc/codecs/Kconfig   |  10 +
 sound/soc/codecs/Makefile  |   2 +
 sound/soc/codecs/tas5720.c | 638 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/tas5720.h |  90 +++++++
 4 files changed, 740 insertions(+)
 create mode 100644 sound/soc/codecs/tas5720.c
 create mode 100644 sound/soc/codecs/tas5720.h
sound/soc/codecs/Kconfig +10 -0
index 290f921..3949dae 100644
@@ -125,6 +125,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_TAS2552 if I2C
 	select SND_SOC_TAS5086 if I2C
 	select SND_SOC_TAS571X if I2C
+	select SND_SOC_TAS5720 if I2C
 	select SND_SOC_TFA9879 if I2C
 	select SND_SOC_TLV320AIC23_I2C if I2C
 	select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
@@ -748,6 +749,15 @@ config SND_SOC_TAS571X
 	tristate "Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 power amplifiers"
 	depends on I2C
 
+config SND_SOC_TAS5720
+	tristate "Texas Instruments TAS5720 Mono Audio amplifier"
+	depends on I2C
+	help
+	  Enable support for Texas Instruments TAS5720L/M high-efficiency mono
+	  Class-D audio power amplifiers. The devices use an I2C interface for
+	  setup/control and support an optional GPIO interrupt signal for fault
+	  reporting.
+
 config SND_SOC_TFA9879
 	tristate "NXP Semiconductors TFA9879 amplifier"
 	depends on I2C
sound/soc/codecs/Makefile +2 -0
index 448c61d..54433cb 100644
@@ -130,6 +130,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-tas5720-objs := tas5720.o
 snd-soc-tfa9879-objs := tfa9879.o
 snd-soc-tlv320aic23-objs := tlv320aic23.o
 snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
@@ -339,6 +340,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_TAS5720)	+= snd-soc-tas5720.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/tas5720.c new file +638 -0

638 lines not on this page · raw message

sound/soc/codecs/tas5720.h new file +90 -0

90 lines not on this page · raw message

Signature · 1 line
2.6.4
maintainer
#7 lore raw

On Mon, Apr 25, 2016 at 03:17:36PM -0500, Andreas Dannenberg wrote:

This looks mostly good, a few small things below.

Quoted 5 lines
sound/soc/codecs/tas5720.c new file +5 -0
+	switch (width) {
+	case 16:
+	case 18:
+	case 20:
+	case 24:

sound/soc/codecs/tas5720.c line 79

Quoted 10 lines
sound/soc/codecs/tas5720.c new file +10 -0
+		/*
+		 * We only support the different left-justified serial audio
+		 * formats in which case there is nothing to configure in the
+		 * TAS5720.
+		 */
+		break;
+	default:
+		dev_err(codec->dev, "unsupported sample size: %d\n", width);
+		return -EINVAL;
+	}

If the driver doesn't do anything just remove the code.

sound/soc/codecs/tas5720.c line 245

Quoted 2 lines
sound/soc/codecs/tas5720.c new file +2 -0
+	if ((curr_fault & TAS5720_OCE) && !(tas5720->last_fault & TAS5720_OCE))
+		dev_warn(dev, "The Class-D output stage has experienced an over current event\n");

"Class D over current". The verbosity is making the line over long and the phrasing is a bit unclear (and makes it seem less critical than it really is). These should probably be dev_crit() or somthing too, over current and similar events on a speaker output are generally extremely serious.

#8 lore raw

Hi Mark, thanks for the continued feedback, please see below...

Quoted 13 lines · Mark Brown

On Mon, Apr 25, 2016 at 03:17:36PM -0500, Andreas Dannenberg wrote:

This looks mostly good, a few small things below.

Quoted 9 lines
sound/soc/codecs/tas5720.c new file +9 -0
+	switch (width) {
+	case 16:
+	case 18:
+	case 20:
+	case 24:
+		/*
+		 * We only support the different left-justified serial audio
+		 * formats in which case there is nothing to configure in the
+		 * TAS5720.
Quoted 8 lines

sound/soc/codecs/tas5720.c line 79

Quoted 6 lines
sound/soc/codecs/tas5720.c new file +6 -0
+		 */
+		break;
+	default:
+		dev_err(codec->dev, "unsupported sample size: %d\n", width);
+		return -EINVAL;
+	}

If the driver doesn't do anything just remove the code.

Well it's doing something which is making sure the nobody passes in a sample size that's not supported. Wouldn't we want to catch this?

Quoted 9 lines

sound/soc/codecs/tas5720.c line 245

Quoted 3 lines
sound/soc/codecs/tas5720.c new file +2 -0
+	if ((curr_fault & TAS5720_OCE) && !(tas5720->last_fault & TAS5720_OCE))
+		dev_warn(dev, "The Class-D output stage has experienced an over current event\n");

"Class D over current". The verbosity is making the line over long and the phrasing is a bit unclear (and makes it seem less critical than it really is). These should probably be dev_crit() or somthing too, over current and similar events on a speaker output are generally extremely serious.

The overlong line goes through checkpatch --strict and looks like an accepted practice to prevent breaking "grep" for example. The text is more or less from the datasheet to give people something they can cross-associate. But I can try to short this a bit.

You made a good point with the dev_crit(), I can certainly promote this over current condition. It happens for example if I drive too big of a load (a heavy-duty jumper wire in my case, simulating a short of the output stage). If so, we should also consider the other two fault conditions. For the "over temp" error condition (which is actually really hard to create on the bench, I've to get the EVM up to like 150C and things start smelling a bit) this should probably be dev_crit() as well. And then, maybe leave the "DC error" as a warning, since it's less critical than the other two conditions. Thoughts?

Regards,
Andreas

maintainer
#9 lore raw
Quoted 6 lines · Andreas Dannenberg
Quoted 1 line · Mark Brown

If the driver doesn't do anything just remove the code.

Well it's doing something which is making sure the nobody passes in a sample size that's not supported. Wouldn't we want to catch this?

Is the device actually going to mess up if someone sends it something else or is it just going to ignore the extra bits (given that it's doing autodetection anyway).

Quoted 9 lines
Quoted 8 lines

sound/soc/codecs/tas5720.c line 245

Quoted 2 lines
sound/soc/codecs/tas5720.c new file +2 -0
+	if ((curr_fault & TAS5720_OCE) && !(tas5720->last_fault & TAS5720_OCE))
+		dev_warn(dev, "The Class-D output stage has experienced an over current event\n");

"Class D over current". The verbosity is making the line over long and the phrasing is a bit unclear (and makes it seem less critical than it really is). These should probably be dev_crit() or somthing too, over current and similar events on a speaker output are generally extremely serious.

Quoted 4 lines

The overlong line goes through checkpatch --strict and looks like an accepted practice to prevent breaking "grep" for example. The text is more or less from the datasheet to give people something they can cross-associate. But I can try to short this a bit.

It's not just the fact that it's wrapping round to the next line, it's also the fact that it's very weakly phrased for something which might reasonably indicate an actual fire risk. I'm pretty sure people will not struggle excessively to find the reference to over current in the datasheet.

Quoted 3 lines

conditions. For the "over temp" error condition (which is actually really hard to create on the bench, I've to get the EVM up to like 150C and things start smelling a bit) this should probably be dev_crit() as

If the silicon is flagging an over temperature condition that tends to indicate a catastrophic physical failure in the system, it is likely that the speaker itself has failed or there's otherwise a short in the speaker output path and potentially other physical damage especially in smaller systems where you might find that for example there's thermal damage to the case (and possibly even the user).

Quoted 2 lines

well. And then, maybe leave the "DC error" as a warning, since it's less critical than the other two conditions. Thoughts?

If you're pushing DC through a speaker that will generally mean that you will shortly see one or both of the over current and over temperature errors, it's really not something they're designed for.

#10 lore raw
Quoted 11 lines · Mark Brown
Quoted 6 lines · Andreas Dannenberg
Quoted 1 line · Mark Brown

If the driver doesn't do anything just remove the code.

Well it's doing something which is making sure the nobody passes in a sample size that's not supported. Wouldn't we want to catch this?

Is the device actually going to mess up if someone sends it something else or is it just going to ignore the extra bits (given that it's doing autodetection anyway).

Hi Mark,
well in any of the left-justified modes (which are the only ones the driver supports) the device takes and processes as many bits as it can given the clock and divider settings. Any extra bits provided will get ignored, and the next sync happens on the frame sync signal and not by counting bits so there is no downside also as confirmed by some bench testing I did feeding in 32-bit long frames for one channel. This seems like a case of preferring tolerance over strictly enforcing datasheet-advertised bit-widths. Will take out the check code.

Quoted 15 lines
Quoted 10 lines
Quoted 9 lines

sound/soc/codecs/tas5720.c line 245

Quoted 3 lines
sound/soc/codecs/tas5720.c new file +2 -0
+	if ((curr_fault & TAS5720_OCE) && !(tas5720->last_fault & TAS5720_OCE))
+		dev_warn(dev, "The Class-D output stage has experienced an over current event\n");

"Class D over current". The verbosity is making the line over long and the phrasing is a bit unclear (and makes it seem less critical than it really is). These should probably be dev_crit() or somthing too, over current and similar events on a speaker output are generally extremely serious.

Quoted 4 lines

The overlong line goes through checkpatch --strict and looks like an accepted practice to prevent breaking "grep" for example. The text is more or less from the datasheet to give people something they can cross-associate. But I can try to short this a bit.

Quoted 5 lines

It's not just the fact that it's wrapping round to the next line, it's also the fact that it's very weakly phrased for something which might reasonably indicate an actual fire risk. I'm pretty sure people will not struggle excessively to find the reference to over current in the datasheet.

Ok will tweak it.

Quoted 10 lines
Quoted 3 lines

conditions. For the "over temp" error condition (which is actually really hard to create on the bench, I've to get the EVM up to like 150C and things start smelling a bit) this should probably be dev_crit() as

If the silicon is flagging an over temperature condition that tends to indicate a catastrophic physical failure in the system, it is likely that the speaker itself has failed or there's otherwise a short in the speaker output path and potentially other physical damage especially in smaller systems where you might find that for example there's thermal damage to the case (and possibly even the user).

Yes make sense. As suggested promoting this to dev_crit() and making sure its adequately phrased will help.

Quoted 7 lines
Quoted 3 lines

well. And then, maybe leave the "DC error" as a warning, since it's less critical than the other two conditions. Thoughts?

If you're pushing DC through a speaker that will generally mean that you will shortly see one or both of the over current and over temperature errors, it's really not something they're designed for.

I had to actually craft my own DC "audio" file to play with aplay to trigger this error during testing. So when this happens I'd think it is likely something userspace is "doing wrong" (of course there could be other reasons too such a broken-off SAIF DIN/DOUT trace) but let's make this also for the sake of consistency a dev_crit() too.

Along these lines, earlier as I was rummaging through the existing drivers looking for a solution I could model after I noticed that most(?) ASoC codec drivers don't have any type of HW fault checking, at at least whatever drivers I looked at. Not sure why this is but given this discussion this seems like a general opportunity to make improvements.

Regards,
Andreas

maintainer
#11 lore raw
Quoted 6 lines · Andreas Dannenberg
Quoted 3 lines · Mark Brown

Is the device actually going to mess up if someone sends it something else or is it just going to ignore the extra bits (given that it's doing autodetection anyway).

Quoted 8 lines

well in any of the left-justified modes (which are the only ones the driver supports) the device takes and processes as many bits as it can given the clock and divider settings. Any extra bits provided will get ignored, and the next sync happens on the frame sync signal and not by counting bits so there is no downside also as confirmed by some bench testing I did feeding in 32-bit long frames for one channel. This seems like a case of preferring tolerance over strictly enforcing datasheet-advertised bit-widths. Will take out the check code.

OK, accepting extra bits is fine. You should set sig_bits in the DAI so userspace can see what's going on if it cares.

Quoted 6 lines

Along these lines, earlier as I was rummaging through the existing drivers looking for a solution I could model after I noticed that most(?) ASoC codec drivers don't have any type of HW fault checking, at at least whatever drivers I looked at. Not sure why this is but given this discussion this seems like a general opportunity to make improvements.

There are some with over temperature handling (eg, wm8962) but it's relatively uncommon for observable protection features to be implemented in silicon and even rarer for the interrupts to be hooked up (and hence useful to support in software) unless there is also accessory detection in the device. On older devices the required digital logic was often excessively expensive and realistically only relatively high power speaker drivers have much risk of something going wrong - things like headphone outputs or smaller speaker drivers end up with protection from their supplies collapsing well before the device is in physical danger.

#12 lore raw

Mark, please see below...

Quoted 16 lines · Mark Brown
Quoted 6 lines · Andreas Dannenberg
Quoted 3 lines · Mark Brown

Is the device actually going to mess up if someone sends it something else or is it just going to ignore the extra bits (given that it's doing autodetection anyway).

Quoted 8 lines

well in any of the left-justified modes (which are the only ones the driver supports) the device takes and processes as many bits as it can given the clock and divider settings. Any extra bits provided will get ignored, and the next sync happens on the frame sync signal and not by counting bits so there is no downside also as confirmed by some bench testing I did feeding in 32-bit long frames for one channel. This seems like a case of preferring tolerance over strictly enforcing datasheet-advertised bit-widths. Will take out the check code.

Quoted 2 lines

OK, accepting extra bits is fine. You should set sig_bits in the DAI so userspace can see what's going on if it cares.

I just had a quick look to see what sig_bits does, yes this is a good addition. Will post a follow-up patch based on the driver that you already accepted into your tree.

(Btw I'm working on another codec driver and I don't stop getting positively surprised how flexible and powerful the overall ASoC framework is).

Regards,
Andreas

Quoted 16 lines
Quoted 6 lines

Along these lines, earlier as I was rummaging through the existing drivers looking for a solution I could model after I noticed that most(?) ASoC codec drivers don't have any type of HW fault checking, at at least whatever drivers I looked at. Not sure why this is but given this discussion this seems like a general opportunity to make improvements.

There are some with over temperature handling (eg, wm8962) but it's relatively uncommon for observable protection features to be implemented in silicon and even rarer for the interrupts to be hooked up (and hence useful to support in software) unless there is also accessory detection in the device. On older devices the required digital logic was often excessively expensive and realistically only relatively high power speaker drivers have much risk of something going wrong - things like headphone outputs or smaller speaker drivers end up with protection from their supplies collapsing well before the device is in physical danger.

#13 lore raw
In reply to Andreas Dannenberg
Quoted 30 lines · Andreas Dannenberg

The Texas Instruments TAS5720L/M device is a high-efficiency mono Class-D audio power amplifier optimized for high transient power capability to use the dynamic power headroom of small loudspeakers. Its digital time division multiplexed (TDM) interface enables up to 16 devices to share the same bus.

---
 sound/soc/codecs/Kconfig   |  10 +
 sound/soc/codecs/Makefile  |   2 +
 sound/soc/codecs/tas5720.c | 638 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/tas5720.h |  90 +++++++
 4 files changed, 740 insertions(+)
 create mode 100644 sound/soc/codecs/tas5720.c
 create mode 100644 sound/soc/codecs/tas5720.h
sound/soc/codecs/Kconfig +1 -0
index 290f921..3949dae 100644
@@ -125,6 +125,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_TAS2552 if I2C
 	select SND_SOC_TAS5086 if I2C
 	select SND_SOC_TAS571X if I2C
+	select SND_SOC_TAS5720 if I2C
 	select SND_SOC_TFA9879 if I2C
 	select SND_SOC_TLV320AIC23_I2C if I2C
 	select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
@@ -748,6 +749,15 @@ config SND_SOC_TAS571X
 	tristate "Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 power amplifiers"

sound/soc/codecs/Kconfig config SND_SOC_TAS571X · line 759

Quoted 10 lines
sound/soc/codecs/Kconfig +8 -0
 	depends on I2C
 
+config SND_SOC_TAS5720
+	tristate "Texas Instruments TAS5720 Mono Audio amplifier"
+	depends on I2C
+	help
+	  Enable support for Texas Instruments TAS5720L/M high-efficiency mono
+	  Class-D audio power amplifiers. The devices use an I2C interface for
+	  setup/control and support an optional GPIO interrupt signal for fault
+	  reporting.

If fault reporting is no longer interrupt based could this be re-worded?

[...]

sound/soc/codecs/Kconfig config SND_SOC_TAS571X

Quoted 5 lines
sound/soc/codecs/Kconfig +5 -0
+
+static struct i2c_driver tas5720_i2c_driver = {
+	.driver = {
+		.name = "tas5720",
+		.owner = THIS_MODULE,

This shouldn't be needed.

Andrew

#14 lore raw
Quoted 33 lines · Andrew F. Davis
Quoted 32 lines · Andreas Dannenberg

The Texas Instruments TAS5720L/M device is a high-efficiency mono Class-D audio power amplifier optimized for high transient power capability to use the dynamic power headroom of small loudspeakers. Its digital time division multiplexed (TDM) interface enables up to 16 devices to share the same bus.

---
 sound/soc/codecs/Kconfig   |  10 +
 sound/soc/codecs/Makefile  |   2 +
 sound/soc/codecs/tas5720.c | 638 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/tas5720.h |  90 +++++++
 4 files changed, 740 insertions(+)
 create mode 100644 sound/soc/codecs/tas5720.c
 create mode 100644 sound/soc/codecs/tas5720.h
sound/soc/codecs/Kconfig +1 -0
index 290f921..3949dae 100644
@@ -125,6 +125,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_TAS2552 if I2C
 	select SND_SOC_TAS5086 if I2C
 	select SND_SOC_TAS571X if I2C
+	select SND_SOC_TAS5720 if I2C
 	select SND_SOC_TFA9879 if I2C
 	select SND_SOC_TLV320AIC23_I2C if I2C
 	select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
@@ -748,6 +749,15 @@ config SND_SOC_TAS571X
 	tristate "Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 power amplifiers"
 	depends on I2C
 
Quoted 10 lines

sound/soc/codecs/Kconfig config SND_SOC_TAS571X · line 759

Quoted 8 lines
sound/soc/codecs/Kconfig +8 -0
+config SND_SOC_TAS5720
+	tristate "Texas Instruments TAS5720 Mono Audio amplifier"
+	depends on I2C
+	help
+	  Enable support for Texas Instruments TAS5720L/M high-efficiency mono
+	  Class-D audio power amplifiers. The devices use an I2C interface for
+	  setup/control and support an optional GPIO interrupt signal for fault
+	  reporting.

If fault reporting is no longer interrupt based could this be re-worded?

Good catch! Thanks Andrew.

Quoted 10 lines

[...]

sound/soc/codecs/Kconfig

Quoted 5 lines
sound/soc/codecs/Kconfig +5 -0
+
+static struct i2c_driver tas5720_i2c_driver = {
+	.driver = {
+		.name = "tas5720",
+		.owner = THIS_MODULE,

This shouldn't be needed.

Yes. I recall your recent mass-optimizations. Will remove.

Regards,
Andreas