Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/sound/soc/intel/common/soc-acpi-intel-nvl-match.c
38226 views
1
// SPDX-License-Identifier: GPL-2.0-only
2
/*
3
* soc-acpi-intel-nvl-match.c - tables and support for NVL ACPI enumeration.
4
*
5
* Copyright (c) 2025, Intel Corporation.
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_nvl_machines[] = {
14
{},
15
};
16
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_machines);
17
18
/*
19
* Multi-function codecs with three endpoints created for
20
* headset, amp and dmic functions.
21
*/
22
static const struct snd_soc_acpi_endpoint rt_mf_endpoints[] = {
23
{
24
.num = 0,
25
.aggregated = 0,
26
.group_position = 0,
27
.group_id = 0,
28
},
29
{
30
.num = 1,
31
.aggregated = 0,
32
.group_position = 0,
33
.group_id = 0,
34
},
35
{
36
.num = 2,
37
.aggregated = 0,
38
.group_position = 0,
39
.group_id = 0,
40
},
41
};
42
43
static const struct snd_soc_acpi_adr_device rt722_3_single_adr[] = {
44
{
45
.adr = 0x000330025d072201ull,
46
.num_endpoints = ARRAY_SIZE(rt_mf_endpoints),
47
.endpoints = rt_mf_endpoints,
48
.name_prefix = "rt722"
49
}
50
};
51
52
static const struct snd_soc_acpi_link_adr nvl_rt722_l3[] = {
53
{
54
.mask = BIT(3),
55
.num_adr = ARRAY_SIZE(rt722_3_single_adr),
56
.adr_d = rt722_3_single_adr,
57
},
58
{}
59
};
60
61
/* this table is used when there is no I2S codec present */
62
struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_sdw_machines[] = {
63
/* mockup tests need to be first */
64
{
65
.link_mask = GENMASK(3, 0),
66
.links = sdw_mockup_headset_2amps_mic,
67
.drv_name = "sof_sdw",
68
.sof_tplg_filename = "sof-nvl-rt711-rt1308-rt715.tplg",
69
},
70
{
71
.link_mask = BIT(0) | BIT(1) | BIT(3),
72
.links = sdw_mockup_headset_1amp_mic,
73
.drv_name = "sof_sdw",
74
.sof_tplg_filename = "sof-nvl-rt711-rt1308-mono-rt715.tplg",
75
},
76
{
77
.link_mask = GENMASK(2, 0),
78
.links = sdw_mockup_mic_headset_1amp,
79
.drv_name = "sof_sdw",
80
.sof_tplg_filename = "sof-nvl-rt715-rt711-rt1308-mono.tplg",
81
},
82
{
83
.link_mask = BIT(3),
84
.links = nvl_rt722_l3,
85
.drv_name = "sof_sdw",
86
.sof_tplg_filename = "sof-nvl-rt722.tplg",
87
},
88
{},
89
};
90
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_sdw_machines);
91
92