Kconfig 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig SND_SOC_SOF_TOPLEVEL
  3. bool "Sound Open Firmware (SOF) platforms"
  4. help
  5. This adds support for Sound Open Firmware (SOF). SOF is free and
  6. generic open source audio DSP firmware for multiple devices.
  7. Say Y if you have such a device that is supported by SOF.
  8. If unsure select "N".
  9. if SND_SOC_SOF_TOPLEVEL
  10. config SND_SOC_SOF_PCI_DEV
  11. tristate
  12. config SND_SOC_SOF_PCI
  13. tristate "SOF PCI enumeration support"
  14. depends on PCI
  15. help
  16. This adds support for PCI enumeration. This option is
  17. required to enable Intel Skylake+ devices.
  18. For backwards-compatibility with previous configurations the selection will
  19. be used as default for platform-specific drivers.
  20. Say Y if you need this option.
  21. If unsure select "N".
  22. config SND_SOC_SOF_ACPI
  23. tristate "SOF ACPI enumeration support"
  24. depends on ACPI || COMPILE_TEST
  25. help
  26. This adds support for ACPI enumeration. This option is required
  27. to enable Intel Broadwell/Baytrail/Cherrytrail devices.
  28. For backwards-compatibility with previous configurations the selection will
  29. be used as default for platform-specific drivers.
  30. Say Y if you need this option.
  31. If unsure select "N".
  32. config SND_SOC_SOF_ACPI_DEV
  33. tristate
  34. config SND_SOC_SOF_OF
  35. tristate "SOF OF enumeration support"
  36. depends on OF
  37. help
  38. This adds support for Device Tree enumeration. This option is
  39. required to enable i.MX8 or Mediatek devices.
  40. Say Y if you need this option. If unsure select "N".
  41. config SND_SOC_SOF_OF_DEV
  42. tristate
  43. config SND_SOC_SOF_COMPRESS
  44. bool
  45. select SND_SOC_COMPRESS
  46. config SND_SOC_SOF_DEBUG_PROBES
  47. tristate
  48. select SND_SOC_SOF_CLIENT
  49. select SND_SOC_COMPRESS
  50. help
  51. This option enables the data probing feature that can be used to
  52. gather data directly from specific points of the audio pipeline.
  53. This option is not user-selectable but automagically handled by
  54. 'select' statements at a higher level.
  55. config SND_SOC_SOF_CLIENT
  56. tristate
  57. select AUXILIARY_BUS
  58. help
  59. This option is not user-selectable but automagically handled by
  60. 'select' statements at a higher level.
  61. config SND_SOC_SOF_DEVELOPER_SUPPORT
  62. bool "SOF developer options support"
  63. depends on EXPERT && SND_SOC_SOF
  64. help
  65. This option unlocks SOF developer options for debug/performance/
  66. code hardening.
  67. Distributions should not select this option, only SOF development
  68. teams should select it.
  69. Say Y if you are involved in SOF development and need this option.
  70. If not, select N.
  71. if SND_SOC_SOF_DEVELOPER_SUPPORT
  72. config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE
  73. bool "SOF force probe workqueue"
  74. select SND_SOC_SOF_PROBE_WORK_QUEUE
  75. help
  76. This option forces the use of a probe workqueue, which is only used
  77. when HDaudio is enabled due to module dependencies. Forcing this
  78. option is intended for debug only, but this should not add any
  79. functional issues in nominal cases.
  80. Say Y if you are involved in SOF development and need this option.
  81. If not, select N.
  82. config SND_SOC_SOF_NOCODEC
  83. tristate
  84. config SND_SOC_SOF_NOCODEC_SUPPORT
  85. bool "SOF nocodec static mode support"
  86. help
  87. This adds support for a dummy/nocodec machine driver fallback
  88. option if no known codec is detected. This is typically only
  89. enabled for developers or devices where the sound card is
  90. controlled externally.
  91. This option is mutually exclusive at build time with the Intel HDAudio support.
  92. Selecting it may have negative impacts and prevent e.g. microphone
  93. functionality from being enabled on Intel CoffeeLake and later
  94. platforms.
  95. Distributions should not select this option!
  96. Say Y if you need this nocodec fallback option.
  97. If unsure select "N".
  98. config SND_SOC_SOF_STRICT_ABI_CHECKS
  99. bool "SOF strict ABI checks"
  100. help
  101. This option enables strict ABI checks for firmware and topology
  102. files.
  103. When these files are more recent than the kernel, the kernel
  104. will handle the functionality it supports and may report errors
  105. during topology creation or run-time usage if new functionality
  106. is invoked.
  107. This option will stop topology creation and firmware load upfront.
  108. It is intended for SOF CI/releases and not for users or distros.
  109. Say Y if you want strict ABI checks for an SOF release.
  110. If you are not involved in SOF releases and CI development,
  111. select "N".
  112. config SND_SOC_SOF_ALLOW_FALLBACK_TO_NEWER_IPC_VERSION
  113. bool "SOF allow fallback to newer IPC version"
  114. help
  115. This option will allow the kernel to try to 'fallback' to a newer IPC
  116. version if there are missing firmware files to satisfy the default IPC
  117. version.
  118. IPC version fallback to older versions is not affected by this option,
  119. it is always available.
  120. Say Y if you are involved in SOF development and need this option.
  121. If not, select N.
  122. config SND_SOC_SOF_DEBUG
  123. bool "SOF debugging features"
  124. help
  125. This option can be used to enable or disable individual SOF firmware
  126. and driver debugging options.
  127. Say Y if you are debugging SOF FW or drivers.
  128. If unsure select "N".
  129. if SND_SOC_SOF_DEBUG
  130. config SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT
  131. bool "SOF nocodec debug mode support"
  132. depends on !SND_SOC_SOF_NOCODEC_SUPPORT
  133. help
  134. This adds support for a dummy/nocodec machine driver fallback
  135. option.
  136. Unlike the SND_SOC_SOF_NOCODEC_SUPPORT, this option is NOT
  137. mutually exclusive at build with the Intel HDAudio support. The
  138. selection will be done depending on command line or modprobe.d settings
  139. Distributions should not select this option!
  140. Say Y if you need this nocodec debug fallback option.
  141. If unsure select "N".
  142. config SND_SOC_SOF_FORCE_NOCODEC_MODE
  143. bool "SOF force nocodec Mode"
  144. depends on SND_SOC_SOF_NOCODEC_SUPPORT
  145. help
  146. This forces SOF to use dummy/nocodec as machine driver, even
  147. though there is a codec detected on the real platform. This is
  148. typically only enabled for developers for debug purposes, before
  149. codec/machine driver is ready, or to exclude the impact of those
  150. drivers.
  151. Say Y if you need this force nocodec mode option.
  152. If unsure select "N".
  153. config SND_SOC_SOF_DEBUG_XRUN_STOP
  154. bool "SOF stop on XRUN"
  155. help
  156. This option forces PCMs to stop on any XRUN event. This is useful to
  157. preserve any trace data and pipeline status prior to the XRUN.
  158. Say Y if you are debugging SOF FW pipeline XRUNs.
  159. If unsure select "N".
  160. config SND_SOC_SOF_DEBUG_VERBOSE_IPC
  161. bool "SOF verbose IPC logs"
  162. help
  163. This option enables more verbose IPC logs, with command types in
  164. human-readable form instead of just 32-bit hex dumps. This is useful
  165. if you are trying to debug IPC with the DSP firmware.
  166. If unsure select "N".
  167. config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION
  168. bool "SOF force to use IPC for position update on SKL+"
  169. help
  170. This option forces to handle stream position update IPCs and run PCM
  171. elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that
  172. with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM.
  173. On platforms (e.g. Intel SKL-) where position update IPC is the only
  174. one choice, this setting won't impact anything.
  175. If you are trying to debug pointer update with position IPCs or where
  176. DPIB/posbuf is not ready, select "Y".
  177. If unsure select "N".
  178. config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE
  179. bool "SOF enable debugfs caching"
  180. help
  181. This option enables caching of debugfs
  182. memory -> DSP resource (memory, register, etc)
  183. before the audio DSP is suspended. This will increase the suspend
  184. latency and therefore should be used for debug purposes only.
  185. Say Y if you want to enable caching the memory windows.
  186. If unsure, select "N".
  187. config SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE
  188. bool "SOF enable firmware trace"
  189. help
  190. The firmware trace can be enabled either at build-time with
  191. this option, or dynamically by setting flags in the SOF core
  192. module parameter (similar to dynamic debug).
  193. If unsure, select "N".
  194. config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
  195. tristate "SOF enable IPC flood test"
  196. depends on SND_SOC_SOF
  197. select SND_SOC_SOF_CLIENT
  198. help
  199. This option enables a separate client device for IPC flood test
  200. which can be used to flood the DSP with test IPCs and gather stats
  201. about response times.
  202. Say Y if you want to enable IPC flood test.
  203. If unsure, select "N".
  204. config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM
  205. int "Number of IPC flood test clients"
  206. range 1 32
  207. default 2
  208. depends on SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
  209. help
  210. Select the number of IPC flood test clients to be created.
  211. config SND_SOC_SOF_DEBUG_IPC_MSG_INJECTOR
  212. tristate "SOF enable IPC message injector"
  213. depends on SND_SOC_SOF
  214. select SND_SOC_SOF_CLIENT
  215. help
  216. This option enables the IPC message injector which can be used to send
  217. crafted IPC messages to the DSP to test its robustness.
  218. Say Y if you want to enable the IPC message injector.
  219. If unsure, select "N".
  220. config SND_SOC_SOF_DEBUG_IPC_KERNEL_INJECTOR
  221. tristate "SOF enable IPC kernel injector"
  222. depends on SND_SOC_SOF
  223. select SND_SOC_SOF_CLIENT
  224. help
  225. This option enables the IPC kernel injector which can be used to send
  226. crafted IPC messages to the kernel to test its robustness against
  227. DSP messages.
  228. Say Y if you want to enable the IPC kernel injector.
  229. If unsure, select "N".
  230. config SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT
  231. bool "SOF retain DSP context on any FW exceptions"
  232. help
  233. This option keeps the DSP in D0 state so that firmware debug
  234. information can be retained and dumped to userspace.
  235. Say Y if you want to retain DSP context for FW exceptions.
  236. If unsure, select "N".
  237. endif ## SND_SOC_SOF_DEBUG
  238. endif ## SND_SOC_SOF_DEVELOPER_SUPPORT
  239. config SND_SOC_SOF
  240. tristate
  241. select SND_SOC_TOPOLOGY
  242. select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_SUPPORT
  243. select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT
  244. help
  245. This option is not user-selectable but automagically handled by
  246. 'select' statements at a higher level.
  247. The selection is made at the top level and does not exactly follow
  248. module dependencies but since the module or built-in type is decided
  249. at the top level it doesn't matter.
  250. config SND_SOC_SOF_PROBE_WORK_QUEUE
  251. bool
  252. help
  253. This option is not user-selectable but automagically handled by
  254. 'select' statements at a higher level.
  255. When selected, the probe is handled in two steps, for example to
  256. avoid lockdeps if request_module is used in the probe.
  257. # Supported IPC versions
  258. config SND_SOC_SOF_IPC3
  259. bool
  260. config SND_SOC_SOF_IPC4
  261. bool
  262. source "sound/soc/sof/amd/Kconfig"
  263. source "sound/soc/sof/imx/Kconfig"
  264. source "sound/soc/sof/intel/Kconfig"
  265. source "sound/soc/sof/mediatek/Kconfig"
  266. source "sound/soc/sof/xtensa/Kconfig"
  267. endif