audio-v3.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (c) 2017 Ruslan Bilovol <ruslan.bilovol@gmail.com>
  4. *
  5. * This file holds USB constants and structures defined
  6. * by the USB DEVICE CLASS DEFINITION FOR AUDIO DEVICES Release 3.0.
  7. */
  8. #ifndef __LINUX_USB_AUDIO_V3_H
  9. #define __LINUX_USB_AUDIO_V3_H
  10. #include <linux/types.h>
  11. /*
  12. * v1.0, v2.0 and v3.0 of this standard have many things in common. For the rest
  13. * of the definitions, please refer to audio.h and audio-v2.h
  14. */
  15. /* All High Capability descriptors have these 2 fields at the beginning */
  16. struct uac3_hc_descriptor_header {
  17. __le16 wLength;
  18. __u8 bDescriptorType;
  19. __u8 bDescriptorSubtype;
  20. __le16 wDescriptorID;
  21. } __attribute__ ((packed));
  22. /* 4.3.1 CLUSTER DESCRIPTOR HEADER */
  23. struct uac3_cluster_header_descriptor {
  24. __le16 wLength;
  25. __u8 bDescriptorType;
  26. __u8 bDescriptorSubtype;
  27. __le16 wDescriptorID;
  28. __u8 bNrChannels;
  29. } __attribute__ ((packed));
  30. /* 4.3.2.1 SEGMENTS */
  31. struct uac3_cluster_segment_descriptor {
  32. __le16 wLength;
  33. __u8 bSegmentType;
  34. /* __u8[0]; segment-specific data */
  35. } __attribute__ ((packed));
  36. /* 4.3.2.1.1 END SEGMENT */
  37. struct uac3_cluster_end_segment_descriptor {
  38. __le16 wLength;
  39. __u8 bSegmentType; /* Constant END_SEGMENT */
  40. } __attribute__ ((packed));
  41. /* 4.3.2.1.3.1 INFORMATION SEGMENT */
  42. struct uac3_cluster_information_segment_descriptor {
  43. __le16 wLength;
  44. __u8 bSegmentType;
  45. __u8 bChPurpose;
  46. __u8 bChRelationship;
  47. __u8 bChGroupID;
  48. } __attribute__ ((packed));
  49. /* 4.5.2 CLASS-SPECIFIC AC INTERFACE DESCRIPTOR */
  50. struct uac3_ac_header_descriptor {
  51. __u8 bLength; /* 10 */
  52. __u8 bDescriptorType; /* CS_INTERFACE descriptor type */
  53. __u8 bDescriptorSubtype; /* HEADER descriptor subtype */
  54. __u8 bCategory;
  55. /* includes Clock Source, Unit, Terminal, and Power Domain desc. */
  56. __le16 wTotalLength;
  57. __le32 bmControls;
  58. } __attribute__ ((packed));
  59. /* 4.5.2.1 INPUT TERMINAL DESCRIPTOR */
  60. struct uac3_input_terminal_descriptor {
  61. __u8 bLength;
  62. __u8 bDescriptorType;
  63. __u8 bDescriptorSubtype;
  64. __u8 bTerminalID;
  65. __le16 wTerminalType;
  66. __u8 bAssocTerminal;
  67. __u8 bCSourceID;
  68. __le32 bmControls;
  69. __le16 wClusterDescrID;
  70. __le16 wExTerminalDescrID;
  71. __le16 wConnectorsDescrID;
  72. __le16 wTerminalDescrStr;
  73. } __attribute__((packed));
  74. /* 4.5.2.2 OUTPUT TERMINAL DESCRIPTOR */
  75. struct uac3_output_terminal_descriptor {
  76. __u8 bLength;
  77. __u8 bDescriptorType;
  78. __u8 bDescriptorSubtype;
  79. __u8 bTerminalID;
  80. __le16 wTerminalType;
  81. __u8 bAssocTerminal;
  82. __u8 bSourceID;
  83. __u8 bCSourceID;
  84. __le32 bmControls;
  85. __le16 wExTerminalDescrID;
  86. __le16 wConnectorsDescrID;
  87. __le16 wTerminalDescrStr;
  88. } __attribute__((packed));
  89. /* 4.5.2.7 FEATURE UNIT DESCRIPTOR */
  90. struct uac3_feature_unit_descriptor {
  91. __u8 bLength;
  92. __u8 bDescriptorType;
  93. __u8 bDescriptorSubtype;
  94. __u8 bUnitID;
  95. __u8 bSourceID;
  96. /* bmaControls is actually u32,
  97. * but u8 is needed for the hybrid parser */
  98. __u8 bmaControls[0]; /* variable length */
  99. /* wFeatureDescrStr omitted */
  100. } __attribute__((packed));
  101. #define UAC3_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 4)
  102. /* As above, but more useful for defining your own descriptors */
  103. #define DECLARE_UAC3_FEATURE_UNIT_DESCRIPTOR(ch) \
  104. struct uac3_feature_unit_descriptor_##ch { \
  105. __u8 bLength; \
  106. __u8 bDescriptorType; \
  107. __u8 bDescriptorSubtype; \
  108. __u8 bUnitID; \
  109. __u8 bSourceID; \
  110. __le32 bmaControls[ch + 1]; \
  111. __le16 wFeatureDescrStr; \
  112. } __attribute__ ((packed))
  113. /* 4.5.2.12 CLOCK SOURCE DESCRIPTOR */
  114. struct uac3_clock_source_descriptor {
  115. __u8 bLength;
  116. __u8 bDescriptorType;
  117. __u8 bDescriptorSubtype;
  118. __u8 bClockID;
  119. __u8 bmAttributes;
  120. __le32 bmControls;
  121. __u8 bReferenceTerminal;
  122. __le16 wClockSourceStr;
  123. } __attribute__((packed));
  124. /* bmAttribute fields */
  125. #define UAC3_CLOCK_SOURCE_TYPE_EXT 0x0
  126. #define UAC3_CLOCK_SOURCE_TYPE_INT 0x1
  127. #define UAC3_CLOCK_SOURCE_ASYNC (0 << 2)
  128. #define UAC3_CLOCK_SOURCE_SYNCED_TO_SOF (1 << 1)
  129. /* 4.5.2.13 CLOCK SELECTOR DESCRIPTOR */
  130. struct uac3_clock_selector_descriptor {
  131. __u8 bLength;
  132. __u8 bDescriptorType;
  133. __u8 bDescriptorSubtype;
  134. __u8 bClockID;
  135. __u8 bNrInPins;
  136. __u8 baCSourceID[];
  137. /* bmControls and wCSelectorDescrStr omitted */
  138. } __attribute__((packed));
  139. /* 4.5.2.14 CLOCK MULTIPLIER DESCRIPTOR */
  140. struct uac3_clock_multiplier_descriptor {
  141. __u8 bLength;
  142. __u8 bDescriptorType;
  143. __u8 bDescriptorSubtype;
  144. __u8 bClockID;
  145. __u8 bCSourceID;
  146. __le32 bmControls;
  147. __le16 wCMultiplierDescrStr;
  148. } __attribute__((packed));
  149. /* 4.5.2.15 POWER DOMAIN DESCRIPTOR */
  150. struct uac3_power_domain_descriptor {
  151. __u8 bLength;
  152. __u8 bDescriptorType;
  153. __u8 bDescriptorSubtype;
  154. __u8 bPowerDomainID;
  155. __le16 waRecoveryTime1;
  156. __le16 waRecoveryTime2;
  157. __u8 bNrEntities;
  158. __u8 baEntityID[];
  159. /* wPDomainDescrStr omitted */
  160. } __attribute__((packed));
  161. /* As above, but more useful for defining your own descriptors */
  162. #define DECLARE_UAC3_POWER_DOMAIN_DESCRIPTOR(n) \
  163. struct uac3_power_domain_descriptor_##n { \
  164. __u8 bLength; \
  165. __u8 bDescriptorType; \
  166. __u8 bDescriptorSubtype; \
  167. __u8 bPowerDomainID; \
  168. __le16 waRecoveryTime1; \
  169. __le16 waRecoveryTime2; \
  170. __u8 bNrEntities; \
  171. __u8 baEntityID[n]; \
  172. __le16 wPDomainDescrStr; \
  173. } __attribute__ ((packed))
  174. /* 4.7.2 CLASS-SPECIFIC AS INTERFACE DESCRIPTOR */
  175. struct uac3_as_header_descriptor {
  176. __u8 bLength;
  177. __u8 bDescriptorType;
  178. __u8 bDescriptorSubtype;
  179. __u8 bTerminalLink;
  180. __le32 bmControls;
  181. __le16 wClusterDescrID;
  182. __le64 bmFormats;
  183. __u8 bSubslotSize;
  184. __u8 bBitResolution;
  185. __le16 bmAuxProtocols;
  186. __u8 bControlSize;
  187. } __attribute__((packed));
  188. #define UAC3_FORMAT_TYPE_I_RAW_DATA (1 << 6)
  189. /* 4.8.1.2 CLASS-SPECIFIC AS ISOCHRONOUS AUDIO DATA ENDPOINT DESCRIPTOR */
  190. struct uac3_iso_endpoint_descriptor {
  191. __u8 bLength;
  192. __u8 bDescriptorType;
  193. __u8 bDescriptorSubtype;
  194. __le32 bmControls;
  195. __u8 bLockDelayUnits;
  196. __le16 wLockDelay;
  197. } __attribute__((packed));
  198. /* 5.2.1.6.1 INSERTION CONTROL PARAMETER BLOCK */
  199. struct uac3_insertion_ctl_blk {
  200. __u8 bSize;
  201. __u8 bmConInserted;
  202. } __attribute__ ((packed));
  203. /* 6.1 INTERRUPT DATA MESSAGE */
  204. struct uac3_interrupt_data_msg {
  205. __u8 bInfo;
  206. __u8 bSourceType;
  207. __le16 wValue;
  208. __le16 wIndex;
  209. } __attribute__((packed));
  210. /* A.2 AUDIO AUDIO FUNCTION SUBCLASS CODES */
  211. #define UAC3_FUNCTION_SUBCLASS_UNDEFINED 0x00
  212. #define UAC3_FUNCTION_SUBCLASS_FULL_ADC_3_0 0x01
  213. /* BADD profiles */
  214. #define UAC3_FUNCTION_SUBCLASS_GENERIC_IO 0x20
  215. #define UAC3_FUNCTION_SUBCLASS_HEADPHONE 0x21
  216. #define UAC3_FUNCTION_SUBCLASS_SPEAKER 0x22
  217. #define UAC3_FUNCTION_SUBCLASS_MICROPHONE 0x23
  218. #define UAC3_FUNCTION_SUBCLASS_HEADSET 0x24
  219. #define UAC3_FUNCTION_SUBCLASS_HEADSET_ADAPTER 0x25
  220. #define UAC3_FUNCTION_SUBCLASS_SPEAKERPHONE 0x26
  221. /* A.7 AUDIO FUNCTION CATEGORY CODES */
  222. #define UAC3_FUNCTION_SUBCLASS_UNDEFINED 0x00
  223. #define UAC3_FUNCTION_DESKTOP_SPEAKER 0x01
  224. #define UAC3_FUNCTION_HOME_THEATER 0x02
  225. #define UAC3_FUNCTION_MICROPHONE 0x03
  226. #define UAC3_FUNCTION_HEADSET 0x04
  227. #define UAC3_FUNCTION_TELEPHONE 0x05
  228. #define UAC3_FUNCTION_CONVERTER 0x06
  229. #define UAC3_FUNCTION_SOUND_RECORDER 0x07
  230. #define UAC3_FUNCTION_IO_BOX 0x08
  231. #define UAC3_FUNCTION_MUSICAL_INSTRUMENT 0x09
  232. #define UAC3_FUNCTION_PRO_AUDIO 0x0a
  233. #define UAC3_FUNCTION_AUDIO_VIDEO 0x0b
  234. #define UAC3_FUNCTION_CONTROL_PANEL 0x0c
  235. #define UAC3_FUNCTION_HEADPHONE 0x0d
  236. #define UAC3_FUNCTION_GENERIC_SPEAKER 0x0e
  237. #define UAC3_FUNCTION_HEADSET_ADAPTER 0x0f
  238. #define UAC3_FUNCTION_SPEAKERPHONE 0x10
  239. #define UAC3_FUNCTION_OTHER 0xff
  240. /* A.8 AUDIO CLASS-SPECIFIC DESCRIPTOR TYPES */
  241. #define UAC3_CS_UNDEFINED 0x20
  242. #define UAC3_CS_DEVICE 0x21
  243. #define UAC3_CS_CONFIGURATION 0x22
  244. #define UAC3_CS_STRING 0x23
  245. #define UAC3_CS_INTERFACE 0x24
  246. #define UAC3_CS_ENDPOINT 0x25
  247. #define UAC3_CS_CLUSTER 0x26
  248. /* A.10 CLUSTER DESCRIPTOR SEGMENT TYPES */
  249. #define UAC3_SEGMENT_UNDEFINED 0x00
  250. #define UAC3_CLUSTER_DESCRIPTION 0x01
  251. #define UAC3_CLUSTER_VENDOR_DEFINED 0x1F
  252. #define UAC3_CHANNEL_INFORMATION 0x20
  253. #define UAC3_CHANNEL_AMBISONIC 0x21
  254. #define UAC3_CHANNEL_DESCRIPTION 0x22
  255. #define UAC3_CHANNEL_VENDOR_DEFINED 0xFE
  256. #define UAC3_END_SEGMENT 0xFF
  257. /* A.11 CHANNEL PURPOSE DEFINITIONS */
  258. #define UAC3_PURPOSE_UNDEFINED 0x00
  259. #define UAC3_PURPOSE_GENERIC_AUDIO 0x01
  260. #define UAC3_PURPOSE_VOICE 0x02
  261. #define UAC3_PURPOSE_SPEECH 0x03
  262. #define UAC3_PURPOSE_AMBIENT 0x04
  263. #define UAC3_PURPOSE_REFERENCE 0x05
  264. #define UAC3_PURPOSE_ULTRASONIC 0x06
  265. #define UAC3_PURPOSE_VIBROKINETIC 0x07
  266. #define UAC3_PURPOSE_NON_AUDIO 0xFF
  267. /* A.12 CHANNEL RELATIONSHIP DEFINITIONS */
  268. #define UAC3_CH_RELATIONSHIP_UNDEFINED 0x00
  269. #define UAC3_CH_MONO 0x01
  270. #define UAC3_CH_LEFT 0x02
  271. #define UAC3_CH_RIGHT 0x03
  272. #define UAC3_CH_ARRAY 0x04
  273. #define UAC3_CH_PATTERN_X 0x20
  274. #define UAC3_CH_PATTERN_Y 0x21
  275. #define UAC3_CH_PATTERN_A 0x22
  276. #define UAC3_CH_PATTERN_B 0x23
  277. #define UAC3_CH_PATTERN_M 0x24
  278. #define UAC3_CH_PATTERN_S 0x25
  279. #define UAC3_CH_FRONT_LEFT 0x80
  280. #define UAC3_CH_FRONT_RIGHT 0x81
  281. #define UAC3_CH_FRONT_CENTER 0x82
  282. #define UAC3_CH_FRONT_LEFT_OF_CENTER 0x83
  283. #define UAC3_CH_FRONT_RIGHT_OF_CENTER 0x84
  284. #define UAC3_CH_FRONT_WIDE_LEFT 0x85
  285. #define UAC3_CH_FRONT_WIDE_RIGHT 0x86
  286. #define UAC3_CH_SIDE_LEFT 0x87
  287. #define UAC3_CH_SIDE_RIGHT 0x88
  288. #define UAC3_CH_SURROUND_ARRAY_LEFT 0x89
  289. #define UAC3_CH_SURROUND_ARRAY_RIGHT 0x8A
  290. #define UAC3_CH_BACK_LEFT 0x8B
  291. #define UAC3_CH_BACK_RIGHT 0x8C
  292. #define UAC3_CH_BACK_CENTER 0x8D
  293. #define UAC3_CH_BACK_LEFT_OF_CENTER 0x8E
  294. #define UAC3_CH_BACK_RIGHT_OF_CENTER 0x8F
  295. #define UAC3_CH_BACK_WIDE_LEFT 0x90
  296. #define UAC3_CH_BACK_WIDE_RIGHT 0x91
  297. #define UAC3_CH_TOP_CENTER 0x92
  298. #define UAC3_CH_TOP_FRONT_LEFT 0x93
  299. #define UAC3_CH_TOP_FRONT_RIGHT 0x94
  300. #define UAC3_CH_TOP_FRONT_CENTER 0x95
  301. #define UAC3_CH_TOP_FRONT_LOC 0x96
  302. #define UAC3_CH_TOP_FRONT_ROC 0x97
  303. #define UAC3_CH_TOP_FRONT_WIDE_LEFT 0x98
  304. #define UAC3_CH_TOP_FRONT_WIDE_RIGHT 0x99
  305. #define UAC3_CH_TOP_SIDE_LEFT 0x9A
  306. #define UAC3_CH_TOP_SIDE_RIGHT 0x9B
  307. #define UAC3_CH_TOP_SURR_ARRAY_LEFT 0x9C
  308. #define UAC3_CH_TOP_SURR_ARRAY_RIGHT 0x9D
  309. #define UAC3_CH_TOP_BACK_LEFT 0x9E
  310. #define UAC3_CH_TOP_BACK_RIGHT 0x9F
  311. #define UAC3_CH_TOP_BACK_CENTER 0xA0
  312. #define UAC3_CH_TOP_BACK_LOC 0xA1
  313. #define UAC3_CH_TOP_BACK_ROC 0xA2
  314. #define UAC3_CH_TOP_BACK_WIDE_LEFT 0xA3
  315. #define UAC3_CH_TOP_BACK_WIDE_RIGHT 0xA4
  316. #define UAC3_CH_BOTTOM_CENTER 0xA5
  317. #define UAC3_CH_BOTTOM_FRONT_LEFT 0xA6
  318. #define UAC3_CH_BOTTOM_FRONT_RIGHT 0xA7
  319. #define UAC3_CH_BOTTOM_FRONT_CENTER 0xA8
  320. #define UAC3_CH_BOTTOM_FRONT_LOC 0xA9
  321. #define UAC3_CH_BOTTOM_FRONT_ROC 0xAA
  322. #define UAC3_CH_BOTTOM_FRONT_WIDE_LEFT 0xAB
  323. #define UAC3_CH_BOTTOM_FRONT_WIDE_RIGHT 0xAC
  324. #define UAC3_CH_BOTTOM_SIDE_LEFT 0xAD
  325. #define UAC3_CH_BOTTOM_SIDE_RIGHT 0xAE
  326. #define UAC3_CH_BOTTOM_SURR_ARRAY_LEFT 0xAF
  327. #define UAC3_CH_BOTTOM_SURR_ARRAY_RIGHT 0xB0
  328. #define UAC3_CH_BOTTOM_BACK_LEFT 0xB1
  329. #define UAC3_CH_BOTTOM_BACK_RIGHT 0xB2
  330. #define UAC3_CH_BOTTOM_BACK_CENTER 0xB3
  331. #define UAC3_CH_BOTTOM_BACK_LOC 0xB4
  332. #define UAC3_CH_BOTTOM_BACK_ROC 0xB5
  333. #define UAC3_CH_BOTTOM_BACK_WIDE_LEFT 0xB6
  334. #define UAC3_CH_BOTTOM_BACK_WIDE_RIGHT 0xB7
  335. #define UAC3_CH_LOW_FREQUENCY_EFFECTS 0xB8
  336. #define UAC3_CH_LFE_LEFT 0xB9
  337. #define UAC3_CH_LFE_RIGHT 0xBA
  338. #define UAC3_CH_HEADPHONE_LEFT 0xBB
  339. #define UAC3_CH_HEADPHONE_RIGHT 0xBC
  340. /* A.15 AUDIO CLASS-SPECIFIC AC INTERFACE DESCRIPTOR SUBTYPES */
  341. /* see audio.h for the rest, which is identical to v1 */
  342. #define UAC3_EXTENDED_TERMINAL 0x04
  343. #define UAC3_MIXER_UNIT 0x05
  344. #define UAC3_SELECTOR_UNIT 0x06
  345. #define UAC3_FEATURE_UNIT 0x07
  346. #define UAC3_EFFECT_UNIT 0x08
  347. #define UAC3_PROCESSING_UNIT 0x09
  348. #define UAC3_EXTENSION_UNIT 0x0a
  349. #define UAC3_CLOCK_SOURCE 0x0b
  350. #define UAC3_CLOCK_SELECTOR 0x0c
  351. #define UAC3_CLOCK_MULTIPLIER 0x0d
  352. #define UAC3_SAMPLE_RATE_CONVERTER 0x0e
  353. #define UAC3_CONNECTORS 0x0f
  354. #define UAC3_POWER_DOMAIN 0x10
  355. /* A.20 PROCESSING UNIT PROCESS TYPES */
  356. #define UAC3_PROCESS_UNDEFINED 0x00
  357. #define UAC3_PROCESS_UP_DOWNMIX 0x01
  358. #define UAC3_PROCESS_STEREO_EXTENDER 0x02
  359. #define UAC3_PROCESS_MULTI_FUNCTION 0x03
  360. /* A.22 AUDIO CLASS-SPECIFIC REQUEST CODES */
  361. /* see audio-v2.h for the rest, which is identical to v2 */
  362. #define UAC3_CS_REQ_INTEN 0x04
  363. #define UAC3_CS_REQ_STRING 0x05
  364. #define UAC3_CS_REQ_HIGH_CAPABILITY_DESCRIPTOR 0x06
  365. /* A.23.1 AUDIOCONTROL INTERFACE CONTROL SELECTORS */
  366. #define UAC3_AC_CONTROL_UNDEFINED 0x00
  367. #define UAC3_AC_ACTIVE_INTERFACE_CONTROL 0x01
  368. #define UAC3_AC_POWER_DOMAIN_CONTROL 0x02
  369. /* A.23.5 TERMINAL CONTROL SELECTORS */
  370. #define UAC3_TE_UNDEFINED 0x00
  371. #define UAC3_TE_INSERTION 0x01
  372. #define UAC3_TE_OVERLOAD 0x02
  373. #define UAC3_TE_UNDERFLOW 0x03
  374. #define UAC3_TE_OVERFLOW 0x04
  375. #define UAC3_TE_LATENCY 0x05
  376. /* A.23.10 PROCESSING UNITS CONTROL SELECTROS */
  377. /* Up/Down Mixer */
  378. #define UAC3_UD_MODE_SELECT 0x01
  379. /* Stereo Extender */
  380. #define UAC3_EXT_WIDTH_CONTROL 0x01
  381. /* BADD predefined Unit/Terminal values */
  382. #define UAC3_BADD_IT_ID1 1 /* Input Terminal ID1: bTerminalID = 1 */
  383. #define UAC3_BADD_FU_ID2 2 /* Feature Unit ID2: bUnitID = 2 */
  384. #define UAC3_BADD_OT_ID3 3 /* Output Terminal ID3: bTerminalID = 3 */
  385. #define UAC3_BADD_IT_ID4 4 /* Input Terminal ID4: bTerminalID = 4 */
  386. #define UAC3_BADD_FU_ID5 5 /* Feature Unit ID5: bUnitID = 5 */
  387. #define UAC3_BADD_OT_ID6 6 /* Output Terminal ID6: bTerminalID = 6 */
  388. #define UAC3_BADD_FU_ID7 7 /* Feature Unit ID7: bUnitID = 7 */
  389. #define UAC3_BADD_MU_ID8 8 /* Mixer Unit ID8: bUnitID = 8 */
  390. #define UAC3_BADD_CS_ID9 9 /* Clock Source Entity ID9: bClockID = 9 */
  391. #define UAC3_BADD_PD_ID10 10 /* Power Domain ID10: bPowerDomainID = 10 */
  392. #define UAC3_BADD_PD_ID11 11 /* Power Domain ID11: bPowerDomainID = 11 */
  393. /* BADD wMaxPacketSize of AS endpoints */
  394. #define UAC3_BADD_EP_MAXPSIZE_SYNC_MONO_16 0x0060
  395. #define UAC3_BADD_EP_MAXPSIZE_ASYNC_MONO_16 0x0062
  396. #define UAC3_BADD_EP_MAXPSIZE_SYNC_MONO_24 0x0090
  397. #define UAC3_BADD_EP_MAXPSIZE_ASYNC_MONO_24 0x0093
  398. #define UAC3_BADD_EP_MAXPSIZE_SYNC_STEREO_16 0x00C0
  399. #define UAC3_BADD_EP_MAXPSIZE_ASYNC_STEREO_16 0x00C4
  400. #define UAC3_BADD_EP_MAXPSIZE_SYNC_STEREO_24 0x0120
  401. #define UAC3_BADD_EP_MAXPSIZE_ASYNC_STEREO_24 0x0126
  402. /* BADD sample rate is always fixed to 48kHz */
  403. #define UAC3_BADD_SAMPLING_RATE 48000
  404. /* BADD power domains recovery times in 50us increments */
  405. #define UAC3_BADD_PD_RECOVER_D1D0 0x0258 /* 30ms */
  406. #define UAC3_BADD_PD_RECOVER_D2D0 0x1770 /* 300ms */
  407. #endif /* __LINUX_USB_AUDIO_V3_H */