ASoC: tas2781: Support two newly-released amplifiers tas5815 and tas5828 in the driver
Baojun Xu
maintainerPATCH v3 1/2 ASoC: tas2781: Support two newly-released amplifiers tas5815 and tas5828 in the driver
TAS5815/TAS5828 has on-chip DSP without current/voltage feedback.
---
v3:
- Rewrite the patch title
- Add for TAS5815 support
v2:
- Update description for TAS5828
- Change commit tree to .../tiwai/sound.git
--- include/sound/tas2781.h | 2 ++ sound/soc/codecs/tas2781-i2c.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-)
include/sound/tas2781.h +2 -0
@@ -120,8 +120,10 @@ enum audio_device {TAS2570 ,TAS2572 ,TAS2781 , +TAS5815 ,TAS5825 ,TAS5827 , +TAS5828 , TAS_OTHERS, };
sound/soc/codecs/tas2781-i2c.c +14 -2
@@ -108,8 +108,10 @@ static const struct i2c_device_id tasdevice_id[] = { { "tas2570", TAS2570 }, { "tas2572", TAS2572 }, { "tas2781", TAS2781 }, + { "tas5815", TAS5815 }, { "tas5825", TAS5825 }, { "tas5827", TAS5827 }, + { "tas5828", TAS5828 }, {} };MODULE_DEVICE_TABLE (i2c, tasdevice_id);
@@ -124,8 +126,10 @@ static const struct of_device_id tasdevice_of_match[] = { { .compatible = "ti,tas2570" }, { .compatible = "ti,tas2572" }, { .compatible = "ti,tas2781" }, + { .compatible = "ti,tas5815" }, { .compatible = "ti,tas5825" }, { .compatible = "ti,tas5827" }, + { .compatible = "ti,tas5828" }, {}, };MODULE_DEVICE_TABLE (of, tasdevice_of_match);
@@ -1665,8 +1669,10 @@ static void tasdevice_fw_ready(const struct firmware *fmw, } tas_priv->fw_state =TASDEVICE_DSP_FW_ALL_OK ; -/* There is no calibration required for TAS5825/TAS5827. */ -if (tas_priv->chip_id <TAS5825 ) { +/* There is no calibration required for +* TAS5815/TAS5825/TAS5827/TAS5828. +*/ +if (tas_priv->chip_id <TAS5815 ) { ret =tasdevice_create_cali_ctrls (tas_priv);if (ret) {dev_err (tas_priv->dev,"cali controls error\n" );
@@ -1720,8 +1726,10 @@ static void tasdevice_fw_ready(const struct firmware *fmw,switch (tas_priv->chip_id) {case TAS2563 :case TAS2781 : +case TAS5815 :case TAS5825 :case TAS5827 : +case TAS5828 :/* If DSP FW fail, DSP kcontrol won't be created. */ tasdevice_dsp_remove (tas_priv); }
@@ -1882,8 +1890,10 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec) p = (struct snd_kcontrol_new *)tas2781_snd_controls; size =ARRAY_SIZE (tas2781_snd_controls);break ; +case TAS5815 :case TAS5825 :case TAS5827 : +case TAS5828 : p = (struct snd_kcontrol_new *)tas5825_snd_controls; size =ARRAY_SIZE (tas5825_snd_controls);break ;
@@ -2054,8 +2064,10 @@ static const struct acpi_device_id tasdevice_acpi_match[] = { { "TXNW2570", TAS2570 }, { "TXNW2572", TAS2572 }, { "TXNW2781", TAS2781 }, + { "TXNW5815", TAS5815 }, { "TXNW5825", TAS5825 }, { "TXNW5827", TAS5827 }, + { "TXNW5828", TAS5828 }, {}, };
Signature · 1 line
2.25.1
Baojun Xu
maintainerPATCH v3 2/2 ASoC: tas2781: Update ti,tas2781.yaml for adding tas5815 and tas5828
Update ti,tas2781.yaml for adding TAS5815/TAS5828.
---
v3:
- Rewrite the patch title
- Add TAS5815 support in yaml file
v2:
- Update description for TAS5828
- Change commit tree to .../tiwai/sound.git
--- .../devicetree/bindings/sound/ti,tas2781.yaml | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +26 -1
@@ -24,7 +24,7 @@ description: | Instruments Smart Amp speaker protection algorithm. The integrated speaker voltage and current sense provides for real time monitoring of loudspeaker behavior. - The TAS5825/TAS5827 is a stereo, digital input Class-D audio + The TAS5825/TAS5827/TAS5828 is a stereo, 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.
@@ -35,8 +35,10 @@ description: | https://www.ti.com/lit/gpn/tas2563 https://www.ti.com/lit/gpn/tas2572 https://www.ti.com/lit/gpn/tas2781 + https://www.ti.com/lit/gpn/tas5815 https://www.ti.com/lit/gpn/tas5825m https://www.ti.com/lit/gpn/tas5827 + https://www.ti.com/lit/gpn/tas5828m properties: compatible:
@@ -65,11 +67,17 @@ properties: Protection and Audio Processing, 16/20/24/32bit stereo I2S or multichannel TDM. + ti,tas5815: 30-W, Digital Input, Stereo, Closed-loop Class-D Audio + Amplifier with 96 kHz Enhanced Processing + ti,tas5825: 38-W Stereo, Inductor-Less, Digital Input, Closed-Loop 4.5V to 26.4V Class-D Audio Amplifier with 192-kHz Extended Audio Processing. ti,tas5827: 47-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D Amplifier with Class-H Algorithm + + ti,tas5828: 50-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D + Amplifier with Hybrid-Pro Algorithm oneOf: - items: - enum:
@@ -80,8 +88,10 @@ properties: - ti,tas2563 - ti,tas2570 - ti,tas2572 + - ti,tas5815 - ti,tas5825 - ti,tas5827 + - ti,tas5828 - const: ti,tas2781 - enum: - ti,tas2781
@@ -177,12 +187,27 @@ allOf: minimum: 0x38 maximum: 0x3f + - if: + properties: + compatible: + contains: + enum: + - ti,tas5815 + then: + properties: + reg: + maxItems: 4 + items: + minimum: 0x54 + maximum: 0x57 + - if: properties: compatible: contains: enum: - ti,tas5827 + - ti,tas5828 then: properties: reg:
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [PATCH v3 2/2] ASoC: tas2781: Update ti,tas2781.yaml for adding tas5815 and tas5828
Quoted 1 line · Baojun Xu
Update ti,tas2781.yaml for adding TAS5815/TAS5828.
That is clear from the diff. Say something about how these chips compare to the existing ones.
Quoted 6 lines
Signed-off-by Baojun Xu <[email protected]>---
v3:
- Rewrite the patch title
'git log --oneline' on the file or subsystem is a hint of what the subject should look like. In this case, something like:
ASoC: dt-bindings: ti,tas2781: Add TAS5815 and TAS5828
Quoted 92 lines
- Add TAS5815 support in yaml file
v2:
- Update description for TAS5828
- Change commit tree to .../tiwai/sound.git--- .../devicetree/bindings/sound/ti,tas2781.yaml | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/sound/ti,tas2781.yaml +26
-1@@ -24,7 +24,7 @@ description: | Instruments Smart Amp speaker protection algorithm. The integrated speaker voltage and current sense provides for real time monitoring of loudspeaker behavior. - The TAS5825/TAS5827 is a stereo, digital input Class-D audio + The TAS5825/TAS5827/TAS5828 is a stereo, 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.@@ -35,8 +35,10 @@ description: | https://www.ti.com/lit/gpn/tas2563 https://www.ti.com/lit/gpn/tas2572 https://www.ti.com/lit/gpn/tas2781 + https://www.ti.com/lit/gpn/tas5815 https://www.ti.com/lit/gpn/tas5825m https://www.ti.com/lit/gpn/tas5827 + https://www.ti.com/lit/gpn/tas5828m properties: compatible:@@ -65,11 +67,17 @@ properties: Protection and Audio Processing, 16/20/24/32bit stereo I2S or multichannel TDM. + ti,tas5815: 30-W, Digital Input, Stereo, Closed-loop Class-D Audio + Amplifier with 96 kHz Enhanced Processing + ti,tas5825: 38-W Stereo, Inductor-Less, Digital Input, Closed-Loop 4.5V to 26.4V Class-D Audio Amplifier with 192-kHz Extended Audio Processing. ti,tas5827: 47-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D Amplifier with Class-H Algorithm + + ti,tas5828: 50-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D + Amplifier with Hybrid-Pro Algorithm oneOf: - items: - enum:@@ -80,8 +88,10 @@ properties: - ti,tas2563 - ti,tas2570 - ti,tas2572 + - ti,tas5815 - ti,tas5825 - ti,tas5827 + - ti,tas5828 - const: ti,tas2781 - enum: - ti,tas2781@@ -177,12 +187,27 @@ allOf: minimum: 0x38 maximum: 0x3f + - if: + properties: + compatible: + contains: + enum: + - ti,tas5815 + then: + properties: + reg: + maxItems: 4 + items: + minimum: 0x54 + maximum: 0x57 + - if: properties: compatible: contains: enum: - ti,tas5827 + - ti,tas5828 then: properties: reg:Signature · 1 line
2.25.1