]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: Intel: soc-acpi-intel-mtl-match: Add rt722 support
authorChao Song <chao.song@linux.intel.com>
Mon, 27 Nov 2023 13:34:48 +0000 (15:34 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2023 16:29:47 +0000 (16:29 +0000)
This patch adds match table for rt722 codec on link 0.

RT722 is a multi-function codec, three endpoints are
created for its headset, amp and dmic functions.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127133448.18449-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/soc-acpi-intel-mtl-match.c

index 61f2b264549632fc47ca71cfa3a4ba11e48718f7..5a90ebdbf799f2b4e26f61ae13a7f29c210a8c9e 100644 (file)
@@ -123,6 +123,31 @@ static const struct snd_soc_acpi_endpoint rt712_endpoints[] = {
        },
 };
 
+/*
+ * RT722 is a multi-function codec, three endpoints are created for
+ * its headset, amp and dmic functions.
+ */
+static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
+       {
+               .num = 0,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+       {
+               .num = 1,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+       {
+               .num = 2,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+};
+
 static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
        .num = 0,
        .aggregated = 1,
@@ -164,6 +189,15 @@ static const struct snd_soc_acpi_adr_device rt1712_3_single_adr[] = {
        }
 };
 
+static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = {
+       {
+               .adr = 0x000030025d072201ull,
+               .num_endpoints = ARRAY_SIZE(rt722_endpoints),
+               .endpoints = rt722_endpoints,
+               .name_prefix = "rt722"
+       }
+};
+
 static const struct snd_soc_acpi_adr_device rt713_0_single_adr[] = {
        {
                .adr = 0x000031025D071301ull,
@@ -355,6 +389,15 @@ static const struct snd_soc_acpi_link_adr mtl_rvp[] = {
        {}
 };
 
+static const struct snd_soc_acpi_link_adr mtl_rt722_only[] = {
+       {
+               .mask = BIT(0),
+               .num_adr = ARRAY_SIZE(rt722_0_single_adr),
+               .adr_d = rt722_0_single_adr,
+       },
+       {}
+};
+
 static const struct snd_soc_acpi_link_adr mtl_3_in_1_sdca[] = {
        {
                .mask = BIT(0),
@@ -556,6 +599,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
                .drv_name = "sof_sdw",
                .sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg",
        },
+       {
+               .link_mask = BIT(0),
+               .links = mtl_rt722_only,
+               .drv_name = "sof_sdw",
+               .sof_tplg_filename = "sof-mtl-rt722-l0.tplg",
+       },
        {
                .link_mask = BIT(0),
                .links = mtl_rvp,