Android.mk 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. # Android makefile for audio kernel modules
  2. LOCAL_PATH := $(call my-dir)
  3. ifeq ($(call is-board-platform, taro),true)
  4. AUDIO_SELECT := CONFIG_SND_SOC_WAIPIO=m
  5. endif
  6. # Build/Package only in case of supported target
  7. ifeq ($(call is-board-platform-in-list,taro), true)
  8. LOCAL_PATH := $(call my-dir)
  9. # This makefile is only for DLKM
  10. ifneq ($(findstring vendor,$(LOCAL_PATH)),)
  11. ifneq ($(findstring opensource,$(LOCAL_PATH)),)
  12. AUDIO_BLD_DIR := $(abspath .)/vendor/qcom/opensource/audio-kernel
  13. endif # opensource
  14. DLKM_DIR := $(TOP)/device/qcom/common/dlkm
  15. ###########################################################
  16. # This is set once per LOCAL_PATH, not per (kernel) module
  17. KBUILD_OPTIONS := AUDIO_ROOT=$(AUDIO_BLD_DIR)
  18. # We are actually building audio.ko here, as per the
  19. # requirement we are specifying <chipset>_audio.ko as LOCAL_MODULE.
  20. # This means we need to rename the module to <chipset>_audio.ko
  21. # after audio.ko is built.
  22. KBUILD_OPTIONS += MODNAME=audio_dlkm
  23. KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
  24. KBUILD_OPTIONS += $(AUDIO_SELECT)
  25. AUDIO_SRC_FILES := \
  26. $(wildcard $(LOCAL_PATH)/*) \
  27. $(wildcard $(LOCAL_PATH)/*/*) \
  28. $(wildcard $(LOCAL_PATH)/*/*/*) \
  29. $(wildcard $(LOCAL_PATH)/*/*/*/*)
  30. ########################### dsp ################################
  31. include $(CLEAR_VARS)
  32. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  33. LOCAL_MODULE := q6_notifier_dlkm.ko
  34. LOCAL_MODULE_KBUILD_NAME := dsp/q6_notifier_dlkm.ko
  35. LOCAL_MODULE_TAGS := optional
  36. LOCAL_MODULE_DEBUG_ENABLE := true
  37. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  38. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  39. ###########################################################
  40. include $(CLEAR_VARS)
  41. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  42. LOCAL_MODULE := spf_core_dlkm.ko
  43. LOCAL_MODULE_KBUILD_NAME := dsp/spf_core_dlkm.ko
  44. LOCAL_MODULE_TAGS := optional
  45. LOCAL_MODULE_DEBUG_ENABLE := true
  46. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  47. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  48. ###########################################################
  49. include $(CLEAR_VARS)
  50. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  51. LOCAL_MODULE := audpkt_ion_dlkm.ko
  52. LOCAL_MODULE_KBUILD_NAME := dsp/audpkt_ion_dlkm.ko
  53. LOCAL_MODULE_TAGS := optional
  54. LOCAL_MODULE_DEBUG_ENABLE := true
  55. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  56. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  57. ###########################################################
  58. include $(CLEAR_VARS)
  59. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  60. LOCAL_MODULE := gpr_dlkm.ko
  61. LOCAL_MODULE_KBUILD_NAME := ipc/gpr_dlkm.ko
  62. LOCAL_MODULE_TAGS := optional
  63. LOCAL_MODULE_DEBUG_ENABLE := true
  64. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  65. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  66. ###########################################################
  67. include $(CLEAR_VARS)
  68. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  69. LOCAL_MODULE := audio_pkt_dlkm.ko
  70. LOCAL_MODULE_KBUILD_NAME := ipc/audio_pkt_dlkm.ko
  71. LOCAL_MODULE_TAGS := optional
  72. LOCAL_MODULE_DEBUG_ENABLE := true
  73. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  74. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  75. ###########################################################
  76. include $(CLEAR_VARS)
  77. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  78. LOCAL_MODULE := q6_dlkm.ko
  79. LOCAL_MODULE_KBUILD_NAME := dsp/q6_dlkm.ko
  80. LOCAL_MODULE_TAGS := optional
  81. LOCAL_MODULE_DEBUG_ENABLE := true
  82. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  83. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  84. ###########################################################
  85. include $(CLEAR_VARS)
  86. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  87. LOCAL_MODULE := adsp_loader_dlkm.ko
  88. LOCAL_MODULE_KBUILD_NAME := dsp/adsp_loader_dlkm.ko
  89. LOCAL_MODULE_TAGS := optional
  90. LOCAL_MODULE_DEBUG_ENABLE := true
  91. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  92. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  93. ########################### ipc ################################
  94. include $(CLEAR_VARS)
  95. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  96. LOCAL_MODULE := audio_prm_dlkm.ko
  97. LOCAL_MODULE_KBUILD_NAME := dsp/audio_prm_dlkm.ko
  98. LOCAL_MODULE_TAGS := optional
  99. LOCAL_MODULE_DEBUG_ENABLE := true
  100. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  101. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  102. ###########################################################
  103. include $(CLEAR_VARS)
  104. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  105. LOCAL_MODULE := q6_pdr_dlkm.ko
  106. LOCAL_MODULE_KBUILD_NAME := dsp/q6_pdr_dlkm.ko
  107. LOCAL_MODULE_TAGS := optional
  108. LOCAL_MODULE_DEBUG_ENABLE := true
  109. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  110. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  111. ############################ soc ###############################
  112. include $(CLEAR_VARS)
  113. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  114. LOCAL_MODULE := pinctrl_lpi_dlkm.ko
  115. LOCAL_MODULE_KBUILD_NAME := soc/pinctrl_lpi_dlkm.ko
  116. LOCAL_MODULE_TAGS := optional
  117. LOCAL_MODULE_DEBUG_ENABLE := true
  118. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  119. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  120. ###########################################################
  121. include $(CLEAR_VARS)
  122. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  123. LOCAL_MODULE := swr_dlkm.ko
  124. LOCAL_MODULE_KBUILD_NAME := soc/swr_dlkm.ko
  125. LOCAL_MODULE_TAGS := optional
  126. LOCAL_MODULE_DEBUG_ENABLE := true
  127. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  128. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  129. ###########################################################
  130. include $(CLEAR_VARS)
  131. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  132. LOCAL_MODULE := swr_ctrl_dlkm.ko
  133. LOCAL_MODULE_KBUILD_NAME := soc/swr_ctrl_dlkm.ko
  134. LOCAL_MODULE_TAGS := optional
  135. LOCAL_MODULE_DEBUG_ENABLE := true
  136. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  137. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  138. ###########################################################
  139. include $(CLEAR_VARS)
  140. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  141. LOCAL_MODULE := snd_event_dlkm.ko
  142. LOCAL_MODULE_KBUILD_NAME := soc/snd_event_dlkm.ko
  143. LOCAL_MODULE_TAGS := optional
  144. LOCAL_MODULE_DEBUG_ENABLE := true
  145. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  146. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  147. ########################### ASOC CODEC ################################
  148. include $(CLEAR_VARS)
  149. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  150. LOCAL_MODULE := wcd_core_dlkm.ko
  151. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/wcd_core_dlkm.ko
  152. LOCAL_MODULE_TAGS := optional
  153. LOCAL_MODULE_DEBUG_ENABLE := true
  154. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  155. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  156. ###########################################################
  157. include $(CLEAR_VARS)
  158. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  159. LOCAL_MODULE := mbhc_dlkm.ko
  160. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/mbhc_dlkm.ko
  161. LOCAL_MODULE_TAGS := optional
  162. LOCAL_MODULE_DEBUG_ENABLE := true
  163. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  164. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  165. ###########################################################
  166. include $(CLEAR_VARS)
  167. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  168. LOCAL_MODULE := swr_dmic_dlkm.ko
  169. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/swr_dmic_dlkm.ko
  170. LOCAL_MODULE_TAGS := optional
  171. LOCAL_MODULE_DEBUG_ENABLE := true
  172. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  173. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  174. ###########################################################
  175. include $(CLEAR_VARS)
  176. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  177. LOCAL_MODULE := wcd9xxx_dlkm.ko
  178. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/wcd9xxx_dlkm.ko
  179. LOCAL_MODULE_TAGS := optional
  180. LOCAL_MODULE_DEBUG_ENABLE := true
  181. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  182. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  183. ###########################################################
  184. include $(CLEAR_VARS)
  185. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  186. LOCAL_MODULE := swr_haptics_dlkm.ko
  187. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/swr_haptics_dlkm.ko
  188. LOCAL_MODULE_TAGS := optional
  189. LOCAL_MODULE_DEBUG_ENABLE := true
  190. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  191. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  192. ###########################################################
  193. include $(CLEAR_VARS)
  194. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  195. LOCAL_MODULE := stub_dlkm.ko
  196. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/stub_dlkm.ko
  197. LOCAL_MODULE_TAGS := optional
  198. LOCAL_MODULE_DEBUG_ENABLE := true
  199. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  200. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  201. ########################### ASOC MACHINE ################################
  202. include $(CLEAR_VARS)
  203. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  204. LOCAL_MODULE := machine_dlkm.ko
  205. LOCAL_MODULE_KBUILD_NAME := asoc/machine_dlkm.ko
  206. LOCAL_MODULE_TAGS := optional
  207. LOCAL_MODULE_DEBUG_ENABLE := true
  208. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  209. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  210. ########################### LPASS-CDC CODEC ###########################
  211. include $(CLEAR_VARS)
  212. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  213. LOCAL_MODULE := lpass_cdc_dlkm.ko
  214. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/lpass-cdc/lpass_cdc_dlkm.ko
  215. LOCAL_MODULE_TAGS := optional
  216. LOCAL_MODULE_DEBUG_ENABLE := true
  217. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  218. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  219. ###########################################################
  220. include $(CLEAR_VARS)
  221. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  222. LOCAL_MODULE := lpass_cdc_wsa2_macro_dlkm.ko
  223. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/lpass-cdc/lpass_cdc_wsa2_macro_dlkm.ko
  224. LOCAL_MODULE_TAGS := optional
  225. LOCAL_MODULE_DEBUG_ENABLE := true
  226. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  227. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  228. ###########################################################
  229. include $(CLEAR_VARS)
  230. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  231. LOCAL_MODULE := lpass_cdc_wsa_macro_dlkm.ko
  232. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/lpass-cdc/lpass_cdc_wsa_macro_dlkm.ko
  233. LOCAL_MODULE_TAGS := optional
  234. LOCAL_MODULE_DEBUG_ENABLE := true
  235. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  236. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  237. ###########################################################
  238. include $(CLEAR_VARS)
  239. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  240. LOCAL_MODULE := lpass_cdc_va_macro_dlkm.ko
  241. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/lpass-cdc/lpass_cdc_va_macro_dlkm.ko
  242. LOCAL_MODULE_TAGS := optional
  243. LOCAL_MODULE_DEBUG_ENABLE := true
  244. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  245. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  246. ###########################################################
  247. include $(CLEAR_VARS)
  248. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  249. LOCAL_MODULE := lpass_cdc_tx_macro_dlkm.ko
  250. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/lpass-cdc/lpass_cdc_tx_macro_dlkm.ko
  251. LOCAL_MODULE_TAGS := optional
  252. LOCAL_MODULE_DEBUG_ENABLE := true
  253. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  254. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  255. ###########################################################
  256. include $(CLEAR_VARS)
  257. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  258. LOCAL_MODULE := lpass_cdc_rx_macro_dlkm.ko
  259. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/lpass-cdc/lpass_cdc_rx_macro_dlkm.ko
  260. LOCAL_MODULE_TAGS := optional
  261. LOCAL_MODULE_DEBUG_ENABLE := true
  262. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  263. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  264. ########################### WSA883x CODEC ###########################
  265. include $(CLEAR_VARS)
  266. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  267. LOCAL_MODULE := wsa883x_dlkm.ko
  268. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/wsa883x/wsa883x_dlkm.ko
  269. LOCAL_MODULE_TAGS := optional
  270. LOCAL_MODULE_DEBUG_ENABLE := true
  271. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  272. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  273. ########################### WCD938x CODEC ################################
  274. include $(CLEAR_VARS)
  275. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  276. LOCAL_MODULE := wcd938x_dlkm.ko
  277. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/wcd938x/wcd938x_dlkm.ko
  278. LOCAL_MODULE_TAGS := optional
  279. LOCAL_MODULE_DEBUG_ENABLE := true
  280. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  281. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  282. ###########################################################
  283. include $(CLEAR_VARS)
  284. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  285. LOCAL_MODULE := wcd938x_slave_dlkm.ko
  286. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/wcd938x/wcd938x_slave_dlkm.ko
  287. LOCAL_MODULE_TAGS := optional
  288. LOCAL_MODULE_DEBUG_ENABLE := true
  289. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  290. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  291. ###########################################################
  292. include $(CLEAR_VARS)
  293. LOCAL_SRC_FILES := $(AUDIO_SRC_FILES)
  294. LOCAL_MODULE := hdmi_dlkm.ko
  295. LOCAL_MODULE_KBUILD_NAME := asoc/codecs/hdmi_dlkm.ko
  296. LOCAL_MODULE_TAGS := optional
  297. LOCAL_MODULE_DEBUG_ENABLE := true
  298. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  299. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  300. ###########################################################
  301. endif # DLKM check
  302. endif # supported target check