xref: /linux/sound/usb/qcom/usb_audio_qmi_v01.c (revision c0c9379f235df33a12ceae94370ad80c5278324d)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
4  */
5 
6 #include <linux/soc/qcom/qmi.h>
7 
8 #include "usb_audio_qmi_v01.h"
9 
10 static const struct qmi_elem_info mem_info_v01_ei[] = {
11 	{
12 		.data_type	= QMI_UNSIGNED_8_BYTE,
13 		.elem_len	= 1,
14 		.elem_size	= sizeof(u64),
15 		.array_type	= NO_ARRAY,
16 		.tlv_type	= 0,
17 		.offset		= offsetof(struct mem_info_v01, iova),
18 	},
19 	{
20 		.data_type	= QMI_UNSIGNED_8_BYTE,
21 		.elem_len	= 1,
22 		.elem_size	= sizeof(u64),
23 		.array_type	= NO_ARRAY,
24 		.tlv_type	= 0,
25 		.offset		= offsetof(struct mem_info_v01, dma),
26 	},
27 	{
28 		.data_type	= QMI_UNSIGNED_4_BYTE,
29 		.elem_len	= 1,
30 		.elem_size	= sizeof(u32),
31 		.array_type	= NO_ARRAY,
32 		.tlv_type	= 0,
33 		.offset		= offsetof(struct mem_info_v01, size),
34 	},
35 	{
36 		.data_type	= QMI_EOTI,
37 		.array_type	= NO_ARRAY,
38 		.tlv_type	= QMI_COMMON_TLV_TYPE,
39 	},
40 };
41 
42 static const struct qmi_elem_info apps_mem_info_v01_ei[] = {
43 	{
44 		.data_type	= QMI_STRUCT,
45 		.elem_len	= 1,
46 		.elem_size	= sizeof(struct mem_info_v01),
47 		.array_type	= NO_ARRAY,
48 		.tlv_type	= 0,
49 		.offset		= offsetof(struct apps_mem_info_v01, evt_ring),
50 		.ei_array	= mem_info_v01_ei,
51 	},
52 	{
53 		.data_type	= QMI_STRUCT,
54 		.elem_len	= 1,
55 		.elem_size	= sizeof(struct mem_info_v01),
56 		.array_type	= NO_ARRAY,
57 		.tlv_type	= 0,
58 		.offset		= offsetof(struct apps_mem_info_v01, tr_data),
59 		.ei_array	= mem_info_v01_ei,
60 	},
61 	{
62 		.data_type	= QMI_STRUCT,
63 		.elem_len	= 1,
64 		.elem_size	= sizeof(struct mem_info_v01),
65 		.array_type	= NO_ARRAY,
66 		.tlv_type	= 0,
67 		.offset		= offsetof(struct apps_mem_info_v01, tr_sync),
68 		.ei_array	= mem_info_v01_ei,
69 	},
70 	{
71 		.data_type	= QMI_STRUCT,
72 		.elem_len	= 1,
73 		.elem_size	= sizeof(struct mem_info_v01),
74 		.array_type	= NO_ARRAY,
75 		.tlv_type	= 0,
76 		.offset		= offsetof(struct apps_mem_info_v01, xfer_buff),
77 		.ei_array	= mem_info_v01_ei,
78 	},
79 	{
80 		.data_type	= QMI_STRUCT,
81 		.elem_len	= 1,
82 		.elem_size	= sizeof(struct mem_info_v01),
83 		.array_type	= NO_ARRAY,
84 		.tlv_type	= 0,
85 		.offset		= offsetof(struct apps_mem_info_v01, dcba),
86 		.ei_array	= mem_info_v01_ei,
87 	},
88 	{
89 		.data_type	= QMI_EOTI,
90 		.array_type	= NO_ARRAY,
91 		.tlv_type	= QMI_COMMON_TLV_TYPE,
92 	},
93 };
94 
95 static const struct qmi_elem_info usb_endpoint_descriptor_v01_ei[] = {
96 	{
97 		.data_type	= QMI_UNSIGNED_1_BYTE,
98 		.elem_len	= 1,
99 		.elem_size	= sizeof(u8),
100 		.array_type	= NO_ARRAY,
101 		.tlv_type	= 0,
102 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
103 						bLength),
104 	},
105 	{
106 		.data_type	= QMI_UNSIGNED_1_BYTE,
107 		.elem_len	= 1,
108 		.elem_size	= sizeof(u8),
109 		.array_type	= NO_ARRAY,
110 		.tlv_type	= 0,
111 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
112 						bDescriptorType),
113 	},
114 	{
115 		.data_type	= QMI_UNSIGNED_1_BYTE,
116 		.elem_len	= 1,
117 		.elem_size	= sizeof(u8),
118 		.array_type	= NO_ARRAY,
119 		.tlv_type	= 0,
120 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
121 						bEndpointAddress),
122 	},
123 	{
124 		.data_type	= QMI_UNSIGNED_1_BYTE,
125 		.elem_len	= 1,
126 		.elem_size	= sizeof(u8),
127 		.array_type	= NO_ARRAY,
128 		.tlv_type	= 0,
129 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
130 						bmAttributes),
131 	},
132 	{
133 		.data_type	= QMI_UNSIGNED_2_BYTE,
134 		.elem_len	= 1,
135 		.elem_size	= sizeof(u16),
136 		.array_type	= NO_ARRAY,
137 		.tlv_type	= 0,
138 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
139 						wMaxPacketSize),
140 	},
141 	{
142 		.data_type	= QMI_UNSIGNED_1_BYTE,
143 		.elem_len	= 1,
144 		.elem_size	= sizeof(u8),
145 		.array_type	= NO_ARRAY,
146 		.tlv_type	= 0,
147 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
148 						bInterval),
149 	},
150 	{
151 		.data_type	= QMI_UNSIGNED_1_BYTE,
152 		.elem_len	= 1,
153 		.elem_size	= sizeof(u8),
154 		.array_type	= NO_ARRAY,
155 		.tlv_type	= 0,
156 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
157 						bRefresh),
158 	},
159 	{
160 		.data_type	= QMI_UNSIGNED_1_BYTE,
161 		.elem_len	= 1,
162 		.elem_size	= sizeof(u8),
163 		.array_type	= NO_ARRAY,
164 		.tlv_type	= 0,
165 		.offset		= offsetof(struct usb_endpoint_descriptor_v01,
166 						bSynchAddress),
167 	},
168 	{
169 		.data_type	= QMI_EOTI,
170 		.array_type	= NO_ARRAY,
171 		.tlv_type	= QMI_COMMON_TLV_TYPE,
172 	},
173 };
174 
175 static const struct qmi_elem_info usb_interface_descriptor_v01_ei[] = {
176 	{
177 		.data_type	= QMI_UNSIGNED_1_BYTE,
178 		.elem_len	= 1,
179 		.elem_size	= sizeof(u8),
180 		.array_type	= NO_ARRAY,
181 		.tlv_type	= 0,
182 		.offset		= offsetof(struct usb_interface_descriptor_v01,
183 						bLength),
184 	},
185 	{
186 		.data_type	= QMI_UNSIGNED_1_BYTE,
187 		.elem_len	= 1,
188 		.elem_size	= sizeof(u8),
189 		.array_type	= NO_ARRAY,
190 		.tlv_type	= 0,
191 		.offset		= offsetof(struct usb_interface_descriptor_v01,
192 						bDescriptorType),
193 	},
194 	{
195 		.data_type	= QMI_UNSIGNED_1_BYTE,
196 		.elem_len	= 1,
197 		.elem_size	= sizeof(u8),
198 		.array_type	= NO_ARRAY,
199 		.tlv_type	= 0,
200 		.offset		= offsetof(struct usb_interface_descriptor_v01,
201 						bInterfaceNumber),
202 	},
203 	{
204 		.data_type	= QMI_UNSIGNED_1_BYTE,
205 		.elem_len	= 1,
206 		.elem_size	= sizeof(u8),
207 		.array_type	= NO_ARRAY,
208 		.tlv_type	= 0,
209 		.offset		= offsetof(struct usb_interface_descriptor_v01,
210 						bAlternateSetting),
211 	},
212 	{
213 		.data_type	= QMI_UNSIGNED_1_BYTE,
214 		.elem_len	= 1,
215 		.elem_size	= sizeof(u8),
216 		.array_type	= NO_ARRAY,
217 		.tlv_type	= 0,
218 		.offset		= offsetof(struct usb_interface_descriptor_v01,
219 						bNumEndpoints),
220 	},
221 	{
222 		.data_type	= QMI_UNSIGNED_1_BYTE,
223 		.elem_len	= 1,
224 		.elem_size	= sizeof(u8),
225 		.array_type	= NO_ARRAY,
226 		.tlv_type	= 0,
227 		.offset		= offsetof(struct usb_interface_descriptor_v01,
228 						bInterfaceClass),
229 	},
230 	{
231 		.data_type	= QMI_UNSIGNED_1_BYTE,
232 		.elem_len	= 1,
233 		.elem_size	= sizeof(u8),
234 		.array_type	= NO_ARRAY,
235 		.tlv_type	= 0,
236 		.offset		= offsetof(struct usb_interface_descriptor_v01,
237 						bInterfaceSubClass),
238 	},
239 	{
240 		.data_type	= QMI_UNSIGNED_1_BYTE,
241 		.elem_len	= 1,
242 		.elem_size	= sizeof(u8),
243 		.array_type	= NO_ARRAY,
244 		.tlv_type	= 0,
245 		.offset		= offsetof(struct usb_interface_descriptor_v01,
246 						bInterfaceProtocol),
247 	},
248 	{
249 		.data_type	= QMI_UNSIGNED_1_BYTE,
250 		.elem_len	= 1,
251 		.elem_size	= sizeof(u8),
252 		.array_type	= NO_ARRAY,
253 		.tlv_type	= 0,
254 		.offset		= offsetof(struct usb_interface_descriptor_v01,
255 						iInterface),
256 	},
257 	{
258 		.data_type	= QMI_EOTI,
259 		.array_type	= NO_ARRAY,
260 		.tlv_type	= QMI_COMMON_TLV_TYPE,
261 	},
262 };
263 
264 const struct qmi_elem_info qmi_uaudio_stream_req_msg_v01_ei[] = {
265 	{
266 		.data_type	= QMI_UNSIGNED_1_BYTE,
267 		.elem_len	= 1,
268 		.elem_size	= sizeof(u8),
269 		.array_type	= NO_ARRAY,
270 		.tlv_type	= 0x01,
271 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
272 						enable),
273 	},
274 	{
275 		.data_type	= QMI_UNSIGNED_4_BYTE,
276 		.elem_len	= 1,
277 		.elem_size	= sizeof(u32),
278 		.array_type	= NO_ARRAY,
279 		.tlv_type	= 0x02,
280 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
281 						usb_token),
282 	},
283 	{
284 		.data_type	= QMI_OPT_FLAG,
285 		.elem_len	= 1,
286 		.elem_size	= sizeof(u8),
287 		.array_type	= NO_ARRAY,
288 		.tlv_type	= 0x10,
289 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
290 						audio_format_valid),
291 	},
292 	{
293 		.data_type	= QMI_UNSIGNED_4_BYTE,
294 		.elem_len	= 1,
295 		.elem_size	= sizeof(u32),
296 		.array_type	= NO_ARRAY,
297 		.tlv_type	= 0x10,
298 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
299 						audio_format),
300 	},
301 	{
302 		.data_type	= QMI_OPT_FLAG,
303 		.elem_len	= 1,
304 		.elem_size	= sizeof(u8),
305 		.array_type	= NO_ARRAY,
306 		.tlv_type	= 0x11,
307 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
308 						number_of_ch_valid),
309 	},
310 	{
311 		.data_type	= QMI_UNSIGNED_4_BYTE,
312 		.elem_len	= 1,
313 		.elem_size	= sizeof(u32),
314 		.array_type	= NO_ARRAY,
315 		.tlv_type	= 0x11,
316 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
317 						number_of_ch),
318 	},
319 	{
320 		.data_type	= QMI_OPT_FLAG,
321 		.elem_len	= 1,
322 		.elem_size	= sizeof(u8),
323 		.array_type	= NO_ARRAY,
324 		.tlv_type	= 0x12,
325 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
326 						bit_rate_valid),
327 	},
328 	{
329 		.data_type	= QMI_UNSIGNED_4_BYTE,
330 		.elem_len	= 1,
331 		.elem_size	= sizeof(u32),
332 		.array_type	= NO_ARRAY,
333 		.tlv_type	= 0x12,
334 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
335 						bit_rate),
336 	},
337 	{
338 		.data_type	= QMI_OPT_FLAG,
339 		.elem_len	= 1,
340 		.elem_size	= sizeof(u8),
341 		.array_type	= NO_ARRAY,
342 		.tlv_type	= 0x13,
343 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
344 						xfer_buff_size_valid),
345 	},
346 	{
347 		.data_type	= QMI_UNSIGNED_4_BYTE,
348 		.elem_len	= 1,
349 		.elem_size	= sizeof(u32),
350 		.array_type	= NO_ARRAY,
351 		.tlv_type	= 0x13,
352 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
353 						xfer_buff_size),
354 	},
355 	{
356 		.data_type	= QMI_OPT_FLAG,
357 		.elem_len	= 1,
358 		.elem_size	= sizeof(u8),
359 		.array_type	= NO_ARRAY,
360 		.tlv_type	= 0x14,
361 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
362 						service_interval_valid),
363 	},
364 	{
365 		.data_type	= QMI_UNSIGNED_4_BYTE,
366 		.elem_len	= 1,
367 		.elem_size	= sizeof(u32),
368 		.array_type	= NO_ARRAY,
369 		.tlv_type	= 0x14,
370 		.offset		= offsetof(struct qmi_uaudio_stream_req_msg_v01,
371 						service_interval),
372 	},
373 	{
374 		.data_type	= QMI_EOTI,
375 		.array_type	= NO_ARRAY,
376 		.tlv_type	= QMI_COMMON_TLV_TYPE,
377 	},
378 };
379 
380 const struct qmi_elem_info qmi_uaudio_stream_resp_msg_v01_ei[] = {
381 	{
382 		.data_type	= QMI_STRUCT,
383 		.elem_len	= 1,
384 		.elem_size	= sizeof(struct qmi_response_type_v01),
385 		.array_type	= NO_ARRAY,
386 		.tlv_type	= 0x02,
387 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
388 					resp),
389 		.ei_array	= qmi_response_type_v01_ei,
390 	},
391 	{
392 		.data_type	= QMI_OPT_FLAG,
393 		.elem_len	= 1,
394 		.elem_size	= sizeof(u8),
395 		.array_type	= NO_ARRAY,
396 		.tlv_type	= 0x10,
397 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
398 					status_valid),
399 	},
400 	{
401 		.data_type	= QMI_SIGNED_4_BYTE_ENUM,
402 		.elem_len	= 1,
403 		.elem_size	= sizeof(enum usb_qmi_audio_stream_status_enum_v01),
404 		.array_type	= NO_ARRAY,
405 		.tlv_type	= 0x10,
406 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
407 					status),
408 	},
409 	{
410 		.data_type	= QMI_OPT_FLAG,
411 		.elem_len	= 1,
412 		.elem_size	= sizeof(u8),
413 		.array_type	= NO_ARRAY,
414 		.tlv_type	= 0x11,
415 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
416 					internal_status_valid),
417 	},
418 	{
419 		.data_type	= QMI_UNSIGNED_4_BYTE,
420 		.elem_len	= 1,
421 		.elem_size	= sizeof(u32),
422 		.array_type	= NO_ARRAY,
423 		.tlv_type	= 0x11,
424 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
425 					internal_status),
426 	},
427 	{
428 		.data_type	= QMI_OPT_FLAG,
429 		.elem_len	= 1,
430 		.elem_size	= sizeof(u8),
431 		.array_type	= NO_ARRAY,
432 		.tlv_type	= 0x12,
433 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
434 					slot_id_valid),
435 	},
436 	{
437 		.data_type	= QMI_UNSIGNED_4_BYTE,
438 		.elem_len	= 1,
439 		.elem_size	= sizeof(u32),
440 		.array_type	= NO_ARRAY,
441 		.tlv_type	= 0x12,
442 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
443 					slot_id),
444 	},
445 	{
446 		.data_type	= QMI_OPT_FLAG,
447 		.elem_len	= 1,
448 		.elem_size	= sizeof(u8),
449 		.array_type	= NO_ARRAY,
450 		.tlv_type	= 0x13,
451 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
452 					usb_token_valid),
453 	},
454 	{
455 		.data_type	= QMI_UNSIGNED_4_BYTE,
456 		.elem_len	= 1,
457 		.elem_size	= sizeof(u32),
458 		.array_type	= NO_ARRAY,
459 		.tlv_type	= 0x13,
460 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
461 					usb_token),
462 	},
463 	{
464 		.data_type	= QMI_OPT_FLAG,
465 		.elem_len	= 1,
466 		.elem_size	= sizeof(u8),
467 		.array_type	= NO_ARRAY,
468 		.tlv_type	= 0x14,
469 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
470 					std_as_opr_intf_desc_valid),
471 	},
472 	{
473 		.data_type	= QMI_STRUCT,
474 		.elem_len	= 1,
475 		.elem_size	= sizeof(struct usb_interface_descriptor_v01),
476 		.array_type	= NO_ARRAY,
477 		.tlv_type	= 0x14,
478 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
479 					std_as_opr_intf_desc),
480 		.ei_array	= usb_interface_descriptor_v01_ei,
481 	},
482 	{
483 		.data_type	= QMI_OPT_FLAG,
484 		.elem_len	= 1,
485 		.elem_size	= sizeof(u8),
486 		.array_type	= NO_ARRAY,
487 		.tlv_type	= 0x15,
488 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
489 					std_as_data_ep_desc_valid),
490 	},
491 	{
492 		.data_type	= QMI_STRUCT,
493 		.elem_len	= 1,
494 		.elem_size	= sizeof(struct usb_endpoint_descriptor_v01),
495 		.array_type	= NO_ARRAY,
496 		.tlv_type	= 0x15,
497 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
498 					std_as_data_ep_desc),
499 		.ei_array	= usb_endpoint_descriptor_v01_ei,
500 	},
501 	{
502 		.data_type	= QMI_OPT_FLAG,
503 		.elem_len	= 1,
504 		.elem_size	= sizeof(u8),
505 		.array_type	= NO_ARRAY,
506 		.tlv_type	= 0x16,
507 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
508 					std_as_sync_ep_desc_valid),
509 	},
510 	{
511 		.data_type	= QMI_STRUCT,
512 		.elem_len	= 1,
513 		.elem_size	= sizeof(struct usb_endpoint_descriptor_v01),
514 		.array_type	= NO_ARRAY,
515 		.tlv_type	= 0x16,
516 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
517 					std_as_sync_ep_desc),
518 		.ei_array	= usb_endpoint_descriptor_v01_ei,
519 	},
520 	{
521 		.data_type	= QMI_OPT_FLAG,
522 		.elem_len	= 1,
523 		.elem_size	= sizeof(u8),
524 		.array_type	= NO_ARRAY,
525 		.tlv_type	= 0x17,
526 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
527 					usb_audio_spec_revision_valid),
528 	},
529 	{
530 		.data_type	= QMI_UNSIGNED_2_BYTE,
531 		.elem_len	= 1,
532 		.elem_size	= sizeof(u16),
533 		.array_type	= NO_ARRAY,
534 		.tlv_type	= 0x17,
535 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
536 					usb_audio_spec_revision),
537 	},
538 	{
539 		.data_type	= QMI_OPT_FLAG,
540 		.elem_len	= 1,
541 		.elem_size	= sizeof(u8),
542 		.array_type	= NO_ARRAY,
543 		.tlv_type	= 0x18,
544 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
545 					data_path_delay_valid),
546 	},
547 	{
548 		.data_type	= QMI_UNSIGNED_1_BYTE,
549 		.elem_len	= 1,
550 		.elem_size	= sizeof(u8),
551 		.array_type	= NO_ARRAY,
552 		.tlv_type	= 0x18,
553 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
554 					data_path_delay),
555 	},
556 	{
557 		.data_type	= QMI_OPT_FLAG,
558 		.elem_len	= 1,
559 		.elem_size	= sizeof(u8),
560 		.array_type	= NO_ARRAY,
561 		.tlv_type	= 0x19,
562 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
563 					usb_audio_subslot_size_valid),
564 	},
565 	{
566 		.data_type	= QMI_UNSIGNED_1_BYTE,
567 		.elem_len	= 1,
568 		.elem_size	= sizeof(u8),
569 		.array_type	= NO_ARRAY,
570 		.tlv_type	= 0x19,
571 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
572 					usb_audio_subslot_size),
573 	},
574 	{
575 		.data_type	= QMI_OPT_FLAG,
576 		.elem_len	= 1,
577 		.elem_size	= sizeof(u8),
578 		.array_type	= NO_ARRAY,
579 		.tlv_type	= 0x1A,
580 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
581 					xhci_mem_info_valid),
582 	},
583 	{
584 		.data_type	= QMI_STRUCT,
585 		.elem_len	= 1,
586 		.elem_size	= sizeof(struct apps_mem_info_v01),
587 		.array_type	= NO_ARRAY,
588 		.tlv_type	= 0x1A,
589 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
590 					xhci_mem_info),
591 		.ei_array	= apps_mem_info_v01_ei,
592 	},
593 	{
594 		.data_type	= QMI_OPT_FLAG,
595 		.elem_len	= 1,
596 		.elem_size	= sizeof(u8),
597 		.array_type	= NO_ARRAY,
598 		.tlv_type	= 0x1B,
599 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
600 					interrupter_num_valid),
601 	},
602 	{
603 		.data_type	= QMI_UNSIGNED_1_BYTE,
604 		.elem_len	= 1,
605 		.elem_size	= sizeof(u8),
606 		.array_type	= NO_ARRAY,
607 		.tlv_type	= 0x1B,
608 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
609 					interrupter_num),
610 	},
611 	{
612 		.data_type	= QMI_OPT_FLAG,
613 		.elem_len	= 1,
614 		.elem_size	= sizeof(u8),
615 		.array_type	= NO_ARRAY,
616 		.tlv_type	= 0x1C,
617 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
618 					speed_info_valid),
619 	},
620 	{
621 		.data_type	= QMI_SIGNED_4_BYTE_ENUM,
622 		.elem_len	= 1,
623 		.elem_size	= sizeof(enum usb_qmi_audio_device_speed_enum_v01),
624 		.array_type	= NO_ARRAY,
625 		.tlv_type	= 0x1C,
626 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
627 					speed_info),
628 	},
629 	{
630 		.data_type	= QMI_OPT_FLAG,
631 		.elem_len	= 1,
632 		.elem_size	= sizeof(u8),
633 		.array_type	= NO_ARRAY,
634 		.tlv_type	= 0x1D,
635 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
636 					controller_num_valid),
637 	},
638 	{
639 		.data_type	= QMI_UNSIGNED_1_BYTE,
640 		.elem_len	= 1,
641 		.elem_size	= sizeof(u8),
642 		.array_type	= NO_ARRAY,
643 		.tlv_type	= 0x1D,
644 		.offset		= offsetof(struct qmi_uaudio_stream_resp_msg_v01,
645 					controller_num),
646 	},
647 	{
648 		.data_type	= QMI_EOTI,
649 		.array_type	= NO_ARRAY,
650 		.tlv_type	= QMI_COMMON_TLV_TYPE,
651 	},
652 };
653 
654 const struct qmi_elem_info qmi_uaudio_stream_ind_msg_v01_ei[] = {
655 	{
656 		.data_type	= QMI_SIGNED_4_BYTE_ENUM,
657 		.elem_len	= 1,
658 		.elem_size	= sizeof(
659 				enum usb_qmi_audio_device_indication_enum_v01),
660 		.array_type	= NO_ARRAY,
661 		.tlv_type	= 0x01,
662 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
663 						dev_event),
664 	},
665 	{
666 		.data_type	= QMI_UNSIGNED_4_BYTE,
667 		.elem_len	= 1,
668 		.elem_size	= sizeof(u32),
669 		.array_type	= NO_ARRAY,
670 		.tlv_type	= 0x02,
671 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
672 						slot_id),
673 	},
674 	{
675 		.data_type	= QMI_OPT_FLAG,
676 		.elem_len	= 1,
677 		.elem_size	= sizeof(u8),
678 		.array_type	= NO_ARRAY,
679 		.tlv_type	= 0x10,
680 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
681 						usb_token_valid),
682 	},
683 	{
684 		.data_type	= QMI_UNSIGNED_4_BYTE,
685 		.elem_len	= 1,
686 		.elem_size	= sizeof(u32),
687 		.array_type	= NO_ARRAY,
688 		.tlv_type	= 0x10,
689 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
690 						usb_token),
691 	},
692 	{
693 		.data_type	= QMI_OPT_FLAG,
694 		.elem_len	= 1,
695 		.elem_size	= sizeof(u8),
696 		.array_type	= NO_ARRAY,
697 		.tlv_type	= 0x11,
698 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
699 						std_as_opr_intf_desc_valid),
700 	},
701 	{
702 		.data_type	= QMI_STRUCT,
703 		.elem_len	= 1,
704 		.elem_size	= sizeof(struct usb_interface_descriptor_v01),
705 		.array_type	= NO_ARRAY,
706 		.tlv_type	= 0x11,
707 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
708 						std_as_opr_intf_desc),
709 		.ei_array	= usb_interface_descriptor_v01_ei,
710 	},
711 	{
712 		.data_type	= QMI_OPT_FLAG,
713 		.elem_len	= 1,
714 		.elem_size	= sizeof(u8),
715 		.array_type	= NO_ARRAY,
716 		.tlv_type	= 0x12,
717 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
718 						std_as_data_ep_desc_valid),
719 	},
720 	{
721 		.data_type	= QMI_STRUCT,
722 		.elem_len	= 1,
723 		.elem_size	= sizeof(struct usb_endpoint_descriptor_v01),
724 		.array_type	= NO_ARRAY,
725 		.tlv_type	= 0x12,
726 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
727 						std_as_data_ep_desc),
728 		.ei_array	= usb_endpoint_descriptor_v01_ei,
729 	},
730 	{
731 		.data_type	= QMI_OPT_FLAG,
732 		.elem_len	= 1,
733 		.elem_size	= sizeof(u8),
734 		.array_type	= NO_ARRAY,
735 		.tlv_type	= 0x13,
736 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
737 						std_as_sync_ep_desc_valid),
738 	},
739 	{
740 		.data_type	= QMI_STRUCT,
741 		.elem_len	= 1,
742 		.elem_size	= sizeof(struct usb_endpoint_descriptor_v01),
743 		.array_type	= NO_ARRAY,
744 		.tlv_type	= 0x13,
745 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
746 						std_as_sync_ep_desc),
747 		.ei_array	= usb_endpoint_descriptor_v01_ei,
748 	},
749 	{
750 		.data_type	= QMI_OPT_FLAG,
751 		.elem_len	= 1,
752 		.elem_size	= sizeof(u8),
753 		.array_type	= NO_ARRAY,
754 		.tlv_type	= 0x14,
755 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
756 						usb_audio_spec_revision_valid),
757 	},
758 	{
759 		.data_type	= QMI_UNSIGNED_2_BYTE,
760 		.elem_len	= 1,
761 		.elem_size	= sizeof(u16),
762 		.array_type	= NO_ARRAY,
763 		.tlv_type	= 0x14,
764 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
765 						usb_audio_spec_revision),
766 	},
767 	{
768 		.data_type	= QMI_OPT_FLAG,
769 		.elem_len	= 1,
770 		.elem_size	= sizeof(u8),
771 		.array_type	= NO_ARRAY,
772 		.tlv_type	= 0x15,
773 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
774 						data_path_delay_valid),
775 	},
776 	{
777 		.data_type	= QMI_UNSIGNED_1_BYTE,
778 		.elem_len	= 1,
779 		.elem_size	= sizeof(u8),
780 		.array_type	= NO_ARRAY,
781 		.tlv_type	= 0x15,
782 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
783 						data_path_delay),
784 	},
785 	{
786 		.data_type	= QMI_OPT_FLAG,
787 		.elem_len	= 1,
788 		.elem_size	= sizeof(u8),
789 		.array_type	= NO_ARRAY,
790 		.tlv_type	= 0x16,
791 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
792 						usb_audio_subslot_size_valid),
793 	},
794 	{
795 		.data_type	= QMI_UNSIGNED_1_BYTE,
796 		.elem_len	= 1,
797 		.elem_size	= sizeof(u8),
798 		.array_type	= NO_ARRAY,
799 		.tlv_type	= 0x16,
800 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
801 						usb_audio_subslot_size),
802 	},
803 	{
804 		.data_type	= QMI_OPT_FLAG,
805 		.elem_len	= 1,
806 		.elem_size	= sizeof(u8),
807 		.array_type	= NO_ARRAY,
808 		.tlv_type	= 0x17,
809 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
810 						xhci_mem_info_valid),
811 	},
812 	{
813 		.data_type	= QMI_STRUCT,
814 		.elem_len	= 1,
815 		.elem_size	= sizeof(struct apps_mem_info_v01),
816 		.array_type	= NO_ARRAY,
817 		.tlv_type	= 0x17,
818 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
819 						xhci_mem_info),
820 		.ei_array	= apps_mem_info_v01_ei,
821 	},
822 	{
823 		.data_type	= QMI_OPT_FLAG,
824 		.elem_len	= 1,
825 		.elem_size	= sizeof(u8),
826 		.array_type	= NO_ARRAY,
827 		.tlv_type	= 0x18,
828 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
829 						interrupter_num_valid),
830 	},
831 	{
832 		.data_type	= QMI_UNSIGNED_1_BYTE,
833 		.elem_len	= 1,
834 		.elem_size	= sizeof(u8),
835 		.array_type	= NO_ARRAY,
836 		.tlv_type	= 0x18,
837 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
838 						interrupter_num),
839 	},
840 	{
841 		.data_type	= QMI_OPT_FLAG,
842 		.elem_len	= 1,
843 		.elem_size	= sizeof(u8),
844 		.array_type	= NO_ARRAY,
845 		.tlv_type	= 0x19,
846 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
847 						controller_num_valid),
848 	},
849 	{
850 		.data_type	= QMI_UNSIGNED_1_BYTE,
851 		.elem_len	= 1,
852 		.elem_size	= sizeof(u8),
853 		.array_type	= NO_ARRAY,
854 		.tlv_type	= 0x19,
855 		.offset		= offsetof(struct qmi_uaudio_stream_ind_msg_v01,
856 						controller_num),
857 	},
858 	{
859 		.data_type	= QMI_EOTI,
860 		.array_type	= NO_ARRAY,
861 		.tlv_type	= QMI_COMMON_TLV_TYPE,
862 	},
863 };
864