usb_audio_qmi_v01.c 24 KB

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