usb_audio_qmi_v01.c 21 KB

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