]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: Intel: soc-acpi-intel-ptl-match: Add rt713_vb_l3_rt1320_l3 support
authorMac Chiang <mac.chiang@intel.com>
Wed, 7 May 2025 12:26:49 +0000 (20:26 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 8 May 2025 01:32:46 +0000 (10:32 +0900)
This patch adds support for the rt712_vb multi-function codec and
rt1320 amplifier. Both devices are connected via a single Soundwire link 3,
sharing the sdw3-clock, sdw3-data[0] and sdw3-data[1] data lanes
respectively.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250507122649.153579-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/soc-acpi-intel-ptl-match.c

index f9510480d1885c09115e5989443d976130202463..eae75f3f0fa40dfa870df7a3276df7a51fda998b 100644 (file)
@@ -321,6 +321,15 @@ static const struct snd_soc_acpi_adr_device rt713_vb_3_adr[] = {
        }
 };
 
+static const struct snd_soc_acpi_adr_device rt1320_3_group1_adr[] = {
+       {
+               .adr = 0x000330025D132001ull,
+               .num_endpoints = 1,
+               .endpoints = &spk_r_endpoint,
+               .name_prefix = "rt1320-1"
+       }
+};
+
 static const struct snd_soc_acpi_adr_device rt721_3_single_adr[] = {
        {
                .adr = 0x000330025d072101ull,
@@ -541,6 +550,20 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l3_rt1320_l2[] = {
        {}
 };
 
+static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l3_rt1320_l3[] = {
+       {
+               .mask = BIT(3),
+               .num_adr = ARRAY_SIZE(rt712_vb_3_group1_adr),
+               .adr_d = rt712_vb_3_group1_adr,
+       },
+       {
+               .mask = BIT(3),
+               .num_adr = ARRAY_SIZE(rt1320_3_group1_adr),
+               .adr_d = rt1320_3_group1_adr,
+       },
+       {}
+};
+
 /* this table is used when there is no I2S codec present */
 struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
 /* Order Priority: mockup > most links > most bit link-mask > alphabetical */
@@ -633,6 +656,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
                .sof_tplg_filename = "sof-ptl-cs42l43-l3.tplg",
                .get_function_tplg_files = sof_sdw_get_tplg_files,
        },
+       {
+               .link_mask = BIT(3),
+               .links = ptl_sdw_rt712_vb_l3_rt1320_l3,
+               .drv_name = "sof_sdw",
+               .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
+               .sof_tplg_filename = "sof-ptl-rt712-l3-rt1320-l3.tplg",
+               .get_function_tplg_files = sof_sdw_get_tplg_files,
+       },
        {
                .link_mask = BIT(3),
                .links = ptl_rt721_l3,