1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * soc-acpi-intel-lnl-match.c - tables and support for LNL ACPI enumeration.
4  *
5  * Copyright (c) 2023, Intel Corporation. All rights reserved.
6  *
7  */
8 
9 #include <sound/soc-acpi.h>
10 #include <sound/soc-acpi-intel-match.h>
11 #include "soc-acpi-intel-sdw-mockup-match.h"
12 
13 struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_machines[] = {
14 	{},
15 };
16 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_machines);
17 
18 static const struct snd_soc_acpi_endpoint single_endpoint = {
19 	.num = 0,
20 	.aggregated = 0,
21 	.group_position = 0,
22 	.group_id = 0,
23 };
24 
25 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
26 	{
27 		.adr = 0x000030025D071101ull,
28 		.num_endpoints = 1,
29 		.endpoints = &single_endpoint,
30 		.name_prefix = "rt711"
31 	}
32 };
33 
34 static const struct snd_soc_acpi_link_adr lnl_rvp[] = {
35 	{
36 		.mask = BIT(0),
37 		.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
38 		.adr_d = rt711_sdca_0_adr,
39 	},
40 	{}
41 };
42 
43 /* this table is used when there is no I2S codec present */
44 struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
45 	/* mockup tests need to be first */
46 	{
47 		.link_mask = GENMASK(3, 0),
48 		.links = sdw_mockup_headset_2amps_mic,
49 		.drv_name = "sof_sdw",
50 		.sof_tplg_filename = "sof-lnl-rt711-rt1308-rt715.tplg",
51 	},
52 	{
53 		.link_mask = BIT(0) | BIT(1) | BIT(3),
54 		.links = sdw_mockup_headset_1amp_mic,
55 		.drv_name = "sof_sdw",
56 		.sof_tplg_filename = "sof-lnl-rt711-rt1308-mono-rt715.tplg",
57 	},
58 	{
59 		.link_mask = GENMASK(2, 0),
60 		.links = sdw_mockup_mic_headset_1amp,
61 		.drv_name = "sof_sdw",
62 		.sof_tplg_filename = "sof-lnl-rt715-rt711-rt1308-mono.tplg",
63 	},
64 	{
65 		.link_mask = BIT(0),
66 		.links = lnl_rvp,
67 		.drv_name = "sof_sdw",
68 		.sof_tplg_filename = "sof-lnl-rt711.tplg",
69 	},
70 	{},
71 };
72 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_sdw_machines);
73