]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: soc_sdw_utils: add name_prefix to asoc_sdw_codec_info struct
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 14 Oct 2025 07:13:29 +0000 (15:13 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 14 Oct 2025 11:32:30 +0000 (12:32 +0100)
Currently, the codec name_prefix of Intel SoundWire machine driver is
from the ACPI match table. We can have it in the asoc_sdw_codec_info
struct as a default name_prefix of a codec if there is no corresponding
audio config found in the ACPI match table.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251014071335.3844631-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc_sdw_utils.h
sound/soc/sdw_utils/soc_sdw_utils.c

index 3c5e9b2af7f1a6f73b41c760898c203f5a27811a..e289b453babaaa1d678f4505590fb8853053581d 100644 (file)
@@ -68,6 +68,7 @@ struct asoc_sdw_codec_info {
        const int part_id;
        const int version_id;
        const char *codec_name;
+       const char *name_prefix;
        int amp_num;
        const u8 acpi_id[ACPI_ID_LEN];
        const bool ignore_internal_dmic;
index 56c72ef27e7b1fb1332abc205a70e52580eebd51..d2db597f84c01038313394d340f1228b288eb677 100644 (file)
@@ -60,6 +60,7 @@ static const struct snd_kcontrol_new rt700_controls[] = {
 struct asoc_sdw_codec_info codec_info_list[] = {
        {
                .part_id = 0x0000, /* TAS2783A */
+               .name_prefix = "tas2783",
                .dais = {
                        {
                                .direction = {true, true},
@@ -78,6 +79,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x700,
+               .name_prefix = "rt700",
                .dais = {
                        {
                                .direction = {true, true},
@@ -95,6 +97,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x711,
+               .name_prefix = "rt711",
                .version_id = 3,
                .dais = {
                        {
@@ -115,6 +118,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x711,
+               .name_prefix = "rt711",
                .version_id = 2,
                .dais = {
                        {
@@ -135,6 +139,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x712,
+               .name_prefix = "rt712",
                .version_id = 3,
                .dais = {
                        {
@@ -176,6 +181,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x1712,
+               .name_prefix = "rt712-dmic",
                .version_id = 3,
                .dais = {
                        {
@@ -190,6 +196,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x713,
+               .name_prefix = "rt713",
                .version_id = 3,
                .dais = {
                        {
@@ -217,6 +224,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x1713,
+               .name_prefix = "rt713-dmic",
                .version_id = 3,
                .dais = {
                        {
@@ -231,6 +239,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x1308,
+               .name_prefix = "rt1308",
                .acpi_id = "10EC1308",
                .dais = {
                        {
@@ -253,6 +262,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x1316,
+               .name_prefix = "rt1316",
                .dais = {
                        {
                                .direction = {true, true},
@@ -273,6 +283,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x1318,
+               .name_prefix = "rt1318",
                .dais = {
                        {
                                .direction = {true, true},
@@ -293,6 +304,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x1320,
+               .name_prefix = "rt1320",
                .dais = {
                        {
                                .direction = {true, false},
@@ -313,6 +325,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x714,
+               .name_prefix = "rt714",
                .version_id = 3,
                .ignore_internal_dmic = true,
                .dais = {
@@ -328,6 +341,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x715,
+               .name_prefix = "rt715",
                .version_id = 3,
                .ignore_internal_dmic = true,
                .dais = {
@@ -343,6 +357,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x714,
+               .name_prefix = "rt714",
                .version_id = 2,
                .ignore_internal_dmic = true,
                .dais = {
@@ -358,6 +373,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x715,
+               .name_prefix = "rt715",
                .version_id = 2,
                .ignore_internal_dmic = true,
                .dais = {
@@ -373,6 +389,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x721,
+               .name_prefix = "rt721",
                .version_id = 3,
                .dais = {
                        {
@@ -415,6 +432,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x722,
+               .name_prefix = "rt722",
                .version_id = 3,
                .dais = {
                        {
@@ -459,6 +477,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x8373,
+               .name_prefix = "Left",
                .dais = {
                        {
                                .direction = {true, true},
@@ -478,6 +497,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x8363,
+               .name_prefix = "Left",
                .dais = {
                        {
                                .direction = {true, false},
@@ -497,6 +517,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x5682,
+               .name_prefix = "rt5682",
                .dais = {
                        {
                                .direction = {true, true},
@@ -514,6 +535,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x3556,
+               .name_prefix = "AMP",
                .dais = {
                        {
                                .direction = {true, false},
@@ -540,6 +562,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x3563,
+               .name_prefix = "AMP",
                .dais = {
                        {
                                .direction = {true, false},
@@ -566,6 +589,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x4242,
+               .name_prefix = "cs42l42",
                .dais = {
                        {
                                .direction = {true, true},
@@ -583,6 +607,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x4243,
+               .name_prefix = "cs42l43",
                .codec_name = "cs42l43-codec",
                .count_sidecar = asoc_sdw_bridge_cs35l56_count_sidecar,
                .add_sidecar = asoc_sdw_bridge_cs35l56_add_sidecar,
@@ -634,6 +659,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0xaaaa, /* generic codec mockup */
+               .name_prefix = "sdw_mockup_mmulti-function",
                .version_id = 0,
                .dais = {
                        {
@@ -659,6 +685,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0xaa55, /* headset codec mockup */
+               .name_prefix = "sdw_mockup_headset0",
                .version_id = 0,
                .dais = {
                        {
@@ -672,6 +699,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x55aa, /* amplifier mockup */
+               .name_prefix = "sdw_mockup_amp1",
                .version_id = 0,
                .dais = {
                        {
@@ -685,6 +713,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
        },
        {
                .part_id = 0x5555,
+               .name_prefix = "sdw_mockup_mic0",
                .version_id = 0,
                .dais = {
                        {