ASoC: soc-acpi: tgl: add table for SoundWire mockup devices
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 14 Jul 2021 03:22:02 +0000 (11:22 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jul 2021 17:02:07 +0000 (18:02 +0100)
Follow the same idea as for CNL/UpExtreme and add mockup test
first. They will only be selected if the SSDT is modified to add such
mockup devices.

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

index 66595e3..e2488f0 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <sound/soc-acpi.h>
 #include <sound/soc-acpi-intel-match.h>
+#include "soc-acpi-intel-sdw-mockup-match.h"
 
 static const struct snd_soc_acpi_codecs tgl_codecs = {
        .num_codecs = 1,
@@ -351,6 +352,28 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
 
 /* this table is used when there is no I2S codec present */
 struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
+       /* mockup tests need to be first */
+       {
+               .link_mask = GENMASK(3, 0),
+               .links = sdw_mockup_headset_2amps_mic,
+               .drv_name = "sof_sdw",
+               .sof_fw_filename = "sof-tgl.ri",
+               .sof_tplg_filename = "sof-tgl-rt711-rt1308-rt715.tplg",
+       },
+       {
+               .link_mask = BIT(0) | BIT(1) | BIT(3),
+               .links = sdw_mockup_headset_1amp_mic,
+               .drv_name = "sof_sdw",
+               .sof_fw_filename = "sof-tgl.ri",
+               .sof_tplg_filename = "sof-tgl-rt711-rt1308-mono-rt715.tplg",
+       },
+       {
+               .link_mask = BIT(0) | BIT(1) | BIT(2),
+               .links = sdw_mockup_mic_headset_1amp,
+               .drv_name = "sof_sdw",
+               .sof_fw_filename = "sof-tgl.ri",
+               .sof_tplg_filename = "sof-tgl-rt715-rt711-rt1308-mono.tplg",
+       },
        {
                .link_mask = 0x7,
                .links = tgl_sdw_rt711_link1_rt1308_link2_rt715_link0,