ASoC: tas2781: Add tas2568/2574/5806m/5806md/5830 support
Baojun Xu
maintainerPATCH v2 1/2 ASoC: tas2781: Add tas2568/2574/5806m/5806md/5830 support
TAS5806M, TAS5806MD, TAS5830 has on-chip DSP without current/voltage feedback, and in same family with TAS58XX.
TAS2568, TAS2574 is in family with TAS257X.
---
v2:
- Add TAS2574 support.
--- include/sound/tas2781.h | 5 +++++ sound/soc/codecs/tas2781-i2c.c | 29 ++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-)
include/sound/tas2781.h +5 -0
@@ -117,15 +117,20 @@ enum audio_device {TAS2120 ,TAS2320 ,TAS2563 , +TAS2568 ,TAS2570 ,TAS2572 , +TAS2574 ,TAS2781 ,TAS5802 , +TAS5806M , +TAS5806MD ,TAS5815 ,TAS5822 ,TAS5825 ,TAS5827 ,TAS5828 , +TAS5830 , TAS_OTHERS, };
sound/soc/codecs/tas2781-i2c.c +26 -3
@@ -105,15 +105,20 @@ static const struct i2c_device_id tasdevice_id[] = { { "tas2120", TAS2120 }, { "tas2320", TAS2320 }, { "tas2563", TAS2563 }, + { "tas2568", TAS2568 }, { "tas2570", TAS2570 }, { "tas2572", TAS2572 }, + { "tas2574", TAS2574 }, { "tas2781", TAS2781 }, { "tas5802", TAS5802 }, + { "tas5806m", TAS5806M }, + { "tas5806md", TAS5806MD }, { "tas5815", TAS5815 }, { "tas5822", TAS5822 }, { "tas5825", TAS5825 }, { "tas5827", TAS5827 }, { "tas5828", TAS5828 }, + { "tas5830", TAS5830 }, {} };MODULE_DEVICE_TABLE (i2c, tasdevice_id);
@@ -125,15 +130,20 @@ static const struct of_device_id tasdevice_of_match[] = { { .compatible = "ti,tas2120" }, { .compatible = "ti,tas2320" }, { .compatible = "ti,tas2563" }, + { .compatible = "ti,tas2568" }, { .compatible = "ti,tas2570" }, { .compatible = "ti,tas2572" }, + { .compatible = "ti,tas2574" }, { .compatible = "ti,tas2781" }, { .compatible = "ti,tas5802" }, + { .compatible = "ti,tas5806m" }, + { .compatible = "ti,tas5806md" }, { .compatible = "ti,tas5815" }, { .compatible = "ti,tas5822" }, { .compatible = "ti,tas5825" }, { .compatible = "ti,tas5827" }, { .compatible = "ti,tas5828" }, + { .compatible = "ti,tas5830" }, {}, };MODULE_DEVICE_TABLE (of, tasdevice_of_match);
@@ -1643,8 +1653,10 @@ static void tasdevice_fw_ready(const struct firmware *fmw,case TAS2118 :case TAS2120 :case TAS2320 : +case TAS2568 :case TAS2570 :case TAS2572 : +case TAS2574 : goto out; }if (tas_priv->name_prefix)
@@ -1670,9 +1682,7 @@ static void tasdevice_fw_ready(const struct firmware *fmw, } tas_priv->fw_state =TASDEVICE_DSP_FW_ALL_OK ; -/* There is no calibration required for -* TAS5802/TAS5815/TAS5822/TAS5825/TAS5827/TAS5828. -*/ +/* There is no calibration required for TAS58XX. */ if (tas_priv->chip_id <TAS5802 ) { ret =tasdevice_create_cali_ctrls (tas_priv);if (ret) {
@@ -1728,11 +1738,14 @@ static void tasdevice_fw_ready(const struct firmware *fmw,case TAS2563 :case TAS2781 :case TAS5802 : +case TAS5806M : +case TAS5806MD :case TAS5815 :case TAS5822 :case TAS5825 :case TAS5827 :case TAS5828 : +case TAS5830 :/* If DSP FW fail, DSP kcontrol won't be created. */ tasdevice_dsp_remove (tas_priv); }
@@ -1883,8 +1896,10 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec)case TAS2118 :case TAS2120 :case TAS2320 : +case TAS2568 :case TAS2570 :case TAS2572 : +case TAS2574 : p = (struct snd_kcontrol_new *)tas2x20_snd_controls; size =ARRAY_SIZE (tas2x20_snd_controls); tas_priv->dvc_tlv_table = tas2x20_dvc_table;
@@ -1894,11 +1909,14 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec) size =ARRAY_SIZE (tas2781_snd_controls);break ;case TAS5802 : +case TAS5806M : +case TAS5806MD :case TAS5815 :case TAS5822 :case TAS5825 :case TAS5827 :case TAS5828 : +case TAS5830 : p = (struct snd_kcontrol_new *)tas5825_snd_controls; size =ARRAY_SIZE (tas5825_snd_controls);break ;
@@ -2072,15 +2090,20 @@ static const struct acpi_device_id tasdevice_acpi_match[] = { { "TXNW2120", TAS2120 }, { "TXNW2320", TAS2320 }, { "TXNW2563", TAS2563 }, + { "TXNW2568", TAS2568 }, { "TXNW2570", TAS2570 }, { "TXNW2572", TAS2572 }, + { "TXNW2574", TAS2574 }, { "TXNW2781", TAS2781 }, { "TXNW5802", TAS5802 }, + { "TXNW806M", TAS5806M }, + { "TXNW806D", TAS5806MD }, { "TXNW5815", TAS5815 }, { "TXNW5822", TAS5822 }, { "TXNW5825", TAS5825 }, { "TXNW5827", TAS5827 }, { "TXNW5828", TAS5828 }, + { "TXNW5830", TAS5830 }, {}, };
Signature · 1 line
2.25.1
Baojun Xu
maintainerPATCH v2 2/2 ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support
TAS5806M, TAS5806MD and TAS5830 is in same family with TAS58XX. TAS2568, TAS2574 is in family with TAS257X.
---
v2:
- Add TAS2574 support.
- Re-organize the patch, put compatible in front.
- Combined some chips as the reg setting is same (0x48-0x4b).
--- .../devicetree/bindings/sound/ti,tas2781.yaml | 103 ++++++++++++------ 1 file changed, 69 insertions(+), 34 deletions(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +69 -34
@@ -34,15 +34,61 @@ description: | https://www.ti.com/lit/gpn/tas2320 https://www.ti.com/lit/gpn/tas2563 https://www.ti.com/lit/gpn/tas2572 + https://www.ti.com/lit/gpn/tas2574 https://www.ti.com/lit/gpn/tas2781 + https://www.ti.com/lit/gpn/tas5806m + https://www.ti.com/lit/gpn/tas5806md https://www.ti.com/lit/gpn/tas5815 https://www.ti.com/lit/gpn/tas5822m https://www.ti.com/lit/gpn/tas5825m https://www.ti.com/lit/gpn/tas5827 https://www.ti.com/lit/gpn/tas5828m + https://www.ti.com/lit/gpn/tas5830 properties: compatible: + oneOf: + - enum: + - ti,tas2020 + - ti,tas2118 + - ti,tas2120 + - ti,tas2320 + - ti,tas2563 + - ti,tas2568 + - ti,tas2570 + - ti,tas2572 + - ti,tas2574 + - ti,tas2781 + - ti,tas5802 + - ti,tas5806m + - ti,tas5806md + - ti,tas5815 + - ti,tas5822 + - ti,tas5825 + - ti,tas5827 + - ti,tas5828 + - ti,tas5830 + - items: + - enum: + - ti,tas2020 + - ti,tas2118 + - ti,tas2120 + - ti,tas2320 + - ti,tas2563 + - ti,tas2568 + - ti,tas2570 + - ti,tas2572 + - ti,tas5802 + - ti,tas5806m + - ti,tas5806md + - ti,tas5815 + - ti,tas5822 + - ti,tas5825 + - ti,tas5827 + - ti,tas5828 + - ti,tas5830 + - const: ti,tas2781 + description: | ti,tas2020: 3.2-W Mono Digital Input Class-D Speaker Amp with 5.5V PVDD Support.
@@ -58,12 +104,18 @@ properties: ti,tas2563: 6.1-W Boosted Class-D Audio Amplifier With Integrated DSP and IV Sense, 16/20/24/32bit stereo I2S or multichannel TDM. + ti,tas2568: 5.3-W Digital Input Smart Amp with I/V Sense and Integrated + 10.75-V Class-H Boost + ti,tas2570: 5.8-W Digital Input smart amp with I/V sense and integrated 11-V Class-H Boost ti,tas2572: 6.6-W Digital Input smart amp with I/V sense and integrated 13-V Class-H Boost + ti,tas2574: 8.5-W Digital Input smart amp with I/V sense and integrated + 15-V Class-H Boost + ti,tas2781: 24-V Class-D Amplifier with Real Time Integrated Speaker Protection and Audio Processing, 16/20/24/32bit stereo I2S or multichannel TDM.
@@ -72,6 +124,14 @@ properties: Audio Amplifier with 96-Khz Extended Processing and Low Idle Power Dissipation. + ti,tas5806m: 23-W, Inductor-Less, Digital Input, Stereo, Closed-Loop + Class-D Audio Amplifier with Enhanced Processing and Low Power + Dissipation. + + ti,tas5806md: 23-W, Inductor-Less, Digital Input, Stereo, Closed-Loop + Class-D Audio Amplifier with Enhanced Processing and DirectPath(TM) + HP Driver + ti,tas5815: 30-W, Digital Input, Stereo, Closed-loop Class-D Audio Amplifier with 96 kHz Enhanced Processing
@@ -86,26 +146,9 @@ properties: ti,tas5828: 50-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D Amplifier with Hybrid-Pro Algorithm - oneOf: - - items: - - enum: - - ti,tas2020 - - ti,tas2118 - - ti,tas2120 - - ti,tas2320 - - ti,tas2563 - - ti,tas2570 - - ti,tas2572 - - ti,tas5802 - - ti,tas5815 - - ti,tas5822 - - ti,tas5825 - - ti,tas5827 - - ti,tas5828 - - const: ti,tas2781 - - enum: - - ti,tas2781 + ti,tas5830: 65-W Stereo, Digital Input, High Efficiency Closed-Loop + Class-D Amplifier with Class-H Algorithm reg: description: I2C address, in multiple-AMP case, all the i2c address
@@ -137,6 +180,10 @@ allOf: - ti,tas2118 - ti,tas2120 - ti,tas2320 + - ti,tas2568 + - ti,tas2570 + - ti,tas2572 + - ti,tas2574 then: properties: reg:
@@ -164,21 +211,6 @@ allOf: minimum: 0x4c maximum: 0x4f - - if: - properties: - compatible: - contains: - enum: - - ti,tas2570 - - ti,tas2572 - then: - properties: - reg: - maxItems: 4 - items: - minimum: 0x48 - maximum: 0x4b - - if: properties: compatible:
@@ -217,6 +249,8 @@ allOf: compatible: contains: enum: + - ti,tas5806m + - ti,tas5806md - ti,tas5822 then: properties:
@@ -233,6 +267,7 @@ allOf: enum: - ti,tas5827 - ti,tas5828 + - ti,tas5830 then: properties: reg:
Signature · 1 line
2.25.1
Re: [PATCH v2 2/2] ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support
Quoted 10 lines · Baojun Xu
TAS5806M, TAS5806MD and TAS5830 is in same family with TAS58XX. TAS2568, TAS2574 is in family with TAS257X.
Signed-off-by Baojun Xu <[email protected]>---
v2:
- Add TAS2574 support.
- Re-organize the patch, put compatible in front.
- Combined some chips as the reg setting is same (0x48-0x4b).
You need to provide reasons for dropping tags.
Quoted 39 lines
--- .../devicetree/bindings/sound/ti,tas2781.yaml | 103 ++++++++++++------ 1 file changed, 69 insertions(+), 34 deletions(-)Documentation/devicetree/bindings/sound/ti,tas2781.yaml +18
-0@@ -34,15 +34,61 @@ description: | https://www.ti.com/lit/gpn/tas2320 https://www.ti.com/lit/gpn/tas2563 https://www.ti.com/lit/gpn/tas2572 + https://www.ti.com/lit/gpn/tas2574 https://www.ti.com/lit/gpn/tas2781 + https://www.ti.com/lit/gpn/tas5806m + https://www.ti.com/lit/gpn/tas5806md https://www.ti.com/lit/gpn/tas5815 https://www.ti.com/lit/gpn/tas5822m https://www.ti.com/lit/gpn/tas5825m https://www.ti.com/lit/gpn/tas5827 https://www.ti.com/lit/gpn/tas5828m + https://www.ti.com/lit/gpn/tas5830 properties: compatible: + oneOf: + - enum: + - ti,tas2020 + - ti,tas2118 + - ti,tas2120 + - ti,tas2320 + - ti,tas2563 + - ti,tas2568 + - ti,tas2570 + - ti,tas2572 + - ti,tas2574 + - ti,tas2781 + - ti,tas5802 + - ti,tas5806m
Documentation/devicetree/bindings/sound/ti,tas2781.yaml description: | · line 73
Quoted 10 lines
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +10
-0+ - ti,tas5806md + - ti,tas5815 + - ti,tas5822 + - ti,tas5825 + - ti,tas5827 + - ti,tas5828 + - ti,tas5830 + - items: + - enum: + - ti,tas2020
No, this makes no sense. Device is not both - compatible and not compatible - at the same time.
Also, rest of my comments were not implemented.
Go back to previous version and read the feedback again. You can reach to more experienced colleagues in TI who should explain you basics of upstreaming process. Or listen to one of many speeches/presentations on upstreaming from conferences or trainings. Or read Linaro's guide on their blog. It is your homework.
Best regards,
Krzysztof