sound.mk 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. #
  2. # Copyright (C) 2006-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. SOUND_MENU:=Sound Support
  8. # allow targets to override the soundcore stuff
  9. SOUNDCORE_LOAD ?= \
  10. soundcore \
  11. snd \
  12. snd-hwdep \
  13. snd-seq-device \
  14. snd-rawmidi \
  15. snd-timer \
  16. snd-pcm \
  17. snd-mixer-oss \
  18. snd-pcm-oss \
  19. snd-compress
  20. SOUNDCORE_FILES ?= \
  21. $(LINUX_DIR)/sound/soundcore.ko \
  22. $(LINUX_DIR)/sound/core/snd.ko \
  23. $(LINUX_DIR)/sound/core/snd-hwdep.ko \
  24. $(LINUX_DIR)/sound/core/seq/snd-seq-device.ko \
  25. $(LINUX_DIR)/sound/core/snd-rawmidi.ko \
  26. $(LINUX_DIR)/sound/core/snd-timer.ko \
  27. $(LINUX_DIR)/sound/core/snd-pcm.ko \
  28. $(LINUX_DIR)/sound/core/oss/snd-mixer-oss.ko \
  29. $(LINUX_DIR)/sound/core/oss/snd-pcm-oss.ko \
  30. $(LINUX_DIR)/sound/core/snd-compress.ko
  31. SOUNDCORE_LOAD += \
  32. $(if $(CONFIG_SND_DMAENGINE_PCM),snd-pcm-dmaengine)
  33. SOUNDCORE_FILES += \
  34. $(if $(CONFIG_SND_DMAENGINE_PCM),$(LINUX_DIR)/sound/core/snd-pcm-dmaengine.ko)
  35. define KernelPackage/sound-core
  36. SUBMENU:=$(SOUND_MENU)
  37. TITLE:=Sound support
  38. DEPENDS:=@AUDIO_SUPPORT +kmod-input-core
  39. KCONFIG:= \
  40. CONFIG_SOUND \
  41. CONFIG_SND \
  42. CONFIG_SND_HWDEP \
  43. CONFIG_SND_RAWMIDI \
  44. CONFIG_SND_TIMER \
  45. CONFIG_SND_PCM \
  46. CONFIG_SND_SEQUENCER \
  47. CONFIG_SND_VIRMIDI \
  48. CONFIG_SND_SEQ_DUMMY \
  49. CONFIG_SND_SEQUENCER_OSS=y \
  50. CONFIG_HOSTAUDIO \
  51. CONFIG_SND_PCM_OSS \
  52. CONFIG_SND_MIXER_OSS \
  53. CONFIG_SOUND_OSS_CORE_PRECLAIM=y \
  54. CONFIG_SND_COMPRESS_OFFLOAD
  55. FILES:=$(SOUNDCORE_FILES)
  56. AUTOLOAD:=$(call AutoLoad,30,$(SOUNDCORE_LOAD))
  57. endef
  58. define KernelPackage/sound-core/uml
  59. FILES:= \
  60. $(LINUX_DIR)/sound/soundcore.ko \
  61. $(LINUX_DIR)/arch/um/drivers/hostaudio.ko
  62. AUTOLOAD:=$(call AutoLoad,30,soundcore hostaudio)
  63. endef
  64. define KernelPackage/sound-core/description
  65. Kernel modules for sound support
  66. endef
  67. $(eval $(call KernelPackage,sound-core))
  68. define AddDepends/sound
  69. SUBMENU:=$(SOUND_MENU)
  70. DEPENDS+=kmod-sound-core $(1) @!TARGET_uml
  71. endef
  72. define KernelPackage/ac97
  73. TITLE:=ac97 controller
  74. KCONFIG:=CONFIG_SND_AC97_CODEC
  75. FILES:= \
  76. $(LINUX_DIR)/sound/ac97_bus.ko \
  77. $(LINUX_DIR)/sound/pci/ac97/snd-ac97-codec.ko
  78. AUTOLOAD:=$(call AutoLoad,35,ac97_bus snd-ac97-codec)
  79. $(call AddDepends/sound)
  80. endef
  81. define KernelPackage/ac97/description
  82. The ac97 controller
  83. endef
  84. $(eval $(call KernelPackage,ac97))
  85. define KernelPackage/sound-seq
  86. TITLE:=Sequencer support
  87. FILES:= \
  88. $(LINUX_DIR)/sound/core/seq/snd-seq.ko \
  89. $(LINUX_DIR)/sound/core/seq/snd-seq-midi-event.ko \
  90. $(LINUX_DIR)/sound/core/seq/snd-seq-midi.ko
  91. AUTOLOAD:=$(call AutoLoad,35,snd-seq snd-seq-midi-event snd-seq-midi)
  92. $(call AddDepends/sound)
  93. endef
  94. define KernelPackage/sound-seq/description
  95. Kernel modules for sequencer support
  96. endef
  97. $(eval $(call KernelPackage,sound-seq))
  98. define KernelPackage/sound-i8x0
  99. TITLE:=Intel/SiS/nVidia/AMD/ALi AC97 Controller
  100. DEPENDS:=+kmod-ac97
  101. KCONFIG:=CONFIG_SND_INTEL8X0
  102. FILES:=$(LINUX_DIR)/sound/pci/snd-intel8x0.ko
  103. AUTOLOAD:=$(call AutoLoad,36,snd-intel8x0)
  104. $(call AddDepends/sound)
  105. endef
  106. define KernelPackage/sound-i8x0/description
  107. support for the integrated AC97 sound device on motherboards
  108. with Intel/SiS/nVidia/AMD chipsets, or ALi chipsets using
  109. the M5455 Audio Controller.
  110. endef
  111. $(eval $(call KernelPackage,sound-i8x0))
  112. define KernelPackage/sound-soc-core
  113. TITLE:=SoC sound support
  114. DEPENDS:=+kmod-regmap +kmod-ac97
  115. KCONFIG:= \
  116. CONFIG_SND_SOC \
  117. CONFIG_SND_SOC_DMAENGINE_PCM=y \
  118. CONFIG_SND_SOC_ALL_CODECS=n
  119. FILES:=$(LINUX_DIR)/sound/soc/snd-soc-core.ko
  120. AUTOLOAD:=$(call AutoLoad,55, snd-soc-core)
  121. $(call AddDepends/sound)
  122. endef
  123. $(eval $(call KernelPackage,sound-soc-core))
  124. define KernelPackage/sound-soc-ac97
  125. TITLE:=AC97 Codec support
  126. KCONFIG:=CONFIG_SND_SOC_AC97_CODEC
  127. FILES:=$(LINUX_DIR)/sound/soc/codecs/snd-soc-ac97.ko
  128. AUTOLOAD:=$(call AutoLoad,57,snd-soc-ac97)
  129. DEPENDS:=+kmod-ac97 +kmod-sound-soc-core
  130. $(call AddDepends/sound)
  131. endef
  132. $(eval $(call KernelPackage,sound-soc-ac97))
  133. define KernelPackage/sound-soc-imx
  134. TITLE:=IMX SoC support
  135. KCONFIG:=\
  136. CONFIG_SND_IMX_SOC \
  137. CONFIG_SND_SOC_IMX_AUDMUX \
  138. CONFIG_SND_SOC_FSL_SSI \
  139. CONFIG_SND_SOC_IMX_PCM_DMA
  140. FILES:= \
  141. $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-audmux.ko \
  142. $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
  143. $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko
  144. AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
  145. DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core
  146. $(call AddDepends/sound)
  147. endef
  148. define KernelPackage/sound-soc-imx/description
  149. Support for i.MX6 Platform sound (ssi/audmux/pcm)
  150. endef
  151. $(eval $(call KernelPackage,sound-soc-imx))
  152. define KernelPackage/sound-soc-imx-sgtl5000
  153. TITLE:=IMX SoC support for SGTL5000
  154. KCONFIG:=CONFIG_SND_SOC_IMX_SGTL5000
  155. FILES:=\
  156. $(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko \
  157. $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-sgtl5000.ko
  158. AUTOLOAD:=$(call AutoLoad,57,snd-soc-sgtl5000 snd-soc-imx-sgtl5000)
  159. DEPENDS:=@TARGET_imx6 +kmod-sound-soc-imx
  160. $(call AddDepends/sound)
  161. endef
  162. define KernelPackage/sound-soc-imx-sgtl5000/description
  163. Support for i.MX6 Platform sound SGTL5000 codec
  164. endef
  165. $(eval $(call KernelPackage,sound-soc-imx-sgtl5000))
  166. define KernelPackage/sound-soc-gw_avila
  167. TITLE:=Gateworks Avila SoC sound support
  168. KCONFIG:= \
  169. CONFIG_SND_GW_AVILA_SOC \
  170. CONFIG_SND_GW_AVILA_SOC_PCM \
  171. CONFIG_SND_GW_AVILA_SOC_HSS
  172. FILES:= \
  173. $(LINUX_DIR)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
  174. $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila.ko \
  175. $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-pcm.ko \
  176. $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-hss.ko
  177. AUTOLOAD:=$(call AutoLoad,65,snd-soc-tlv320aic3x snd-soc-gw-avila snd-soc-gw-avila-pcm snd-soc-gw-avila-hss)
  178. DEPENDS:=@TARGET_ixp4xx +kmod-sound-soc-core
  179. $(call AddDepends/sound)
  180. endef
  181. $(eval $(call KernelPackage,sound-soc-gw_avila))
  182. define KernelPackage/pcspkr
  183. DEPENDS:=@TARGET_x86 +kmod-input-core
  184. TITLE:=PC speaker support
  185. KCONFIG:= \
  186. CONFIG_INPUT_PCSPKR \
  187. CONFIG_SND_PCSP
  188. FILES:= \
  189. $(LINUX_DIR)/drivers/input/misc/pcspkr.ko \
  190. $(LINUX_DIR)/sound/drivers/pcsp/snd-pcsp.ko
  191. AUTOLOAD:=$(call AutoLoad,50,pcspkr snd-pcsp)
  192. $(call AddDepends/sound)
  193. endef
  194. define KernelPackage/pcspkr/description
  195. This enables sounds (tones) through the pc speaker
  196. endef
  197. $(eval $(call KernelPackage,pcspkr))