Android.mk 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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) $(TRINKET)),true)
  5. AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m
  6. endif
  7. ifeq ($(call is-board-platform,kona),true)
  8. AUDIO_SELECT := CONFIG_SND_SOC_KONA=m
  9. endif
  10. ifeq ($(call is-board-platform,lito),true)
  11. AUDIO_SELECT := CONFIG_SND_SOC_LITO=m
  12. endif
  13. ifeq ($(call is-board-platform,bengal),true)
  14. AUDIO_SELECT := CONFIG_SND_SOC_BENGAL=m
  15. endif
  16. AUDIO_CHIPSET := audio
  17. # Build/Package only in case of supported target
  18. ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET) kona lito bengal),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 := $(shell pwd)/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=bolero_cdc_dlkm
  35. KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
  36. KBUILD_OPTIONS += $(AUDIO_SELECT)
  37. ###########################################################
  38. include $(CLEAR_VARS)
  39. LOCAL_MODULE := $(AUDIO_CHIPSET)_bolero_cdc.ko
  40. LOCAL_MODULE_KBUILD_NAME := bolero_cdc_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. ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET) kona lito),true)
  47. include $(CLEAR_VARS)
  48. LOCAL_MODULE := $(AUDIO_CHIPSET)_wsa_macro.ko
  49. LOCAL_MODULE_KBUILD_NAME := wsa_macro_dlkm.ko
  50. LOCAL_MODULE_TAGS := optional
  51. LOCAL_MODULE_DEBUG_ENABLE := true
  52. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  53. include $(DLKM_DIR)/AndroidKernelModule.mk
  54. endif
  55. ###########################################################
  56. include $(CLEAR_VARS)
  57. LOCAL_MODULE := $(AUDIO_CHIPSET)_va_macro.ko
  58. LOCAL_MODULE_KBUILD_NAME := va_macro_dlkm.ko
  59. LOCAL_MODULE_TAGS := optional
  60. LOCAL_MODULE_DEBUG_ENABLE := true
  61. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  62. include $(DLKM_DIR)/AndroidKernelModule.mk
  63. ###########################################################
  64. include $(CLEAR_VARS)
  65. LOCAL_MODULE := $(AUDIO_CHIPSET)_tx_macro.ko
  66. LOCAL_MODULE_KBUILD_NAME := tx_macro_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. include $(CLEAR_VARS)
  73. LOCAL_MODULE := $(AUDIO_CHIPSET)_rx_macro.ko
  74. LOCAL_MODULE_KBUILD_NAME := rx_macro_dlkm.ko
  75. LOCAL_MODULE_TAGS := optional
  76. LOCAL_MODULE_DEBUG_ENABLE := true
  77. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  78. include $(DLKM_DIR)/AndroidKernelModule.mk
  79. ###########################################################
  80. ###########################################################
  81. endif # DLKM check
  82. endif # supported target check