xref: /linux/sound/soc/intel/common/soc-acpi-intel-arl-match.c (revision daa121128a2d2ac6006159e2c47676e4fcd21eab)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * soc-apci-intel-arl-match.c - tables and support for ARL ACPI enumeration.
4  *
5  * Copyright (c) 2023 Intel Corporation.
6  */
7 
8 #include <sound/soc-acpi.h>
9 #include <sound/soc-acpi-intel-match.h>
10 
11 static const struct snd_soc_acpi_endpoint single_endpoint = {
12 	.num = 0,
13 	.aggregated = 0,
14 	.group_position = 0,
15 	.group_id = 0,
16 };
17 
18 static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
19 	{
20 		.adr = 0x000020025D071100ull,
21 		.num_endpoints = 1,
22 		.endpoints = &single_endpoint,
23 		.name_prefix = "rt711"
24 	}
25 };
26 
27 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
28 	{
29 		.adr = 0x000030025D071101ull,
30 		.num_endpoints = 1,
31 		.endpoints = &single_endpoint,
32 		.name_prefix = "rt711"
33 	}
34 };
35 
36 static const struct snd_soc_acpi_link_adr arl_rvp[] = {
37 	{
38 		.mask = BIT(0),
39 		.num_adr = ARRAY_SIZE(rt711_0_adr),
40 		.adr_d = rt711_0_adr,
41 	},
42 	{}
43 };
44 
45 static const struct snd_soc_acpi_link_adr arl_sdca_rvp[] = {
46 	{
47 		.mask = BIT(0),
48 		.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
49 		.adr_d = rt711_sdca_0_adr,
50 	},
51 	{}
52 };
53 
54 struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_machines[] = {
55 	{},
56 };
57 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_arl_machines);
58 
59 /* this table is used when there is no I2S codec present */
60 struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[] = {
61 	{
62 		.link_mask = 0x1, /* link0 required */
63 		.links = arl_rvp,
64 		.drv_name = "sof_sdw",
65 		.sof_tplg_filename = "sof-arl-rt711.tplg",
66 	},
67 	{
68 		.link_mask = 0x1, /* link0 required */
69 		.links = arl_sdca_rvp,
70 		.drv_name = "sof_sdw",
71 		.sof_tplg_filename = "sof-arl-rt711-l0.tplg",
72 	},
73 	{},
74 };
75 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_arl_sdw_machines);
76