]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: tas2781: Support more newly-released amplifiers tas58xx in the driver
authorBaojun Xu <baojun.xu@ti.com>
Thu, 2 Oct 2025 07:29:24 +0000 (15:29 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2025 10:08:09 +0000 (11:08 +0100)
TAS5802/TAS5815/TAS5828 has on-chip DSP without current/voltage feedback.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20251002072925.26242-1-baojun.xu@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/tas2781.h
sound/soc/codecs/tas2781-i2c.c

index ddd997ac3216a825688b0b6e2486968badf2148a..0fbcdb15c74b54dd6dcc9e55f83eb125caca47d4 100644 (file)
@@ -120,8 +120,11 @@ enum audio_device {
        TAS2570,
        TAS2572,
        TAS2781,
+       TAS5802,
+       TAS5815,
        TAS5825,
        TAS5827,
+       TAS5828,
        TAS_OTHERS,
 };
 
index 1539b70881d1fbf646ef80768ac7d28100463c71..ba880b5de7e87b61bc6319a796efccb9b836d3cc 100644 (file)
@@ -108,8 +108,11 @@ static const struct i2c_device_id tasdevice_id[] = {
        { "tas2570", TAS2570 },
        { "tas2572", TAS2572 },
        { "tas2781", TAS2781 },
+       { "tas5802", TAS5802 },
+       { "tas5815", TAS5815 },
        { "tas5825", TAS5825 },
        { "tas5827", TAS5827 },
+       { "tas5828", TAS5828 },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, tasdevice_id);
@@ -124,8 +127,11 @@ static const struct of_device_id tasdevice_of_match[] = {
        { .compatible = "ti,tas2570" },
        { .compatible = "ti,tas2572" },
        { .compatible = "ti,tas2781" },
+       { .compatible = "ti,tas5802" },
+       { .compatible = "ti,tas5815" },
        { .compatible = "ti,tas5825" },
        { .compatible = "ti,tas5827" },
+       { .compatible = "ti,tas5828" },
        {},
 };
 MODULE_DEVICE_TABLE(of, tasdevice_of_match);
@@ -1665,8 +1671,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
+        * TAS5802/TAS5815/TAS5825/TAS5827/TAS5828.
+        */
+       if (tas_priv->chip_id < TAS5802) {
                ret = tasdevice_create_cali_ctrls(tas_priv);
                if (ret) {
                        dev_err(tas_priv->dev, "cali controls error\n");
@@ -1720,8 +1728,11 @@ out:
                switch (tas_priv->chip_id) {
                case TAS2563:
                case TAS2781:
+               case TAS5802:
+               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 +1893,11 @@ 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 TAS5802:
+       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 +2068,11 @@ static const struct acpi_device_id tasdevice_acpi_match[] = {
        { "TXNW2570", TAS2570 },
        { "TXNW2572", TAS2572 },
        { "TXNW2781", TAS2781 },
+       { "TXNW5802", TAS5802 },
+       { "TXNW5815", TAS5815 },
        { "TXNW5825", TAS5825 },
        { "TXNW5827", TAS5827 },
+       { "TXNW5828", TAS5828 },
        {},
 };