audio_modules.bzl 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. load(":module_mgr.bzl", "create_module_registry")
  2. DSP_PATH = "dsp"
  3. IPC_PATH = "ipc"
  4. SOC_PATH = "soc"
  5. ASOC_PATH = "asoc"
  6. ASOC_CODECS_PATH = ASOC_PATH + "/codecs"
  7. ASOC_CODECS_LPASS_CDC_PATH = ASOC_CODECS_PATH + "/lpass-cdc"
  8. audio_modules = create_module_registry([":audio_headers"])
  9. # ------------------------------------ AUDIO MODULE DEFINITIONS ---------------------------------
  10. # >>>> DSP MODULES <<<<
  11. audio_modules.register(
  12. name = "q6_dlkm",
  13. path = DSP_PATH,
  14. conditional_srcs = {
  15. "CONFIG_SND_SOC_MSM_QDSP6V2_INTF": [
  16. "msm-audio-event-notify.c",
  17. "q6_init.c",
  18. ],
  19. "CONFIG_SND_SOC_MSM_QDSP6V2_VM": [
  20. "msm-audio-event-notify.c",
  21. "msm_audio_ion_vm.c",
  22. "q6_init.c",
  23. ],
  24. "CONFIG_MSM_AVTIMER": [
  25. "avtimer.c"
  26. ],
  27. "CONFIG_XT_LOGGING": [
  28. "sp_params.c"
  29. ]
  30. }
  31. )
  32. audio_modules.register(
  33. name = "spf_core_dlkm",
  34. path = DSP_PATH,
  35. config_option = "CONFIG_SPF_CORE",
  36. srcs = ["spf-core.c"],
  37. conditional_srcs = {
  38. "CONFIG_DIGITAL_CDC_RSC_MGR": [
  39. "digital-cdc-rsc-mgr.c"
  40. ]
  41. }
  42. )
  43. audio_modules.register(
  44. name = "audpkt_ion_dlkm",
  45. path = DSP_PATH,
  46. config_option = "CONFIG_AUDIO_PKT_ION",
  47. srcs = ["msm_audio_ion.c"]
  48. )
  49. audio_modules.register(
  50. name = "q6_notifier_dlkm",
  51. path = DSP_PATH,
  52. config_option = "CONFIG_MSM_QDSP6_NOTIFIER",
  53. srcs = [
  54. "audio_notifier.c",
  55. "audio_ssr.c"
  56. ],
  57. )
  58. audio_modules.register(
  59. name = "adsp_loader_dlkm",
  60. path = DSP_PATH,
  61. config_option = "CONFIG_MSM_ADSP_LOADER",
  62. srcs = ["adsp-loader.c"],
  63. )
  64. audio_modules.register(
  65. name = "audio_prm_dlkm",
  66. path = DSP_PATH,
  67. config_option = "CONFIG_AUDIO_PRM",
  68. srcs = ["audio_prm.c"],
  69. )
  70. audio_modules.register(
  71. name = "q6_pdr_dlkm",
  72. path = DSP_PATH,
  73. config_option = "CONFIG_MSM_QDSP6_PDR",
  74. srcs = ["audio_pdr.c"]
  75. )
  76. # >>>> IPC MODULES <<<<
  77. audio_modules.register(
  78. name = "gpr_dlkm",
  79. path = IPC_PATH,
  80. config_option = "CONFIG_MSM_QDSP6_GPR_RPMSG",
  81. srcs = ["gpr-lite.c"],
  82. )
  83. audio_modules.register(
  84. name = "audio_pkt_dlkm",
  85. path = IPC_PATH,
  86. config_option = "CONFIG_AUDIO_PKT",
  87. srcs = ["audio-pkt.c"],
  88. )
  89. # >>>> SOC MODULES <<<<
  90. audio_modules.register(
  91. name = "pinctrl_lpi_dlkm",
  92. path = SOC_PATH,
  93. config_option = "CONFIG_PINCTRL_LPI",
  94. srcs = ["pinctrl-lpi.c"],
  95. )
  96. audio_modules.register(
  97. name = "swr_dlkm",
  98. path = SOC_PATH,
  99. config_option = "CONFIG_SOUNDWIRE",
  100. srcs = [
  101. "regmap-swr.c",
  102. "soundwire.c"
  103. ]
  104. )
  105. audio_modules.register(
  106. name = "swr_ctrl_dlkm",
  107. path = SOC_PATH,
  108. conditional_srcs = {
  109. "CONFIG_SOUNDWIRE_WCD_CTRL": [
  110. "swr-wcd-ctrl.c"
  111. ],
  112. "CONFIG_SOUNDWIRE_MSTR_CTRL": [
  113. "swr-mstr-ctrl.c"
  114. ]
  115. },
  116. )
  117. audio_modules.register(
  118. name = "snd_event_dlkm",
  119. path = SOC_PATH,
  120. config_option = "CONFIG_SND_EVENT",
  121. srcs = ["snd_event.c"]
  122. )
  123. # >>>> ASOC MODULES <<<<
  124. audio_modules.register(
  125. name = "machine_dlkm",
  126. path = ASOC_PATH,
  127. srcs = [
  128. "msm_common.c",
  129. ],
  130. conditional_srcs = {
  131. "CONFIG_SND_SOC_SM8150": [
  132. "sm8150.c",
  133. "machine_815x_init.c"
  134. ],
  135. "CONFIG_SND_SOC_SM6150": [
  136. "sm6150.c",
  137. "machine_615x_init.c"
  138. ],
  139. "CONFIG_SND_SOC_SA6155": [
  140. "sa6155.c"
  141. ],
  142. "CONFIG_SND_SOC_QCS405": [
  143. "qcs405.c"
  144. ],
  145. "CONFIG_SND_SOC_KONA": [
  146. "kona.c"
  147. ],
  148. "CONFIG_SND_SOC_LAHAINA": [
  149. "lahaina.c"
  150. ],
  151. "CONFIG_SND_SOC_WAIPIO": [
  152. "waipio.c"
  153. ],
  154. "CONFIG_SND_SOC_KALAMA": [
  155. "kalama.c"
  156. ],
  157. "CONFIG_SND_SOC_PINEAPPLE": [
  158. "pineapple.c"
  159. ],
  160. "CONFIG_SND_SOC_HOLI": [
  161. "holi.c"
  162. ],
  163. "CONFIG_SND_SOC_LITO": [
  164. "kona.c"
  165. ],
  166. "CONFIG_SND_SOC_BENGAL": [
  167. "bengal.c"
  168. ],
  169. "CONFIG_SND_SOC_SA8155": [
  170. "sa8155.c"
  171. ],
  172. "CONFIG_SND_SOC_SDX": [
  173. "sdx-target.c"
  174. ]
  175. },
  176. )
  177. # >>>> ASOC/CODEC MODULES <<<<
  178. audio_modules.register(
  179. name = "wcd_core_dlkm",
  180. path = ASOC_CODECS_PATH,
  181. conditional_srcs = {
  182. "CONFIG_WCD9XXX_CODEC_CORE": [
  183. "wcd9xxx-rst.c",
  184. "wcd9xxx-core-init.c",
  185. "wcd9xxx-core.c",
  186. "wcd9xxx-irq.c",
  187. "wcd9xxx-slimslave.c",
  188. "wcd9xxx-utils.c",
  189. "wcd9335-regmap.c",
  190. "wcd9335-tables.c",
  191. "msm-cdc-pinctrl.c",
  192. "msm-cdc-supply.c",
  193. "wcd934x/wcd934x-regmap.c",
  194. "wcd934x/wcd934x-tables.c",
  195. ],
  196. "CONFIG_WCD9XXX_CODEC_CORE_V2": [
  197. "wcd9xxx-core-init.c",
  198. "msm-cdc-pinctrl.c",
  199. "msm-cdc-supply.c",
  200. ],
  201. "CONFIG_SND_SOC_WCD_IRQ": [
  202. "wcd-irq.c"
  203. ]
  204. }
  205. )
  206. audio_modules.register(
  207. name = "mbhc_dlkm",
  208. path = ASOC_CODECS_PATH,
  209. config_option = "CONFIG_SND_SOC_WCD_MBHC",
  210. srcs = ["wcd-mbhc-v2.c"],
  211. conditional_srcs = {
  212. "CONFIG_SND_SOC_WCD_MBHC_ADC": [
  213. "wcd-mbhc-adc.c"
  214. ],
  215. "CONFIG_SND_SOC_WCD_MBHC_LEGACY": [
  216. "wcd-mbhc-legacy.c"
  217. ]
  218. },
  219. )
  220. audio_modules.register(
  221. name = "swr_dmic_dlkm",
  222. path = ASOC_CODECS_PATH,
  223. config_option = "CONFIG_SND_SOC_SWR_DMIC",
  224. srcs = ["swr-dmic.c"]
  225. )
  226. audio_modules.register(
  227. name = "wcd9xxx_dlkm",
  228. path = ASOC_CODECS_PATH,
  229. config_option = "CONFIG_SND_SOC_WCD9XXX_V2",
  230. srcs = [
  231. "wcdcal-hwdep.c",
  232. "wcd9xxx-soc-init.c",
  233. "audio-ext-clk-up.c"
  234. ],
  235. conditional_srcs = {
  236. "CONFIG_WCD9XXX_CODEC_CORE": {
  237. True: [
  238. "wcd9xxx-common-v2.c",
  239. "wcd9xxx-resmgr-v2.c",
  240. "wcd-dsp-utils.c",
  241. "wcd-dsp-mgr.c",
  242. ],
  243. False: [
  244. "wcd-clsh.c"
  245. ]
  246. }
  247. }
  248. )
  249. audio_modules.register(
  250. name = "swr_haptics_dlkm",
  251. path = ASOC_CODECS_PATH,
  252. config_option = "CONFIG_SND_SWR_HAPTICS",
  253. srcs = ["swr-haptics.c"]
  254. )
  255. audio_modules.register(
  256. name = "stub_dlkm",
  257. path = ASOC_CODECS_PATH,
  258. config_option = "CONFIG_SND_SOC_MSM_STUB",
  259. srcs = ["msm_stub.c"]
  260. )
  261. audio_modules.register(
  262. name = "hdmi_dlkm",
  263. path = ASOC_CODECS_PATH,
  264. config_option = "CONFIG_SND_SOC_MSM_HDMI_CODEC_RX",
  265. srcs = ["msm_hdmi_codec_rx.c"],
  266. deps = ["//vendor/qcom/opensource/mm-drivers:%b_mm_drivers"]
  267. )
  268. # >>>> ASOC/CODECS/LPASS-CDC MODULES <<<<
  269. audio_modules.register(
  270. name = "lpass_cdc_dlkm",
  271. path = ASOC_CODECS_LPASS_CDC_PATH,
  272. config_option = "CONFIG_SND_SOC_LPASS_CDC",
  273. srcs = [
  274. "lpass-cdc.c",
  275. "lpass-cdc-comp.c",
  276. "lpass-cdc-utils.c",
  277. "lpass-cdc-regmap.c",
  278. "lpass-cdc-tables.c",
  279. "lpass-cdc-clk-rsc.c",
  280. ],
  281. )
  282. audio_modules.register(
  283. name = "lpass_cdc_wsa_macro_dlkm",
  284. path = ASOC_CODECS_LPASS_CDC_PATH,
  285. config_option = "CONFIG_LPASS_CDC_WSA_MACRO",
  286. srcs = ["lpass-cdc-wsa-macro.c"]
  287. )
  288. audio_modules.register(
  289. name = "lpass_cdc_wsa2_macro_dlkm",
  290. path = ASOC_CODECS_LPASS_CDC_PATH,
  291. config_option = "CONFIG_LPASS_CDC_WSA2_MACRO",
  292. srcs = ["lpass-cdc-wsa2-macro.c"]
  293. )
  294. audio_modules.register(
  295. name = "lpass_cdc_va_macro_dlkm",
  296. path = ASOC_CODECS_LPASS_CDC_PATH,
  297. config_option = "CONFIG_LPASS_CDC_VA_MACRO",
  298. srcs = ["lpass-cdc-va-macro.c"]
  299. )
  300. audio_modules.register(
  301. name = "lpass_cdc_rx_macro_dlkm",
  302. path = ASOC_CODECS_LPASS_CDC_PATH,
  303. config_option = "CONFIG_LPASS_CDC_RX_MACRO",
  304. srcs = ["lpass-cdc-rx-macro.c"],
  305. )
  306. audio_modules.register(
  307. name = "lpass_cdc_tx_macro_dlkm",
  308. path = ASOC_CODECS_LPASS_CDC_PATH,
  309. config_option = "CONFIG_LPASS_CDC_TX_MACRO",
  310. srcs = ["lpass-cdc-tx-macro.c"]
  311. )
  312. # >>>> WSA883X MODULE <<<<
  313. audio_modules.register(
  314. name = "wsa883x_dlkm",
  315. path = ASOC_CODECS_PATH + "/wsa883x",
  316. config_option = "CONFIG_SND_SOC_WSA883X",
  317. srcs = [
  318. "wsa883x.c",
  319. "wsa883x-regmap.c",
  320. "wsa883x-tables.c",
  321. ],
  322. )
  323. # >>>> WSA884X MODULE <<<<
  324. audio_modules.register(
  325. name = "wsa884x_dlkm",
  326. path = ASOC_CODECS_PATH + "/wsa884x",
  327. config_option = "CONFIG_SND_SOC_WSA884X",
  328. srcs = [
  329. "wsa884x.c",
  330. "wsa884x-regmap.c",
  331. "wsa884x-tables.c",
  332. ]
  333. )
  334. # >>>> WCD938X MODULES <<<<
  335. audio_modules.register(
  336. name = "wcd938x_dlkm",
  337. path = ASOC_CODECS_PATH + "/wcd938x",
  338. config_option = "CONFIG_SND_SOC_WCD938X",
  339. srcs = [
  340. "wcd938x.c",
  341. "wcd938x-regmap.c",
  342. "wcd938x-tables.c",
  343. "wcd938x-mbhc.c",
  344. ]
  345. )
  346. audio_modules.register(
  347. name = "wcd938x_slave_dlkm",
  348. path = ASOC_CODECS_PATH + "/wcd938x",
  349. config_option = "CONFIG_SND_SOC_WCD938X_SLAVE",
  350. srcs = ["wcd938x-slave.c"]
  351. )
  352. # >>>> WCD939X MODULES <<<<
  353. audio_modules.register(
  354. name = "wcd939x_dlkm",
  355. path = ASOC_CODECS_PATH + "/wcd939x",
  356. config_option = "CONFIG_SND_SOC_WCD939X",
  357. srcs = [
  358. "wcd939x.c",
  359. "wcd939x-regmap.c",
  360. "wcd939x-tables.c",
  361. "wcd939x-mbhc.c",
  362. ]
  363. )
  364. audio_modules.register(
  365. name = "wcd939x_slave_dlkm",
  366. path = ASOC_CODECS_PATH + "/wcd939x",
  367. config_option = "CONFIG_SND_SOC_WCD939X_SLAVE",
  368. srcs = ["wcd939x-slave.c"]
  369. )