Android.mk 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # Android makefile for audio kernel modules
  2. # Assume no targets will be supported
  3. # Check if this driver needs be built for current target
  4. ifeq ($(call is-board-platform,sdm845),true)
  5. AUDIO_SELECT := CONFIG_SND_SOC_SDM845=m
  6. endif
  7. ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true)
  8. AUDIO_SELECT := CONFIG_SND_SOC_SDM670=m
  9. endif
  10. ifeq ($(call is-board-platform,msmnile),true)
  11. AUDIO_SELECT := CONFIG_SND_SOC_SM8150=m
  12. endif
  13. ifeq ($(call is-board-platform,$(MSMSTEPPE)),true)
  14. AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m
  15. endif
  16. AUDIO_CHIPSET := audio
  17. # Build/Package only in case of supported target
  18. ifeq ($(call is-board-platform-in-list,msm8953 sdm845 sdm670 qcs605 msmnile $(MSMSTEPPE)),true)
  19. LOCAL_PATH := $(call my-dir)
  20. # This makefile is only for DLKM
  21. ifneq ($(findstring vendor,$(LOCAL_PATH)),)
  22. ifneq ($(findstring opensource,$(LOCAL_PATH)),)
  23. AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/audio-kernel
  24. endif # opensource
  25. DLKM_DIR := $(TOP)/device/qcom/common/dlkm
  26. # Build audio.ko as $(AUDIO_CHIPSET)_audio.ko
  27. ###########################################################
  28. # This is set once per LOCAL_PATH, not per (kernel) module
  29. KBUILD_OPTIONS := AUDIO_ROOT=$(AUDIO_BLD_DIR)
  30. # We are actually building audio.ko here, as per the
  31. # requirement we are specifying <chipset>_audio.ko as LOCAL_MODULE.
  32. # This means we need to rename the module to <chipset>_audio.ko
  33. # after audio.ko is built.
  34. KBUILD_OPTIONS += MODNAME=wcd_core_dlkm
  35. KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
  36. KBUILD_OPTIONS += $(AUDIO_SELECT)
  37. ###########################################################
  38. include $(CLEAR_VARS)
  39. LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd_core.ko
  40. LOCAL_MODULE_KBUILD_NAME := wcd_core_dlkm.ko
  41. LOCAL_MODULE_TAGS := optional
  42. LOCAL_MODULE_DEBUG_ENABLE := true
  43. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  44. include $(DLKM_DIR)/AndroidKernelModule.mk
  45. ###########################################################
  46. include $(CLEAR_VARS)
  47. LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd9xxx.ko
  48. LOCAL_MODULE_KBUILD_NAME := wcd9xxx_dlkm.ko
  49. LOCAL_MODULE_TAGS := optional
  50. LOCAL_MODULE_DEBUG_ENABLE := true
  51. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  52. include $(DLKM_DIR)/AndroidKernelModule.mk
  53. ###########################################################
  54. ifeq ($(call is-board-platform-in-list,sdm670 qcs605),true)
  55. include $(CLEAR_VARS)
  56. LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd_cpe.ko
  57. LOCAL_MODULE_KBUILD_NAME := wcd_cpe_dlkm.ko
  58. LOCAL_MODULE_TAGS := optional
  59. LOCAL_MODULE_DEBUG_ENABLE := true
  60. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  61. include $(DLKM_DIR)/AndroidKernelModule.mk
  62. endif
  63. ###########################################################
  64. include $(CLEAR_VARS)
  65. LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd_spi.ko
  66. LOCAL_MODULE_KBUILD_NAME := wcd_spi_dlkm.ko
  67. LOCAL_MODULE_TAGS := optional
  68. LOCAL_MODULE_DEBUG_ENABLE := true
  69. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  70. include $(DLKM_DIR)/AndroidKernelModule.mk
  71. ###########################################################
  72. ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true)
  73. include $(CLEAR_VARS)
  74. LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd9335.ko
  75. LOCAL_MODULE_KBUILD_NAME := wcd9335_dlkm.ko
  76. LOCAL_MODULE_TAGS := optional
  77. LOCAL_MODULE_DEBUG_ENABLE := true
  78. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  79. include $(DLKM_DIR)/AndroidKernelModule.mk
  80. endif
  81. ###########################################################
  82. include $(CLEAR_VARS)
  83. LOCAL_MODULE := $(AUDIO_CHIPSET)_wsa881x.ko
  84. LOCAL_MODULE_KBUILD_NAME := wsa881x_dlkm.ko
  85. LOCAL_MODULE_TAGS := optional
  86. LOCAL_MODULE_DEBUG_ENABLE := true
  87. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  88. include $(DLKM_DIR)/AndroidKernelModule.mk
  89. ###########################################################
  90. include $(CLEAR_VARS)
  91. LOCAL_MODULE := $(AUDIO_CHIPSET)_stub.ko
  92. LOCAL_MODULE_KBUILD_NAME := stub_dlkm.ko
  93. LOCAL_MODULE_TAGS := optional
  94. LOCAL_MODULE_DEBUG_ENABLE := true
  95. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  96. include $(DLKM_DIR)/AndroidKernelModule.mk
  97. ###########################################################
  98. include $(CLEAR_VARS)
  99. LOCAL_MODULE := $(AUDIO_CHIPSET)_mbhc.ko
  100. LOCAL_MODULE_KBUILD_NAME := mbhc_dlkm.ko
  101. LOCAL_MODULE_TAGS := optional
  102. LOCAL_MODULE_DEBUG_ENABLE := true
  103. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  104. include $(DLKM_DIR)/AndroidKernelModule.mk
  105. ###########################################################
  106. include $(CLEAR_VARS)
  107. LOCAL_MODULE := $(AUDIO_CHIPSET)_hdmi.ko
  108. LOCAL_MODULE_KBUILD_NAME := hdmi_dlkm.ko
  109. LOCAL_MODULE_TAGS := optional
  110. LOCAL_MODULE_DEBUG_ENABLE := true
  111. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  112. include $(DLKM_DIR)/AndroidKernelModule.mk
  113. ###########################################################
  114. endif # DLKM check
  115. endif # supported target check