]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: Intel: soc-acpi: cnl: add support for rt5682 on SoundWire link2
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 21 Aug 2020 19:55:49 +0000 (14:55 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 24 Aug 2020 12:41:26 +0000 (13:41 +0100)
Add one of the configurations for rt5682 w/ the Up Extreme Advanced
Audio mode using the SoundWire link2.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200821195603.215535-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/soc-acpi-intel-cnl-match.c

index 6a0bcc1a8429bf98b4501b6abdf8387a1838df47..7d61e0da808b74ad44064921a4b7d43b4a684aa8 100644 (file)
@@ -27,8 +27,39 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines);
 
+static const struct snd_soc_acpi_endpoint single_endpoint = {
+       .num = 0,
+       .aggregated = 0,
+       .group_position = 0,
+       .group_id = 0,
+};
+
+static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = {
+       {
+               .adr = 0x000220025D568200,
+               .num_endpoints = 1,
+               .endpoints = &single_endpoint,
+       }
+};
+
+static const struct snd_soc_acpi_link_adr up_extreme_rt5682_2[] = {
+       {
+               .mask = BIT(2),
+               .num_adr = ARRAY_SIZE(rt5682_2_adr),
+               .adr_d = rt5682_2_adr,
+       },
+       {}
+};
+
 struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[] = {
-       {},
+       {
+               .link_mask = BIT(2),
+               .links = up_extreme_rt5682_2,
+               .drv_name = "sof_sdw",
+               .sof_fw_filename = "sof-cnl.ri",
+               .sof_tplg_filename = "sof-cnl-rt5682-sdw2.tplg"
+       },
+       {}
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_sdw_machines);