Skip to content

Commit e0a9b38

Browse files
committed
HACK: add cs35l56 amp feedback
For test Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent f0c6a58 commit e0a9b38

File tree

1 file changed

+76
-44
lines changed

1 file changed

+76
-44
lines changed

sound/soc/intel/common/soc-acpi-intel-arl-match.c

Lines changed: 76 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,64 @@ static const struct snd_soc_acpi_endpoint single_endpoint = {
1717
.group_id = 0,
1818
};
1919

20-
static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
21-
.num = 0,
22-
.aggregated = 1,
23-
.group_position = 0,
24-
.group_id = 1,
20+
static const struct snd_soc_acpi_endpoint spk_l_endpoint[] = {
21+
{
22+
.num = 0,
23+
.aggregated = 1,
24+
.group_position = 0,
25+
.group_id = 1,
26+
},
27+
{
28+
.num = 1,
29+
.aggregated = 1,
30+
.group_position = 0,
31+
.group_id = 2,
32+
},
2533
};
2634

27-
static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
28-
.num = 0,
29-
.aggregated = 1,
30-
.group_position = 1,
31-
.group_id = 1,
35+
static const struct snd_soc_acpi_endpoint spk_r_endpoint[] = {
36+
{
37+
.num = 0,
38+
.aggregated = 1,
39+
.group_position = 1,
40+
.group_id = 1,
41+
},
42+
{
43+
.num = 1,
44+
.aggregated = 1,
45+
.group_position = 1,
46+
.group_id = 2,
47+
},
3248
};
3349

34-
static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
35-
.num = 0,
36-
.aggregated = 1,
37-
.group_position = 2,
38-
.group_id = 1,
50+
static const struct snd_soc_acpi_endpoint spk_2_endpoint[] = {
51+
{
52+
.num = 0,
53+
.aggregated = 1,
54+
.group_position = 2,
55+
.group_id = 1,
56+
},
57+
{
58+
.num = 1,
59+
.aggregated = 1,
60+
.group_position = 2,
61+
.group_id = 2,
62+
},
3963
};
4064

41-
static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
42-
.num = 0,
43-
.aggregated = 1,
44-
.group_position = 3,
45-
.group_id = 1,
65+
static const struct snd_soc_acpi_endpoint spk_3_endpoint[] = {
66+
{
67+
.num = 0,
68+
.aggregated = 1,
69+
.group_position = 3,
70+
.group_id = 1,
71+
},
72+
{
73+
.num = 1,
74+
.aggregated = 1,
75+
.group_position = 3,
76+
.group_id = 2,
77+
}
4678
};
4779

4880
/*
@@ -73,95 +105,95 @@ static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
73105
static const struct snd_soc_acpi_adr_device cs35l56_2_lr_adr[] = {
74106
{
75107
.adr = 0x00023001FA355601ull,
76-
.num_endpoints = 1,
77-
.endpoints = &spk_l_endpoint,
108+
.num_endpoints = 2,
109+
.endpoints = spk_l_endpoint,
78110
.name_prefix = "AMP1"
79111
},
80112
{
81113
.adr = 0x00023101FA355601ull,
82-
.num_endpoints = 1,
83-
.endpoints = &spk_r_endpoint,
114+
.num_endpoints = 2,
115+
.endpoints = spk_r_endpoint,
84116
.name_prefix = "AMP2"
85117
}
86118
};
87119

88120
static const struct snd_soc_acpi_adr_device cs35l56_3_lr_adr[] = {
89121
{
90122
.adr = 0x00033001FA355601ull,
91-
.num_endpoints = 1,
92-
.endpoints = &spk_l_endpoint,
123+
.num_endpoints = 2,
124+
.endpoints = spk_l_endpoint,
93125
.name_prefix = "AMP1"
94126
},
95127
{
96128
.adr = 0x00033401FA355601ull,
97-
.num_endpoints = 1,
98-
.endpoints = &spk_r_endpoint,
129+
.num_endpoints = 2,
130+
.endpoints = spk_r_endpoint,
99131
.name_prefix = "AMP2"
100132
}
101133
};
102134

103135
static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
104136
{
105137
.adr = 0x00023201FA355601ull,
106-
.num_endpoints = 1,
107-
.endpoints = &spk_r_endpoint,
138+
.num_endpoints = 2,
139+
.endpoints = spk_r_endpoint,
108140
.name_prefix = "AMP3"
109141
},
110142
{
111143
.adr = 0x00023301FA355601ull,
112-
.num_endpoints = 1,
113-
.endpoints = &spk_3_endpoint,
144+
.num_endpoints = 2,
145+
.endpoints = spk_3_endpoint,
114146
.name_prefix = "AMP4"
115147
}
116148
};
117149

118150
static const struct snd_soc_acpi_adr_device cs35l56_3_l_adr[] = {
119151
{
120152
.adr = 0x00033001fa355601ull,
121-
.num_endpoints = 1,
122-
.endpoints = &spk_l_endpoint,
153+
.num_endpoints = 2,
154+
.endpoints = spk_l_endpoint,
123155
.name_prefix = "AMP1"
124156
},
125157
{
126158
.adr = 0x00033101fa355601ull,
127-
.num_endpoints = 1,
128-
.endpoints = &spk_2_endpoint,
159+
.num_endpoints = 2,
160+
.endpoints = spk_2_endpoint,
129161
.name_prefix = "AMP2"
130162
}
131163
};
132164

133165
static const struct snd_soc_acpi_adr_device cs35l56_2_r1_adr[] = {
134166
{
135167
.adr = 0x00023101FA355601ull,
136-
.num_endpoints = 1,
137-
.endpoints = &spk_r_endpoint,
168+
.num_endpoints = 2,
169+
.endpoints = spk_r_endpoint,
138170
.name_prefix = "AMP2"
139171
},
140172
};
141173

142174
static const struct snd_soc_acpi_adr_device cs35l56_3_l3_adr[] = {
143175
{
144176
.adr = 0x00033301fa355601ull,
145-
.num_endpoints = 1,
146-
.endpoints = &spk_l_endpoint,
177+
.num_endpoints = 2,
178+
.endpoints = spk_l_endpoint,
147179
.name_prefix = "AMP1"
148180
},
149181
};
150182

151183
static const struct snd_soc_acpi_adr_device cs35l56_2_r3_adr[] = {
152184
{
153185
.adr = 0x00023301fa355601ull,
154-
.num_endpoints = 1,
155-
.endpoints = &spk_r_endpoint,
186+
.num_endpoints = 2,
187+
.endpoints = spk_r_endpoint,
156188
.name_prefix = "AMP2"
157189
},
158190
};
159191

160192
static const struct snd_soc_acpi_adr_device cs35l56_3_l1_adr[] = {
161193
{
162194
.adr = 0x00033101fa355601ull,
163-
.num_endpoints = 1,
164-
.endpoints = &spk_l_endpoint,
195+
.num_endpoints = 2,
196+
.endpoints = spk_l_endpoint,
165197
.name_prefix = "AMP1"
166198
},
167199
};

0 commit comments

Comments
 (0)