~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/intel/common/soc-acpi-intel-tgl-match.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/intel/common/soc-acpi-intel-tgl-match.c (Architecture ppc) and /sound/soc/intel/common/soc-acpi-intel-tgl-match.c (Architecture mips)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*                                                  2 /*
  3  * soc-acpi-intel-tgl-match.c - tables and sup      3  * soc-acpi-intel-tgl-match.c - tables and support for TGL ACPI enumeration.
  4  *                                                  4  *
  5  * Copyright (c) 2019, Intel Corporation.           5  * Copyright (c) 2019, Intel Corporation.
  6  *                                                  6  *
  7  */                                                 7  */
  8                                                     8 
  9 #include <sound/soc-acpi.h>                         9 #include <sound/soc-acpi.h>
 10 #include <sound/soc-acpi-intel-match.h>            10 #include <sound/soc-acpi-intel-match.h>
 11 #include <sound/soc-acpi-intel-ssp-common.h>       11 #include <sound/soc-acpi-intel-ssp-common.h>
 12 #include "soc-acpi-intel-sdw-mockup-match.h"       12 #include "soc-acpi-intel-sdw-mockup-match.h"
 13                                                    13 
 14 static const struct snd_soc_acpi_codecs essx_8     14 static const struct snd_soc_acpi_codecs essx_83x6 = {
 15         .num_codecs = 3,                           15         .num_codecs = 3,
 16         .codecs = { "ESSX8316", "ESSX8326", "E     16         .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
 17 };                                                 17 };
 18                                                    18 
 19 static const struct snd_soc_acpi_endpoint sing     19 static const struct snd_soc_acpi_endpoint single_endpoint = {
 20         .num = 0,                                  20         .num = 0,
 21         .aggregated = 0,                           21         .aggregated = 0,
 22         .group_position = 0,                       22         .group_position = 0,
 23         .group_id = 0,                             23         .group_id = 0,
 24 };                                                 24 };
 25                                                    25 
 26 static const struct snd_soc_acpi_endpoint spk_     26 static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
 27         .num = 0,                                  27         .num = 0,
 28         .aggregated = 1,                           28         .aggregated = 1,
 29         .group_position = 0,                       29         .group_position = 0,
 30         .group_id = 1,                             30         .group_id = 1,
 31 };                                                 31 };
 32                                                    32 
 33 static const struct snd_soc_acpi_endpoint spk_     33 static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
 34         .num = 0,                                  34         .num = 0,
 35         .aggregated = 1,                           35         .aggregated = 1,
 36         .group_position = 1,                       36         .group_position = 1,
 37         .group_id = 1,                             37         .group_id = 1,
 38 };                                                 38 };
 39                                                    39 
 40 static const struct snd_soc_acpi_endpoint spk_     40 static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
 41         .num = 0,                                  41         .num = 0,
 42         .aggregated = 1,                           42         .aggregated = 1,
 43         .group_position = 2,                       43         .group_position = 2,
 44         .group_id = 1,                             44         .group_id = 1,
 45 };                                                 45 };
 46                                                    46 
 47 static const struct snd_soc_acpi_endpoint spk_     47 static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
 48         .num = 0,                                  48         .num = 0,
 49         .aggregated = 1,                           49         .aggregated = 1,
 50         .group_position = 3,                       50         .group_position = 3,
 51         .group_id = 1,                             51         .group_id = 1,
 52 };                                                 52 };
 53                                                    53 
 54 static const struct snd_soc_acpi_endpoint rt71     54 static const struct snd_soc_acpi_endpoint rt712_endpoints[] = {
 55         {                                          55         {
 56                 .num = 0,                          56                 .num = 0,
 57                 .aggregated = 0,                   57                 .aggregated = 0,
 58                 .group_position = 0,               58                 .group_position = 0,
 59                 .group_id = 0,                     59                 .group_id = 0,
 60         },                                         60         },
 61         {                                          61         {
 62                 .num = 1,                          62                 .num = 1,
 63                 .aggregated = 0,                   63                 .aggregated = 0,
 64                 .group_position = 0,               64                 .group_position = 0,
 65                 .group_id = 0,                     65                 .group_id = 0,
 66         },                                         66         },
 67 };                                                 67 };
 68                                                    68 
 69 static const struct snd_soc_acpi_adr_device rt     69 static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
 70         {                                          70         {
 71                 .adr = 0x000020025D071100ull,      71                 .adr = 0x000020025D071100ull,
 72                 .num_endpoints = 1,                72                 .num_endpoints = 1,
 73                 .endpoints = &single_endpoint,     73                 .endpoints = &single_endpoint,
 74                 .name_prefix = "rt711"             74                 .name_prefix = "rt711"
 75         }                                          75         }
 76 };                                                 76 };
 77                                                    77 
 78 static const struct snd_soc_acpi_adr_device rt     78 static const struct snd_soc_acpi_adr_device rt711_1_adr[] = {
 79         {                                          79         {
 80                 .adr = 0x000120025D071100ull,      80                 .adr = 0x000120025D071100ull,
 81                 .num_endpoints = 1,                81                 .num_endpoints = 1,
 82                 .endpoints = &single_endpoint,     82                 .endpoints = &single_endpoint,
 83                 .name_prefix = "rt711"             83                 .name_prefix = "rt711"
 84         }                                          84         }
 85 };                                                 85 };
 86                                                    86 
 87 static const struct snd_soc_acpi_adr_device rt     87 static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = {
 88         {                                          88         {
 89                 .adr = 0x000120025D130800ull,      89                 .adr = 0x000120025D130800ull,
 90                 .num_endpoints = 1,                90                 .num_endpoints = 1,
 91                 .endpoints = &spk_l_endpoint,      91                 .endpoints = &spk_l_endpoint,
 92                 .name_prefix = "rt1308-1"          92                 .name_prefix = "rt1308-1"
 93         },                                         93         },
 94         {                                          94         {
 95                 .adr = 0x000122025D130800ull,      95                 .adr = 0x000122025D130800ull,
 96                 .num_endpoints = 1,                96                 .num_endpoints = 1,
 97                 .endpoints = &spk_r_endpoint,      97                 .endpoints = &spk_r_endpoint,
 98                 .name_prefix = "rt1308-2"          98                 .name_prefix = "rt1308-2"
 99         }                                          99         }
100 };                                                100 };
101                                                   101 
102 static const struct snd_soc_acpi_adr_device rt    102 static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {
103         {                                         103         {
104                 .adr = 0x000120025D130800ull,     104                 .adr = 0x000120025D130800ull,
105                 .num_endpoints = 1,               105                 .num_endpoints = 1,
106                 .endpoints = &single_endpoint,    106                 .endpoints = &single_endpoint,
107                 .name_prefix = "rt1308-1"         107                 .name_prefix = "rt1308-1"
108         }                                         108         }
109 };                                                109 };
110                                                   110 
111 static const struct snd_soc_acpi_adr_device rt    111 static const struct snd_soc_acpi_adr_device rt1308_2_single_adr[] = {
112         {                                         112         {
113                 .adr = 0x000220025D130800ull,     113                 .adr = 0x000220025D130800ull,
114                 .num_endpoints = 1,               114                 .num_endpoints = 1,
115                 .endpoints = &single_endpoint,    115                 .endpoints = &single_endpoint,
116                 .name_prefix = "rt1308-1"         116                 .name_prefix = "rt1308-1"
117         }                                         117         }
118 };                                                118 };
119                                                   119 
120 static const struct snd_soc_acpi_adr_device rt    120 static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
121         {                                         121         {
122                 .adr = 0x000120025D130800ull,     122                 .adr = 0x000120025D130800ull,
123                 .num_endpoints = 1,               123                 .num_endpoints = 1,
124                 .endpoints = &spk_l_endpoint,     124                 .endpoints = &spk_l_endpoint,
125                 .name_prefix = "rt1308-1"         125                 .name_prefix = "rt1308-1"
126         }                                         126         }
127 };                                                127 };
128                                                   128 
129 static const struct snd_soc_acpi_adr_device rt    129 static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
130         {                                         130         {
131                 .adr = 0x000220025D130800ull,     131                 .adr = 0x000220025D130800ull,
132                 .num_endpoints = 1,               132                 .num_endpoints = 1,
133                 .endpoints = &spk_r_endpoint,     133                 .endpoints = &spk_r_endpoint,
134                 .name_prefix = "rt1308-2"         134                 .name_prefix = "rt1308-2"
135         }                                         135         }
136 };                                                136 };
137                                                   137 
138 static const struct snd_soc_acpi_adr_device rt    138 static const struct snd_soc_acpi_adr_device rt715_0_adr[] = {
139         {                                         139         {
140                 .adr = 0x000021025D071500ull,     140                 .adr = 0x000021025D071500ull,
141                 .num_endpoints = 1,               141                 .num_endpoints = 1,
142                 .endpoints = &single_endpoint,    142                 .endpoints = &single_endpoint,
143                 .name_prefix = "rt715"            143                 .name_prefix = "rt715"
144         }                                         144         }
145 };                                                145 };
146                                                   146 
147 static const struct snd_soc_acpi_adr_device rt    147 static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
148         {                                         148         {
149                 .adr = 0x000320025D071500ull,     149                 .adr = 0x000320025D071500ull,
150                 .num_endpoints = 1,               150                 .num_endpoints = 1,
151                 .endpoints = &single_endpoint,    151                 .endpoints = &single_endpoint,
152                 .name_prefix = "rt715"            152                 .name_prefix = "rt715"
153         }                                         153         }
154 };                                                154 };
155                                                   155 
156 static const struct snd_soc_acpi_adr_device mx    156 static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = {
157         {                                         157         {
158                 .adr = 0x000123019F837300ull,     158                 .adr = 0x000123019F837300ull,
159                 .num_endpoints = 1,               159                 .num_endpoints = 1,
160                 .endpoints = &spk_r_endpoint,     160                 .endpoints = &spk_r_endpoint,
161                 .name_prefix = "Right"            161                 .name_prefix = "Right"
162         },                                        162         },
163         {                                         163         {
164                 .adr = 0x000127019F837300ull,     164                 .adr = 0x000127019F837300ull,
165                 .num_endpoints = 1,               165                 .num_endpoints = 1,
166                 .endpoints = &spk_l_endpoint,     166                 .endpoints = &spk_l_endpoint,
167                 .name_prefix = "Left"             167                 .name_prefix = "Left"
168         }                                         168         }
169 };                                                169 };
170                                                   170 
171 static const struct snd_soc_acpi_adr_device rt    171 static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = {
172         {                                         172         {
173                 .adr = 0x000021025D568200ull,     173                 .adr = 0x000021025D568200ull,
174                 .num_endpoints = 1,               174                 .num_endpoints = 1,
175                 .endpoints = &single_endpoint,    175                 .endpoints = &single_endpoint,
176                 .name_prefix = "rt5682"           176                 .name_prefix = "rt5682"
177         }                                         177         }
178 };                                                178 };
179                                                   179 
180 static const struct snd_soc_acpi_adr_device rt    180 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
181         {                                         181         {
182                 .adr = 0x000030025D071101ull,     182                 .adr = 0x000030025D071101ull,
183                 .num_endpoints = 1,               183                 .num_endpoints = 1,
184                 .endpoints = &single_endpoint,    184                 .endpoints = &single_endpoint,
185                 .name_prefix = "rt711"            185                 .name_prefix = "rt711"
186         }                                         186         }
187 };                                                187 };
188                                                   188 
189 static const struct snd_soc_acpi_adr_device rt    189 static const struct snd_soc_acpi_adr_device rt1316_1_single_adr[] = {
190         {                                         190         {
191                 .adr = 0x000131025D131601ull,     191                 .adr = 0x000131025D131601ull,
192                 .num_endpoints = 1,               192                 .num_endpoints = 1,
193                 .endpoints = &single_endpoint,    193                 .endpoints = &single_endpoint,
194                 .name_prefix = "rt1316-1"         194                 .name_prefix = "rt1316-1"
195         }                                         195         }
196 };                                                196 };
197                                                   197 
198 static const struct snd_soc_acpi_adr_device rt    198 static const struct snd_soc_acpi_adr_device rt712_0_single_adr[] = {
199         {                                         199         {
200                 .adr = 0x000030025D071201ull,     200                 .adr = 0x000030025D071201ull,
201                 .num_endpoints = ARRAY_SIZE(rt    201                 .num_endpoints = ARRAY_SIZE(rt712_endpoints),
202                 .endpoints = rt712_endpoints,     202                 .endpoints = rt712_endpoints,
203                 .name_prefix = "rt712"            203                 .name_prefix = "rt712"
204         }                                         204         }
205 };                                                205 };
206                                                   206 
207 static const struct snd_soc_acpi_adr_device rt    207 static const struct snd_soc_acpi_adr_device rt1712_1_single_adr[] = {
208         {                                         208         {
209                 .adr = 0x000130025D171201ull,     209                 .adr = 0x000130025D171201ull,
210                 .num_endpoints = 1,               210                 .num_endpoints = 1,
211                 .endpoints = &single_endpoint,    211                 .endpoints = &single_endpoint,
212                 .name_prefix = "rt712-dmic"       212                 .name_prefix = "rt712-dmic"
213         }                                         213         }
214 };                                                214 };
215                                                   215 
216 static const struct snd_soc_acpi_adr_device rt    216 static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
217         {                                         217         {
218                 .adr = 0x000131025D131601ull,     218                 .adr = 0x000131025D131601ull, /* unique ID is set for some reason */
219                 .num_endpoints = 1,               219                 .num_endpoints = 1,
220                 .endpoints = &spk_l_endpoint,     220                 .endpoints = &spk_l_endpoint,
221                 .name_prefix = "rt1316-1"         221                 .name_prefix = "rt1316-1"
222         }                                         222         }
223 };                                                223 };
224                                                   224 
225 static const struct snd_soc_acpi_adr_device rt    225 static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
226         {                                         226         {
227                 .adr = 0x000230025D131601ull,     227                 .adr = 0x000230025D131601ull,
228                 .num_endpoints = 1,               228                 .num_endpoints = 1,
229                 .endpoints = &spk_r_endpoint,     229                 .endpoints = &spk_r_endpoint,
230                 .name_prefix = "rt1316-2"         230                 .name_prefix = "rt1316-2"
231         }                                         231         }
232 };                                                232 };
233                                                   233 
234 static const struct snd_soc_acpi_adr_device rt    234 static const struct snd_soc_acpi_adr_device rt714_3_adr[] = {
235         {                                         235         {
236                 .adr = 0x000330025D071401ull,     236                 .adr = 0x000330025D071401ull,
237                 .num_endpoints = 1,               237                 .num_endpoints = 1,
238                 .endpoints = &single_endpoint,    238                 .endpoints = &single_endpoint,
239                 .name_prefix = "rt714"            239                 .name_prefix = "rt714"
240         }                                         240         }
241 };                                                241 };
242                                                   242 
243 static const struct snd_soc_acpi_link_adr tgl_    243 static const struct snd_soc_acpi_link_adr tgl_rvp[] = {
244         {                                         244         {
245                 .mask = BIT(0),                   245                 .mask = BIT(0),
246                 .num_adr = ARRAY_SIZE(rt711_0_    246                 .num_adr = ARRAY_SIZE(rt711_0_adr),
247                 .adr_d = rt711_0_adr,             247                 .adr_d = rt711_0_adr,
248         },                                        248         },
249         {                                         249         {
250                 .mask = BIT(1),                   250                 .mask = BIT(1),
251                 .num_adr = ARRAY_SIZE(rt1308_1    251                 .num_adr = ARRAY_SIZE(rt1308_1_dual_adr),
252                 .adr_d = rt1308_1_dual_adr,       252                 .adr_d = rt1308_1_dual_adr,
253         },                                        253         },
254         {}                                        254         {}
255 };                                                255 };
256                                                   256 
257 static const struct snd_soc_acpi_link_adr tgl_    257 static const struct snd_soc_acpi_link_adr tgl_rvp_headset_only[] = {
258         {                                         258         {
259                 .mask = BIT(0),                   259                 .mask = BIT(0),
260                 .num_adr = ARRAY_SIZE(rt711_0_    260                 .num_adr = ARRAY_SIZE(rt711_0_adr),
261                 .adr_d = rt711_0_adr,             261                 .adr_d = rt711_0_adr,
262         },                                        262         },
263         {}                                        263         {}
264 };                                                264 };
265                                                   265 
266 static const struct snd_soc_acpi_link_adr tgl_    266 static const struct snd_soc_acpi_link_adr tgl_hp[] = {
267         {                                         267         {
268                 .mask = BIT(0),                   268                 .mask = BIT(0),
269                 .num_adr = ARRAY_SIZE(rt711_0_    269                 .num_adr = ARRAY_SIZE(rt711_0_adr),
270                 .adr_d = rt711_0_adr,             270                 .adr_d = rt711_0_adr,
271         },                                        271         },
272         {                                         272         {
273                 .mask = BIT(1),                   273                 .mask = BIT(1),
274                 .num_adr = ARRAY_SIZE(rt1308_1    274                 .num_adr = ARRAY_SIZE(rt1308_1_single_adr),
275                 .adr_d = rt1308_1_single_adr,     275                 .adr_d = rt1308_1_single_adr,
276         },                                        276         },
277         {}                                        277         {}
278 };                                                278 };
279                                                   279 
280 static const struct snd_soc_acpi_link_adr tgl_    280 static const struct snd_soc_acpi_link_adr tgl_chromebook_base[] = {
281         {                                         281         {
282                 .mask = BIT(0),                   282                 .mask = BIT(0),
283                 .num_adr = ARRAY_SIZE(rt5682_0    283                 .num_adr = ARRAY_SIZE(rt5682_0_adr),
284                 .adr_d = rt5682_0_adr,            284                 .adr_d = rt5682_0_adr,
285         },                                        285         },
286         {                                         286         {
287                 .mask = BIT(1),                   287                 .mask = BIT(1),
288                 .num_adr = ARRAY_SIZE(mx8373_1    288                 .num_adr = ARRAY_SIZE(mx8373_1_adr),
289                 .adr_d = mx8373_1_adr,            289                 .adr_d = mx8373_1_adr,
290         },                                        290         },
291         {}                                        291         {}
292 };                                                292 };
293                                                   293 
294 static const struct snd_soc_acpi_link_adr tgl_    294 static const struct snd_soc_acpi_link_adr tgl_3_in_1_default[] = {
295         {                                         295         {
296                 .mask = BIT(0),                   296                 .mask = BIT(0),
297                 .num_adr = ARRAY_SIZE(rt711_0_    297                 .num_adr = ARRAY_SIZE(rt711_0_adr),
298                 .adr_d = rt711_0_adr,             298                 .adr_d = rt711_0_adr,
299         },                                        299         },
300         {                                         300         {
301                 .mask = BIT(1),                   301                 .mask = BIT(1),
302                 .num_adr = ARRAY_SIZE(rt1308_1    302                 .num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
303                 .adr_d = rt1308_1_group1_adr,     303                 .adr_d = rt1308_1_group1_adr,
304         },                                        304         },
305         {                                         305         {
306                 .mask = BIT(2),                   306                 .mask = BIT(2),
307                 .num_adr = ARRAY_SIZE(rt1308_2    307                 .num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
308                 .adr_d = rt1308_2_group1_adr,     308                 .adr_d = rt1308_2_group1_adr,
309         },                                        309         },
310         {                                         310         {
311                 .mask = BIT(3),                   311                 .mask = BIT(3),
312                 .num_adr = ARRAY_SIZE(rt715_3_    312                 .num_adr = ARRAY_SIZE(rt715_3_adr),
313                 .adr_d = rt715_3_adr,             313                 .adr_d = rt715_3_adr,
314         },                                        314         },
315         {}                                        315         {}
316 };                                                316 };
317                                                   317 
318 static const struct snd_soc_acpi_link_adr tgl_    318 static const struct snd_soc_acpi_link_adr tgl_3_in_1_mono_amp[] = {
319         {                                         319         {
320                 .mask = BIT(0),                   320                 .mask = BIT(0),
321                 .num_adr = ARRAY_SIZE(rt711_0_    321                 .num_adr = ARRAY_SIZE(rt711_0_adr),
322                 .adr_d = rt711_0_adr,             322                 .adr_d = rt711_0_adr,
323         },                                        323         },
324         {                                         324         {
325                 .mask = BIT(1),                   325                 .mask = BIT(1),
326                 .num_adr = ARRAY_SIZE(rt1308_1    326                 .num_adr = ARRAY_SIZE(rt1308_1_single_adr),
327                 .adr_d = rt1308_1_single_adr,     327                 .adr_d = rt1308_1_single_adr,
328         },                                        328         },
329         {                                         329         {
330                 .mask = BIT(3),                   330                 .mask = BIT(3),
331                 .num_adr = ARRAY_SIZE(rt715_3_    331                 .num_adr = ARRAY_SIZE(rt715_3_adr),
332                 .adr_d = rt715_3_adr,             332                 .adr_d = rt715_3_adr,
333         },                                        333         },
334         {}                                        334         {}
335 };                                                335 };
336                                                   336 
337 static const struct snd_soc_acpi_link_adr tgl_    337 static const struct snd_soc_acpi_link_adr tgl_sdw_rt711_link1_rt1308_link2_rt715_link0[] = {
338         {                                         338         {
339                 .mask = BIT(1),                   339                 .mask = BIT(1),
340                 .num_adr = ARRAY_SIZE(rt711_1_    340                 .num_adr = ARRAY_SIZE(rt711_1_adr),
341                 .adr_d = rt711_1_adr,             341                 .adr_d = rt711_1_adr,
342         },                                        342         },
343         {                                         343         {
344                 .mask = BIT(2),                   344                 .mask = BIT(2),
345                 .num_adr = ARRAY_SIZE(rt1308_2    345                 .num_adr = ARRAY_SIZE(rt1308_2_single_adr),
346                 .adr_d = rt1308_2_single_adr,     346                 .adr_d = rt1308_2_single_adr,
347         },                                        347         },
348         {                                         348         {
349                 .mask = BIT(0),                   349                 .mask = BIT(0),
350                 .num_adr = ARRAY_SIZE(rt715_0_    350                 .num_adr = ARRAY_SIZE(rt715_0_adr),
351                 .adr_d = rt715_0_adr,             351                 .adr_d = rt715_0_adr,
352         },                                        352         },
353         {}                                        353         {}
354 };                                                354 };
355                                                   355 
356 static const struct snd_soc_acpi_link_adr tgl_    356 static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca[] = {
357         {                                         357         {
358                 .mask = BIT(0),                   358                 .mask = BIT(0),
359                 .num_adr = ARRAY_SIZE(rt711_sd    359                 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
360                 .adr_d = rt711_sdca_0_adr,        360                 .adr_d = rt711_sdca_0_adr,
361         },                                        361         },
362         {                                         362         {
363                 .mask = BIT(1),                   363                 .mask = BIT(1),
364                 .num_adr = ARRAY_SIZE(rt1316_1    364                 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
365                 .adr_d = rt1316_1_group1_adr,     365                 .adr_d = rt1316_1_group1_adr,
366         },                                        366         },
367         {                                         367         {
368                 .mask = BIT(2),                   368                 .mask = BIT(2),
369                 .num_adr = ARRAY_SIZE(rt1316_2    369                 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
370                 .adr_d = rt1316_2_group1_adr,     370                 .adr_d = rt1316_2_group1_adr,
371         },                                        371         },
372         {                                         372         {
373                 .mask = BIT(3),                   373                 .mask = BIT(3),
374                 .num_adr = ARRAY_SIZE(rt714_3_    374                 .num_adr = ARRAY_SIZE(rt714_3_adr),
375                 .adr_d = rt714_3_adr,             375                 .adr_d = rt714_3_adr,
376         },                                        376         },
377         {}                                        377         {}
378 };                                                378 };
379                                                   379 
380 static const struct snd_soc_acpi_link_adr tgl_    380 static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca_mono[] = {
381         {                                         381         {
382                 .mask = BIT(0),                   382                 .mask = BIT(0),
383                 .num_adr = ARRAY_SIZE(rt711_sd    383                 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
384                 .adr_d = rt711_sdca_0_adr,        384                 .adr_d = rt711_sdca_0_adr,
385         },                                        385         },
386         {                                         386         {
387                 .mask = BIT(1),                   387                 .mask = BIT(1),
388                 .num_adr = ARRAY_SIZE(rt1316_1    388                 .num_adr = ARRAY_SIZE(rt1316_1_single_adr),
389                 .adr_d = rt1316_1_single_adr,     389                 .adr_d = rt1316_1_single_adr,
390         },                                        390         },
391         {                                         391         {
392                 .mask = BIT(3),                   392                 .mask = BIT(3),
393                 .num_adr = ARRAY_SIZE(rt714_3_    393                 .num_adr = ARRAY_SIZE(rt714_3_adr),
394                 .adr_d = rt714_3_adr,             394                 .adr_d = rt714_3_adr,
395         },                                        395         },
396         {}                                        396         {}
397 };                                                397 };
398                                                   398 
399 static const struct snd_soc_acpi_link_adr tgl_    399 static const struct snd_soc_acpi_link_adr tgl_712_only[] = {
400         {                                         400         {
401                 .mask = BIT(0),                   401                 .mask = BIT(0),
402                 .num_adr = ARRAY_SIZE(rt712_0_    402                 .num_adr = ARRAY_SIZE(rt712_0_single_adr),
403                 .adr_d = rt712_0_single_adr,      403                 .adr_d = rt712_0_single_adr,
404         },                                        404         },
405         {                                         405         {
406                 .mask = BIT(1),                   406                 .mask = BIT(1),
407                 .num_adr = ARRAY_SIZE(rt1712_1    407                 .num_adr = ARRAY_SIZE(rt1712_1_single_adr),
408                 .adr_d = rt1712_1_single_adr,     408                 .adr_d = rt1712_1_single_adr,
409         },                                        409         },
410         {}                                        410         {}
411 };                                                411 };
412                                                   412 
413 static const struct snd_soc_acpi_endpoint cs42    413 static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
414         { /* Jack Playback Endpoint */            414         { /* Jack Playback Endpoint */
415                 .num = 0,                         415                 .num = 0,
416                 .aggregated = 0,                  416                 .aggregated = 0,
417                 .group_position = 0,              417                 .group_position = 0,
418                 .group_id = 0,                    418                 .group_id = 0,
419         },                                        419         },
420         { /* DMIC Capture Endpoint */             420         { /* DMIC Capture Endpoint */
421                 .num = 1,                         421                 .num = 1,
422                 .aggregated = 0,                  422                 .aggregated = 0,
423                 .group_position = 0,              423                 .group_position = 0,
424                 .group_id = 0,                    424                 .group_id = 0,
425         },                                        425         },
426         { /* Jack Capture Endpoint */             426         { /* Jack Capture Endpoint */
427                 .num = 2,                         427                 .num = 2,
428                 .aggregated = 0,                  428                 .aggregated = 0,
429                 .group_position = 0,              429                 .group_position = 0,
430                 .group_id = 0,                    430                 .group_id = 0,
431         },                                        431         },
432         { /* Speaker Playback Endpoint */         432         { /* Speaker Playback Endpoint */
433                 .num = 3,                         433                 .num = 3,
434                 .aggregated = 0,                  434                 .aggregated = 0,
435                 .group_position = 0,              435                 .group_position = 0,
436                 .group_id = 0,                    436                 .group_id = 0,
437         },                                        437         },
438 };                                                438 };
439                                                   439 
440 static const struct snd_soc_acpi_adr_device cs    440 static const struct snd_soc_acpi_adr_device cs42l43_3_adr[] = {
441         {                                         441         {
442                 .adr = 0x00033001FA424301ull,     442                 .adr = 0x00033001FA424301ull,
443                 .num_endpoints = ARRAY_SIZE(cs    443                 .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
444                 .endpoints = cs42l43_endpoints    444                 .endpoints = cs42l43_endpoints,
445                 .name_prefix = "cs42l43"          445                 .name_prefix = "cs42l43"
446         }                                         446         }
447 };                                                447 };
448                                                   448 
449 static const struct snd_soc_acpi_adr_device cs    449 static const struct snd_soc_acpi_adr_device cs35l56_0_adr[] = {
450         {                                         450         {
451                 .adr = 0x00003301FA355601ull,     451                 .adr = 0x00003301FA355601ull,
452                 .num_endpoints = 1,               452                 .num_endpoints = 1,
453                 .endpoints = &spk_r_endpoint,     453                 .endpoints = &spk_r_endpoint,
454                 .name_prefix = "AMP1"             454                 .name_prefix = "AMP1"
455         },                                        455         },
456         {                                         456         {
457                 .adr = 0x00003201FA355601ull,     457                 .adr = 0x00003201FA355601ull,
458                 .num_endpoints = 1,               458                 .num_endpoints = 1,
459                 .endpoints = &spk_3_endpoint,     459                 .endpoints = &spk_3_endpoint,
460                 .name_prefix = "AMP2"             460                 .name_prefix = "AMP2"
461         }                                         461         }
462 };                                                462 };
463                                                   463 
464 static const struct snd_soc_acpi_adr_device cs    464 static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
465         {                                         465         {
466                 .adr = 0x00013701FA355601ull,     466                 .adr = 0x00013701FA355601ull,
467                 .num_endpoints = 1,               467                 .num_endpoints = 1,
468                 .endpoints = &spk_l_endpoint,     468                 .endpoints = &spk_l_endpoint,
469                 .name_prefix = "AMP3"             469                 .name_prefix = "AMP3"
470         },                                        470         },
471         {                                         471         {
472                 .adr = 0x00013601FA355601ull,     472                 .adr = 0x00013601FA355601ull,
473                 .num_endpoints = 1,               473                 .num_endpoints = 1,
474                 .endpoints = &spk_2_endpoint,     474                 .endpoints = &spk_2_endpoint,
475                 .name_prefix = "AMP4"             475                 .name_prefix = "AMP4"
476         }                                         476         }
477 };                                                477 };
478                                                   478 
479 static const struct snd_soc_acpi_link_adr tgl_    479 static const struct snd_soc_acpi_link_adr tgl_cs42l43_cs35l56[] = {
480         {                                         480         {
481                 .mask = BIT(3),                   481                 .mask = BIT(3),
482                 .num_adr = ARRAY_SIZE(cs42l43_    482                 .num_adr = ARRAY_SIZE(cs42l43_3_adr),
483                 .adr_d = cs42l43_3_adr,           483                 .adr_d = cs42l43_3_adr,
484         },                                        484         },
485         {                                         485         {
486                 .mask = BIT(0),                   486                 .mask = BIT(0),
487                 .num_adr = ARRAY_SIZE(cs35l56_    487                 .num_adr = ARRAY_SIZE(cs35l56_0_adr),
488                 .adr_d = cs35l56_0_adr,           488                 .adr_d = cs35l56_0_adr,
489         },                                        489         },
490         {                                         490         {
491                 .mask = BIT(1),                   491                 .mask = BIT(1),
492                 .num_adr = ARRAY_SIZE(cs35l56_    492                 .num_adr = ARRAY_SIZE(cs35l56_1_adr),
493                 .adr_d = cs35l56_1_adr,           493                 .adr_d = cs35l56_1_adr,
494         },                                        494         },
495         {}                                        495         {}
496 };                                                496 };
497                                                   497 
498 static const struct snd_soc_acpi_codecs tgl_rt    498 static const struct snd_soc_acpi_codecs tgl_rt5682_rt5682s_hp = {
499         .num_codecs = 2,                          499         .num_codecs = 2,
500         .codecs = {RT5682_ACPI_HID, RT5682S_AC    500         .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID},
501 };                                                501 };
502                                                   502 
503 static const struct snd_soc_acpi_codecs tgl_lt    503 static const struct snd_soc_acpi_codecs tgl_lt6911_hdmi = {
504         .num_codecs = 1,                          504         .num_codecs = 1,
505         .codecs = {"INTC10B0"}                    505         .codecs = {"INTC10B0"}
506 };                                                506 };
507                                                   507 
508 struct snd_soc_acpi_mach snd_soc_acpi_intel_tg    508 struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
509         {                                         509         {
510                 .comp_ids = &essx_83x6,           510                 .comp_ids = &essx_83x6,
511                 .drv_name = "sof-essx8336",       511                 .drv_name = "sof-essx8336",
512                 .sof_tplg_filename = "sof-tgl-    512                 .sof_tplg_filename = "sof-tgl-es8336", /* the tplg suffix is added at run time */
513                 .tplg_quirk_mask = SND_SOC_ACP    513                 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
514                                         SND_SO    514                                         SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
515                                         SND_SO    515                                         SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
516         },                                        516         },
517         /* place boards for each headphone cod    517         /* place boards for each headphone codec: sof driver will complete the
518          * tplg name and machine driver will d    518          * tplg name and machine driver will detect the amp type
519          */                                       519          */
520         {                                         520         {
521                 .comp_ids = &tgl_rt5682_rt5682    521                 .comp_ids = &tgl_rt5682_rt5682s_hp,
522                 .drv_name = "tgl_rt5682_def",     522                 .drv_name = "tgl_rt5682_def",
523                 .sof_tplg_filename = "sof-tgl"    523                 .sof_tplg_filename = "sof-tgl", /* the tplg suffix is added at run time */
524                 .tplg_quirk_mask = SND_SOC_ACP    524                 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
525                                         SND_SO    525                                         SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
526         },                                        526         },
527         /* place amp-only boards in the end of    527         /* place amp-only boards in the end of table */
528         {                                         528         {
529                 .id = "10EC1308",                 529                 .id = "10EC1308",
530                 .drv_name = "tgl_rt1308_hdmi_s    530                 .drv_name = "tgl_rt1308_hdmi_ssp",
531                 .machine_quirk = snd_soc_acpi_    531                 .machine_quirk = snd_soc_acpi_codec_list,
532                 .quirk_data = &tgl_lt6911_hdmi    532                 .quirk_data = &tgl_lt6911_hdmi,
533                 .sof_tplg_filename = "sof-tgl-    533                 .sof_tplg_filename = "sof-tgl-rt1308-ssp2-hdmi-ssp15.tplg"
534         },                                        534         },
535         {},                                       535         {},
536 };                                                536 };
537 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machi    537 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
538                                                   538 
539 /* this table is used when there is no I2S cod    539 /* this table is used when there is no I2S codec present */
540 struct snd_soc_acpi_mach snd_soc_acpi_intel_tg    540 struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
541         /* mockup tests need to be first */       541         /* mockup tests need to be first */
542         {                                         542         {
543                 .link_mask = GENMASK(3, 0),       543                 .link_mask = GENMASK(3, 0),
544                 .links = sdw_mockup_headset_2a    544                 .links = sdw_mockup_headset_2amps_mic,
545                 .drv_name = "sof_sdw",            545                 .drv_name = "sof_sdw",
546                 .sof_tplg_filename = "sof-tgl-    546                 .sof_tplg_filename = "sof-tgl-rt711-rt1308-rt715.tplg",
547         },                                        547         },
548         {                                         548         {
549                 .link_mask = BIT(0) | BIT(1) |    549                 .link_mask = BIT(0) | BIT(1) | BIT(3),
550                 .links = sdw_mockup_headset_1a    550                 .links = sdw_mockup_headset_1amp_mic,
551                 .drv_name = "sof_sdw",            551                 .drv_name = "sof_sdw",
552                 .sof_tplg_filename = "sof-tgl-    552                 .sof_tplg_filename = "sof-tgl-rt711-rt1308-mono-rt715.tplg",
553         },                                        553         },
554         {                                         554         {
555                 .link_mask = BIT(0) | BIT(1) |    555                 .link_mask = BIT(0) | BIT(1) | BIT(2),
556                 .links = sdw_mockup_mic_headse    556                 .links = sdw_mockup_mic_headset_1amp,
557                 .drv_name = "sof_sdw",            557                 .drv_name = "sof_sdw",
558                 .sof_tplg_filename = "sof-tgl-    558                 .sof_tplg_filename = "sof-tgl-rt715-rt711-rt1308-mono.tplg",
559         },                                        559         },
560         {                                         560         {
561                 .link_mask = 0xF, /* 4 active     561                 .link_mask = 0xF, /* 4 active links required */
562                 .links = tgl_712_only,            562                 .links = tgl_712_only,
563                 .drv_name = "sof_sdw",            563                 .drv_name = "sof_sdw",
564                 .sof_tplg_filename = "sof-tgl-    564                 .sof_tplg_filename = "sof-tgl-rt712.tplg",
565         },                                        565         },
566         {                                         566         {
567                 .link_mask = 0x7,                 567                 .link_mask = 0x7,
568                 .links = tgl_sdw_rt711_link1_r    568                 .links = tgl_sdw_rt711_link1_rt1308_link2_rt715_link0,
569                 .drv_name = "sof_sdw",            569                 .drv_name = "sof_sdw",
570                 .sof_tplg_filename = "sof-tgl-    570                 .sof_tplg_filename = "sof-tgl-rt715-rt711-rt1308-mono.tplg",
571         },                                        571         },
572         {                                         572         {
573                 .link_mask = 0xB,                 573                 .link_mask = 0xB,
574                 .links = tgl_cs42l43_cs35l56,     574                 .links = tgl_cs42l43_cs35l56,
575                 .drv_name = "sof_sdw",            575                 .drv_name = "sof_sdw",
576                 .sof_tplg_filename = "sof-tgl-    576                 .sof_tplg_filename = "sof-tgl-cs42l43-l3-cs35l56-l01.tplg",
577         },                                        577         },
578         {                                         578         {
579                 .link_mask = 0xF, /* 4 active     579                 .link_mask = 0xF, /* 4 active links required */
580                 .links = tgl_3_in_1_default,      580                 .links = tgl_3_in_1_default,
581                 .drv_name = "sof_sdw",            581                 .drv_name = "sof_sdw",
582                 .sof_tplg_filename = "sof-tgl-    582                 .sof_tplg_filename = "sof-tgl-rt711-rt1308-rt715.tplg",
583         },                                        583         },
584         {                                         584         {
585                 /*                                585                 /*
586                  * link_mask should be 0xB, bu    586                  * link_mask should be 0xB, but all links are enabled by BIOS.
587                  * This entry will be selected    587                  * This entry will be selected if there is no rt1308 exposed
588                  * on link2 since it will fail    588                  * on link2 since it will fail to match the above entry.
589                  */                               589                  */
590                 .link_mask = 0xF,                 590                 .link_mask = 0xF,
591                 .links = tgl_3_in_1_mono_amp,     591                 .links = tgl_3_in_1_mono_amp,
592                 .drv_name = "sof_sdw",            592                 .drv_name = "sof_sdw",
593                 .sof_tplg_filename = "sof-tgl-    593                 .sof_tplg_filename = "sof-tgl-rt711-rt1308-mono-rt715.tplg",
594         },                                        594         },
595         {                                         595         {
596                 .link_mask = 0xF, /* 4 active     596                 .link_mask = 0xF, /* 4 active links required */
597                 .links = tgl_3_in_1_sdca,         597                 .links = tgl_3_in_1_sdca,
598                 .drv_name = "sof_sdw",            598                 .drv_name = "sof_sdw",
599                 .sof_tplg_filename = "sof-tgl-    599                 .sof_tplg_filename = "sof-tgl-rt711-rt1316-rt714.tplg",
600         },                                        600         },
601         {                                         601         {
602                 /*                                602                 /*
603                  * link_mask should be 0xB, bu    603                  * link_mask should be 0xB, but all links are enabled by BIOS.
604                  * This entry will be selected    604                  * This entry will be selected if there is no rt1316 amplifier exposed
605                  * on link2 since it will fail    605                  * on link2 since it will fail to match the above entry.
606                  */                               606                  */
607                                                   607 
608                 .link_mask = 0xF, /* 4 active     608                 .link_mask = 0xF, /* 4 active links required */
609                 .links = tgl_3_in_1_sdca_mono,    609                 .links = tgl_3_in_1_sdca_mono,
610                 .drv_name = "sof_sdw",            610                 .drv_name = "sof_sdw",
611                 .sof_tplg_filename = "sof-tgl-    611                 .sof_tplg_filename = "sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg",
612         },                                        612         },
613                                                   613 
614         {                                         614         {
615                 .link_mask = 0x3, /* rt711 on     615                 .link_mask = 0x3, /* rt711 on link 0 and 1 rt1308 on link 1 */
616                 .links = tgl_hp,                  616                 .links = tgl_hp,
617                 .drv_name = "sof_sdw",            617                 .drv_name = "sof_sdw",
618                 .sof_tplg_filename = "sof-tgl-    618                 .sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
619         },                                        619         },
620         {                                         620         {
621                 .link_mask = 0x3, /* rt711 on     621                 .link_mask = 0x3, /* rt711 on link 0 and 2 rt1308s on link 1 */
622                 .links = tgl_rvp,                 622                 .links = tgl_rvp,
623                 .drv_name = "sof_sdw",            623                 .drv_name = "sof_sdw",
624                 .sof_tplg_filename = "sof-tgl-    624                 .sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
625         },                                        625         },
626         {                                         626         {
627                 .link_mask = 0x3, /* rt5682 on    627                 .link_mask = 0x3, /* rt5682 on link0 & 2xmax98373 on link 1 */
628                 .links = tgl_chromebook_base,     628                 .links = tgl_chromebook_base,
629                 .drv_name = "sof_sdw",            629                 .drv_name = "sof_sdw",
630                 .sof_tplg_filename = "sof-tgl-    630                 .sof_tplg_filename = "sof-tgl-sdw-max98373-rt5682.tplg",
631         },                                        631         },
632         {                                         632         {
633                 .link_mask = 0x1, /* rt711 on     633                 .link_mask = 0x1, /* rt711 on link 0 */
634                 .links = tgl_rvp_headset_only,    634                 .links = tgl_rvp_headset_only,
635                 .drv_name = "sof_sdw",            635                 .drv_name = "sof_sdw",
636                 .sof_tplg_filename = "sof-tgl-    636                 .sof_tplg_filename = "sof-tgl-rt711.tplg",
637         },                                        637         },
638         {},                                       638         {},
639 };                                                639 };
640 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_sdw_m    640 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_sdw_machines);
641                                                   641 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php