Kconfig 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. # Kconfig - USB Audio Source configuration options
  2. #
  3. # Copyright (c) 2018 Actions Corp.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0
  6. #
  7. config USB_AUDIO_CLASS
  8. bool "USB Audio Device Class Driver"
  9. help
  10. USB Audio Device Class driver.
  11. if USB_AUDIO_CLASS
  12. config USB_AUDIO_SINK
  13. bool
  14. prompt "USB audio sink device support"
  15. default n
  16. depends on USB_AUDIO_CLASS
  17. help
  18. Enables USB audio sink device driver.
  19. if USB_AUDIO_SINK
  20. config USB_AUDIO_SINK_OUT_EP_ADDR
  21. hex
  22. prompt "USB audio sink out endpoint address"
  23. default 0x01
  24. range 0x01 0x0f
  25. help
  26. USB audio sink out endpoint address.
  27. config USB_AUDIO_SINK_OUT_EP_FS_INTERVAL
  28. int
  29. prompt "USB audio sink out endpoint interval(Full-Speed Mode)"
  30. default 1
  31. help
  32. USB audio sink out endpoint interval.
  33. config USB_AUDIO_SINK_OUT_EP_HS_INTERVAL
  34. int
  35. prompt "USB audio sink out endpoint interval(High-Speed Mode)"
  36. default 4
  37. help
  38. USB audio sink out endpoint interval.
  39. config USB_AUDIO_SINK_DOWNLOAD_CHANNEL_NUM
  40. int
  41. prompt "USB audio sink channel number"
  42. default 1
  43. help
  44. USB audio sink channel number.
  45. config USB_AUDIO_SINK_RESOLUTION
  46. int
  47. prompt "USB Audio Source resolution (unit: bit)"
  48. default 16
  49. help
  50. USB audio sink resolution (unit: bit).
  51. config USB_AUDIO_SINK_BCONTROLSIZE
  52. int
  53. prompt "The byte size of the bmacontrols(n)"
  54. default 1
  55. range 1 2
  56. help
  57. The byte size of the bmacontrols(n), maximum value is 2.
  58. config USB_AUDIO_SINK_MAINCH_CONFIG
  59. hex
  60. prompt "USB audio sink main channel configuration"
  61. default 0x03
  62. range 0x0000 0x03ff
  63. help
  64. USB audio source main channel config.
  65. config USB_AUDIO_SINK_LOGICALCH01_CONFIG
  66. hex
  67. prompt "USB audio logical channel_01 configuration"
  68. default 0x02
  69. range 0x0000 0x03ff
  70. help
  71. USB audio logical channel_01 configuration.
  72. config USB_AUDIO_SINK_LOGICALCH02_CONFIG
  73. hex
  74. prompt "USB audio logical channel_02 configuration"
  75. default 0x02
  76. range 0x0000 0x03ff
  77. help
  78. USB audio logical channel_02 configuration.
  79. config USB_AUDIO_SINK_SAMPLE_FREQ_TYPE
  80. int
  81. prompt "USB audio sink sampling frequency type"
  82. default 1
  83. range 1 4
  84. help
  85. USB audio sink sampling frequency type.
  86. config USB_AUDIO_SINK_SAMPLE_RATE
  87. int
  88. prompt "USB audio sink sampling rate(unit: Hz)"
  89. default 48000
  90. help
  91. USB audio sink sampling rate(unit: Hz).
  92. config USB_AUDIO_SINK_MANUFACTURER
  93. string
  94. prompt "USB Audio sink device manufacturer"
  95. default "Actions"
  96. help
  97. USB audio sink device manufacturer string, can be configured by vendor.
  98. config USB_AUDIO_SINK_PRODUCT
  99. string
  100. prompt "USB Audio sink device product"
  101. default "usb-sound-card"
  102. help
  103. USB audio sink device product string, can be configured by vendor.
  104. config USB_AUDIO_SINK_SN
  105. string
  106. prompt "USB Audio sink device serial number"
  107. default "0123456789AB"
  108. help
  109. USB audio sink device serial-number string, can be configured by vendor.
  110. config USB_AUDIO_SINK_SN_NVRAM
  111. string
  112. prompt "get serial number from NVRAM"
  113. default "BT_MAC"
  114. help
  115. get USB audio sink serial number string from NVRAM, can be configured by vendor.
  116. config USB_AUDIO_SINK_SUPPORT_FEATURE_UNIT
  117. bool
  118. prompt "USB audio sink support feature unit"
  119. default n
  120. help
  121. USB audio sink support feature unit.
  122. config USB_AUDIO_SINK_VID
  123. hex
  124. prompt "USB audio sink device vendor ID"
  125. default 0x10d6
  126. help
  127. USB audio sink device vendor ID, can be configured by vendor.
  128. config USB_AUDIO_SINK_PID
  129. hex
  130. prompt "USB audio sink device product ID"
  131. default 0xb016
  132. help
  133. USB audio sink device product ID, can be configured by vendor.
  134. config SYS_LOG_USB_SINK_LEVEL
  135. int "USB sink device class driver log level"
  136. depends on LOG
  137. default 0
  138. help
  139. Sets log level for USB sink device class driver
  140. Levels are:
  141. - 0 OFF, do not write
  142. - 1 ERROR, only write SYS_LOG_ERR
  143. - 2 WARNING, write SYS_LOG_WRN in addition to previous level
  144. - 3 INFO, write SYS_LOG_INF in addition to previous levels
  145. - 4 DEBUG, write SYS_LOG_DBG in addition to previous levels
  146. endif #USB_AUDIO_SINK
  147. config USB_AUDIO_SOURCE
  148. bool
  149. prompt "USB audio source device support"
  150. default n
  151. depends on USB_AUDIO_CLASS
  152. help
  153. Enables USB audio aource device driver.
  154. if USB_AUDIO_SOURCE
  155. config USB_AUDIO_SOURCE_IN_EP_ADDR
  156. hex
  157. prompt "USB audio source In Endpoint address"
  158. default 0x81
  159. range 0x81 0x8f
  160. help
  161. USB audio source in endpoint address.
  162. config USB_AUDIO_SOURCE_IN_EP_FS_INTERVAL
  163. int
  164. prompt "USB audio source in endpoint interval(Full-Speed Mode)"
  165. default 1
  166. help
  167. USB audio sink out endpoint interval.
  168. config USB_AUDIO_SOURCE_IN_EP_HS_INTERVAL
  169. int
  170. prompt "USB audio source in endpoint interval(High-Speed Mode)"
  171. default 4
  172. help
  173. USB audio sink out endpoint interval.
  174. config USB_AUDIO_SOURCE_UPLOAD_CHANNEL_NUM
  175. int
  176. prompt "USB audio source channel numbers"
  177. default 1
  178. help
  179. USB audio source channel numbers.
  180. config USB_AUDIO_SOURCE_CHANNEL_CONFIG
  181. hex
  182. prompt "USB audio source channel config"
  183. default 0x0
  184. range 0x0 0xffff
  185. help
  186. USB audio source channel config.
  187. config USB_AUDIO_BCONTROLSIZE
  188. int
  189. prompt "USB audio source subframesize"
  190. default 2
  191. range 1 2
  192. help
  193. USB audio source subframesize (unit: byte), the maximum value is 2.
  194. config USB_AUDIO_SOURCE_RESOLUTION
  195. int
  196. prompt "USB Audio Source resolution (unit: bit)"
  197. default 16
  198. help
  199. USB audio source resolution (unit: bit).
  200. config USB_AUDIO_SOURCE_SAMPLE_RATE
  201. int
  202. prompt "USB audio source sampling rate(unit: Hz)"
  203. default 16000
  204. help
  205. USB audio source sampling rate(unit: Hz).
  206. config USB_AUDIO_SOURCE_MANUFACTURER
  207. string
  208. prompt "USB Audio source device manufacturer"
  209. default "Actions"
  210. help
  211. USB audio source device manufacturer string, can be configured by vendor.
  212. config USB_AUDIO_SOURCE_PRODUCT
  213. string
  214. prompt "USB Audio source device product"
  215. default "usb-microphone"
  216. help
  217. USB audio source device product string, can be configured by vendor.
  218. config USB_AUDIO_SOURCE_SN
  219. string
  220. prompt "USB Audio source device serial number"
  221. default "0123456789AB"
  222. help
  223. USB audio source device serial-number string, can be configured by vendor.
  224. config USB_AUDIO_SOURCE_SN_NVRAM
  225. string
  226. prompt "get serial number from NVRAM"
  227. default "BT_MAC"
  228. help
  229. get USB audio source serial number string from NVRAM, can be configured by vendor.
  230. config USB_AUDIO_SOURCE_VID
  231. hex
  232. prompt "USB audio source device vendor ID"
  233. default 0x10d6
  234. help
  235. USB audio source device vendor ID, can be configured by vendor.
  236. config USB_AUDIO_SOURCE_PID
  237. hex
  238. prompt "USB audio source device product ID"
  239. default 0xb017
  240. help
  241. USB audio source device product ID, can be configured by vendor.
  242. config SYS_LOG_USB_SOURCE_LEVEL
  243. int "USB source device class driver log level"
  244. depends on LOG
  245. default 0
  246. help
  247. Sets log level for USB source device class driver.
  248. Levels are:
  249. - 0 OFF, do not write
  250. - 1 ERROR, only write SYS_LOG_ERR
  251. - 2 WARNING, write SYS_LOG_WRN in addition to previous level
  252. - 3 INFO, write SYS_LOG_INF in addition to previous levels
  253. - 4 DEBUG, write SYS_LOG_DBG in addition to previous levels
  254. endif #USB_AUDIO_SOURCE
  255. config USB_AUDIO_SOURCESINK
  256. bool
  257. prompt "USB audio source && sink device support"
  258. default n
  259. depends on USB_AUDIO_CLASS
  260. help
  261. Enables USB audio source && sink device support.
  262. if USB_AUDIO_SOURCESINK
  263. config USB_AUDIO_DEVICE_SOURCE_IN_EP_ADDR
  264. hex
  265. prompt "USB audio source in endpoint address"
  266. default 0x81
  267. range 0x81 0x8f
  268. help
  269. USB audio source in endpoint address.
  270. config USB_AUDIO_DEVICE_SINK_OUT_EP_ADDR
  271. hex
  272. prompt "USB Audio sink out endpoint address"
  273. default 0x01
  274. range 0x01 0x0f
  275. help
  276. USB Audio sink out endpoint address.
  277. config USB_AUDIO_DEVICE_SOURCE_SAMPLE_FREQ_TYPE
  278. int
  279. prompt "USB audio source sampling frequency type"
  280. default 1
  281. range 1 4
  282. help
  283. USB audio source sampling frequency type.
  284. config USB_AUDIO_SOURCE_SAM_FREQ_UPLOAD
  285. int
  286. prompt "USB audio source upload samplings frequency (unit: Hz)"
  287. default 48000
  288. help
  289. USB Audio source sampling frequency (unit: Hz).
  290. config USB_AUDIO_DEVICE_SINK_SAMPLE_FREQ_TYPE
  291. int
  292. prompt "USB audio sink sampling frequency type"
  293. default 1
  294. range 1 4
  295. help
  296. USB audio sink sampling frequency type.
  297. config USB_AUDIO_DEVICE_SINK_SAM_FREQ_DOWNLOAD
  298. int
  299. prompt "USB audio sink (1st) download samplings frequency (unit: Hz)"
  300. default 48000
  301. help
  302. USB audio sink sampling frequency (unit: Hz).
  303. config USB_AUDIO_UPLOAD_CHANNEL_NUM
  304. int
  305. prompt "USB audio source upload channel numbers"
  306. default 1
  307. help
  308. USB audio source upload channel numbers.
  309. config USB_AUDIO_DOWNLOAD_CHANNEL_NUM
  310. int
  311. prompt "USB audio sink download channel numbers"
  312. default 2
  313. help
  314. USB audio sink download channel numbers.
  315. config USB_AUDIO_DEVICE_BCONTROLSIZE
  316. int
  317. prompt "The byte size of the bmacontrols(n)"
  318. default 1
  319. range 1 2
  320. help
  321. The byte size of the bmacontrols(n), maximum value is 2.
  322. config USB_AUDIO_DEVICE_SINK_MAINCH_CONFIG
  323. hex
  324. prompt "USB audio sink main channel configuration"
  325. default 0x03
  326. range 0x0000 0x03ff
  327. help
  328. USB audio sink main channel(bmaControls(0)) config.
  329. config USB_AUDIO_DEVICE_SINK_LOGICALCH01_CONFIG
  330. hex
  331. prompt "USB audio logical channel_01 configuration"
  332. default 0x02
  333. range 0x0000 0x03ff
  334. help
  335. USB audio sink logical channel_01(bmaControls(1)) configuration.
  336. config USB_AUDIO_DEVICE_SINK_LOGICALCH02_CONFIG
  337. hex
  338. prompt "USB audio logical channel_02 configuration"
  339. default 0x02
  340. range 0x0000 0x03ff
  341. help
  342. USB audio sink logical channel_02(bmaControls(2)) configuration.
  343. config USB_AUDIO_RESOLUTION
  344. int
  345. prompt "Size in bytes of Sampling bits of per sample"
  346. default 16
  347. help
  348. Size in bytes of Sampling bits of per sample.
  349. config SUPPORT_HD_AUDIO_PLAY
  350. bool
  351. prompt "Support HD audio playback"
  352. default n
  353. help
  354. Support HD audio playback.
  355. if SUPPORT_HD_AUDIO_PLAY
  356. config USB_AUDIO_SINK_HD_RESOLUTION
  357. int
  358. prompt "Size in bytes of Sampling bits of per sample"
  359. default 24
  360. help
  361. Size in bytes of Sampling bits of per sample.
  362. config USB_AUDIO_SINK_HD_SAM_FREQ_DOWNLOAD
  363. int
  364. prompt "USB Audio Sink HD-Format Download Samplings Frequency (unit: Hz)"
  365. default 96000
  366. help
  367. HD-Format Download Samplings Frequency (unit: Hz).
  368. endif #SUPPORT_HD_AUDIO_PLAY
  369. config SUPPORT_USB_AUDIO_SOURCE
  370. bool
  371. prompt "Support usb audio source device(Microphone)"
  372. default n
  373. help
  374. Support usb audio source device(Microphone).
  375. config USB_AUDIO_DEVICE_IF_NUM
  376. int
  377. prompt "Interface number of usb composite device"
  378. default 0
  379. help
  380. Interface number of usb composite device.
  381. config USB_AUDIO_CONTROL_UNIT
  382. bool
  383. prompt "Implement feature unit"
  384. default n
  385. help
  386. Define usb audio control unit.
  387. config USB_AUDIO_SOURCESINK_MANUFACTURER
  388. string
  389. prompt "USB audio(composite device) manufacturer name"
  390. default "Actions"
  391. help
  392. USB audio device manufacturer string. can be configured by vendor.
  393. config USB_AUDIO_SOURCESINK_PRODUCT
  394. string
  395. prompt "USB audio sourcesink product name"
  396. default "USB Audio & SOURCESINK"
  397. help
  398. USB audio device product string. can be configured by vendor.
  399. config USB_AUDIO_SOURCESINK_SN
  400. string
  401. prompt "USB audio sourcesink serial number"
  402. default "0123456789AB"
  403. help
  404. USB audio device serial number string. can be configured by vendor.
  405. config USB_AUDIO_SOURCESINK_SN_NVRAM
  406. string
  407. prompt "get serial number from NVRAM"
  408. default "BT_MAC"
  409. help
  410. get audio device serial number string from NVRAM, can be configured by vendor.
  411. config USB_AUDIO_SOURCESINK_VID
  412. hex
  413. prompt "USB audio device vendor ID"
  414. default 0x10d6
  415. help
  416. USB audio device vendor ID. MUST be configured by vendor.
  417. config USB_AUDIO_SOURCESINK_PID
  418. hex
  419. prompt "USB audio device product ID"
  420. default 0xb00f
  421. help
  422. USB audio device product ID. MUST be configured by vendor.
  423. config SYS_LOG_USB_SOURCESINK_LEVEL
  424. int "USB sourcesink device class driver log level"
  425. depends on LOG
  426. default 0
  427. help
  428. Sets log level for USB source device class driver
  429. Levels are:
  430. - 0 OFF, do not write
  431. - 1 ERROR, only write SYS_LOG_ERR
  432. - 2 WARNING, write SYS_LOG_WRN in addition to previous level
  433. - 3 INFO, write SYS_LOG_INF in addition to previous levels
  434. - 4 DEBUG, write SYS_LOG_DBG in addition to previous levels
  435. endif #USB_AUDIO_SOURCESINK
  436. endif #USB_AUDIO_CLASS