sound.mk 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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-mpu401
  86. TITLE:=MPU-401 uart driver
  87. KCONFIG:=CONFIG_SND_MPU401_UART
  88. FILES:= \
  89. $(LINUX_DIR)/sound/drivers/mpu401/snd-mpu401-uart.ko
  90. AUTOLOAD:=$(call AutoLoad,35,snd-mpu401-uart)
  91. $(call AddDepends/sound)
  92. endef
  93. define KernelPackage/sound-mpu401/description
  94. support for MIDI ports compatible with the Roland MPU-401
  95. interface in UART mode.
  96. endef
  97. $(eval $(call KernelPackage,sound-mpu401))
  98. define KernelPackage/sound-seq
  99. TITLE:=Sequencer support
  100. FILES:= \
  101. $(LINUX_DIR)/sound/core/seq/snd-seq.ko \
  102. $(LINUX_DIR)/sound/core/seq/snd-seq-midi-event.ko \
  103. $(LINUX_DIR)/sound/core/seq/snd-seq-midi.ko
  104. AUTOLOAD:=$(call AutoLoad,35,snd-seq snd-seq-midi-event snd-seq-midi)
  105. $(call AddDepends/sound)
  106. endef
  107. define KernelPackage/sound-seq/description
  108. Kernel modules for sequencer support
  109. endef
  110. $(eval $(call KernelPackage,sound-seq))
  111. define KernelPackage/sound-i8x0
  112. TITLE:=Intel/SiS/nVidia/AMD/ALi AC97 Controller
  113. DEPENDS:=+kmod-ac97
  114. KCONFIG:=CONFIG_SND_INTEL8X0
  115. FILES:=$(LINUX_DIR)/sound/pci/snd-intel8x0.ko
  116. AUTOLOAD:=$(call AutoLoad,36,snd-intel8x0)
  117. $(call AddDepends/sound)
  118. endef
  119. define KernelPackage/sound-i8x0/description
  120. support for the integrated AC97 sound device on motherboards
  121. with Intel/SiS/nVidia/AMD chipsets, or ALi chipsets using
  122. the M5455 Audio Controller.
  123. endef
  124. $(eval $(call KernelPackage,sound-i8x0))
  125. define KernelPackage/sound-via82xx
  126. TITLE:=VIA 82xx AC97 Controller
  127. DEPENDS:=+kmod-ac97 +kmod-sound-mpu401
  128. KCONFIG:=CONFIG_SND_VIA82XX
  129. FILES:=$(LINUX_DIR)/sound/pci/snd-via82xx.ko
  130. AUTOLOAD:=$(call AutoLoad,36,snd-via82xx)
  131. $(call AddDepends/sound)
  132. endef
  133. define KernelPackage/sound-via82xx/description
  134. support for the integrated AC97 sound device on motherboards
  135. with VIA chipsets.
  136. endef
  137. $(eval $(call KernelPackage,sound-via82xx))
  138. define KernelPackage/sound-soc-core
  139. TITLE:=SoC sound support
  140. DEPENDS:=+kmod-regmap +kmod-ac97
  141. KCONFIG:= \
  142. CONFIG_SND_SOC \
  143. CONFIG_SND_SOC_DMAENGINE_PCM=y \
  144. CONFIG_SND_SOC_ALL_CODECS=n
  145. FILES:=$(LINUX_DIR)/sound/soc/snd-soc-core.ko
  146. AUTOLOAD:=$(call AutoLoad,55, snd-soc-core)
  147. $(call AddDepends/sound)
  148. endef
  149. $(eval $(call KernelPackage,sound-soc-core))
  150. define KernelPackage/sound-soc-ac97
  151. TITLE:=AC97 Codec support
  152. KCONFIG:=CONFIG_SND_SOC_AC97_CODEC
  153. FILES:=$(LINUX_DIR)/sound/soc/codecs/snd-soc-ac97.ko
  154. AUTOLOAD:=$(call AutoLoad,57,snd-soc-ac97)
  155. DEPENDS:=+kmod-ac97 +kmod-sound-soc-core
  156. $(call AddDepends/sound)
  157. endef
  158. $(eval $(call KernelPackage,sound-soc-ac97))
  159. define KernelPackage/sound-soc-imx
  160. TITLE:=IMX SoC support
  161. KCONFIG:=\
  162. CONFIG_SND_IMX_SOC \
  163. CONFIG_SND_SOC_IMX_AUDMUX \
  164. CONFIG_SND_SOC_FSL_SSI \
  165. CONFIG_SND_SOC_IMX_PCM_DMA
  166. FILES:= \
  167. $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-audmux.ko \
  168. $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
  169. $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko
  170. AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
  171. DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core
  172. $(call AddDepends/sound)
  173. endef
  174. define KernelPackage/sound-soc-imx/description
  175. Support for i.MX6 Platform sound (ssi/audmux/pcm)
  176. endef
  177. $(eval $(call KernelPackage,sound-soc-imx))
  178. define KernelPackage/sound-soc-imx-sgtl5000
  179. TITLE:=IMX SoC support for SGTL5000
  180. KCONFIG:=CONFIG_SND_SOC_IMX_SGTL5000
  181. FILES:=\
  182. $(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko \
  183. $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-sgtl5000.ko
  184. AUTOLOAD:=$(call AutoLoad,57,snd-soc-sgtl5000 snd-soc-imx-sgtl5000)
  185. DEPENDS:=@TARGET_imx6 +kmod-sound-soc-imx
  186. $(call AddDepends/sound)
  187. endef
  188. define KernelPackage/sound-soc-imx-sgtl5000/description
  189. Support for i.MX6 Platform sound SGTL5000 codec
  190. endef
  191. $(eval $(call KernelPackage,sound-soc-imx-sgtl5000))
  192. define KernelPackage/sound-soc-gw_avila
  193. TITLE:=Gateworks Avila SoC sound support
  194. KCONFIG:= \
  195. CONFIG_SND_GW_AVILA_SOC \
  196. CONFIG_SND_GW_AVILA_SOC_PCM \
  197. CONFIG_SND_GW_AVILA_SOC_HSS
  198. FILES:= \
  199. $(LINUX_DIR)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
  200. $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila.ko \
  201. $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-pcm.ko \
  202. $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-hss.ko
  203. AUTOLOAD:=$(call AutoLoad,65,snd-soc-tlv320aic3x snd-soc-gw-avila snd-soc-gw-avila-pcm snd-soc-gw-avila-hss)
  204. DEPENDS:=@TARGET_ixp4xx +kmod-sound-soc-core
  205. $(call AddDepends/sound)
  206. endef
  207. $(eval $(call KernelPackage,sound-soc-gw_avila))
  208. define KernelPackage/pcspkr
  209. DEPENDS:=@TARGET_x86 +kmod-input-core
  210. TITLE:=PC speaker support
  211. KCONFIG:= \
  212. CONFIG_INPUT_PCSPKR \
  213. CONFIG_SND_PCSP
  214. FILES:= \
  215. $(LINUX_DIR)/drivers/input/misc/pcspkr.ko \
  216. $(LINUX_DIR)/sound/drivers/pcsp/snd-pcsp.ko
  217. AUTOLOAD:=$(call AutoLoad,50,pcspkr snd-pcsp)
  218. $(call AddDepends/sound)
  219. endef
  220. define KernelPackage/pcspkr/description
  221. This enables sounds (tones) through the pc speaker
  222. endef
  223. $(eval $(call KernelPackage,pcspkr))
  224. define KernelPackage/sound-dummy
  225. $(call AddDepends/sound)
  226. TITLE:=Null sound output driver (sink)
  227. KCONFIG:= \
  228. CONFIG_SND_DUMMY
  229. FILES:= \
  230. $(LINUX_DIR)/sound/drivers/snd-dummy.ko
  231. AUTOLOAD:=$(call AutoLoad,32,snd-dummy)
  232. endef
  233. define KernelPackage/sound_dummy/description
  234. Dummy sound device for Alsa when no hardware present
  235. endef
  236. $(eval $(call KernelPackage,sound-dummy))