Android.mk 12 KB

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