Android.mk 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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,$(MSMSTEPPE)),true)
  5. AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m
  6. endif
  7. AUDIO_CHIPSET := audio
  8. # Build/Package only in case of supported target
  9. ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE)),true)
  10. LOCAL_PATH := $(call my-dir)
  11. # This makefile is only for DLKM
  12. ifneq ($(findstring vendor,$(LOCAL_PATH)),)
  13. ifneq ($(findstring opensource,$(LOCAL_PATH)),)
  14. AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/audio-kernel
  15. endif # opensource
  16. DLKM_DIR := $(TOP)/device/qcom/common/dlkm
  17. # Build audio.ko as $(AUDIO_CHIPSET)_audio.ko
  18. ###########################################################
  19. # This is set once per LOCAL_PATH, not per (kernel) module
  20. KBUILD_OPTIONS := AUDIO_ROOT=$(AUDIO_BLD_DIR)
  21. # We are actually building audio.ko here, as per the
  22. # requirement we are specifying <chipset>_audio.ko as LOCAL_MODULE.
  23. # This means we need to rename the module to <chipset>_audio.ko
  24. # after audio.ko is built.
  25. KBUILD_OPTIONS += MODNAME=bolero_cdc_dlkm
  26. KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
  27. KBUILD_OPTIONS += $(AUDIO_SELECT)
  28. ###########################################################
  29. include $(CLEAR_VARS)
  30. LOCAL_MODULE := $(AUDIO_CHIPSET)_bolero_cdc.ko
  31. LOCAL_MODULE_KBUILD_NAME := bolero_cdc_dlkm.ko
  32. LOCAL_MODULE_TAGS := optional
  33. LOCAL_MODULE_DEBUG_ENABLE := true
  34. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  35. include $(DLKM_DIR)/AndroidKernelModule.mk
  36. ###########################################################
  37. include $(CLEAR_VARS)
  38. LOCAL_MODULE := $(AUDIO_CHIPSET)_wsa_macro.ko
  39. LOCAL_MODULE_KBUILD_NAME := wsa_macro_dlkm.ko
  40. LOCAL_MODULE_TAGS := optional
  41. LOCAL_MODULE_DEBUG_ENABLE := true
  42. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  43. include $(DLKM_DIR)/AndroidKernelModule.mk
  44. ###########################################################
  45. include $(CLEAR_VARS)
  46. LOCAL_MODULE := $(AUDIO_CHIPSET)_va_macro.ko
  47. LOCAL_MODULE_KBUILD_NAME := va_macro_dlkm.ko
  48. LOCAL_MODULE_TAGS := optional
  49. LOCAL_MODULE_DEBUG_ENABLE := true
  50. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  51. include $(DLKM_DIR)/AndroidKernelModule.mk
  52. ###########################################################
  53. include $(CLEAR_VARS)
  54. LOCAL_MODULE := $(AUDIO_CHIPSET)_tx_macro.ko
  55. LOCAL_MODULE_KBUILD_NAME := tx_macro_dlkm.ko
  56. LOCAL_MODULE_TAGS := optional
  57. LOCAL_MODULE_DEBUG_ENABLE := true
  58. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  59. include $(DLKM_DIR)/AndroidKernelModule.mk
  60. ###########################################################
  61. include $(CLEAR_VARS)
  62. LOCAL_MODULE := $(AUDIO_CHIPSET)_rx_macro.ko
  63. LOCAL_MODULE_KBUILD_NAME := rx_macro_dlkm.ko
  64. LOCAL_MODULE_TAGS := optional
  65. LOCAL_MODULE_DEBUG_ENABLE := true
  66. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  67. include $(DLKM_DIR)/AndroidKernelModule.mk
  68. ###########################################################
  69. ###########################################################
  70. endif # DLKM check
  71. endif # supported target check