964524b0afa2a307d14b7b5f399fbc0dfacebee1
[openwrt.git] / package / kernel / linux / modules / sound.mk
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
8 SOUND_MENU:=Sound Support
9
10 # allow targets to override the soundcore stuff
11 SOUNDCORE_LOAD ?= \
12         soundcore \
13         snd \
14         snd-hwdep \
15         snd-seq-device \
16         snd-rawmidi \
17         snd-timer \
18         snd-pcm \
19         snd-mixer-oss \
20         snd-pcm-oss \
21         snd-compress
22
23 SOUNDCORE_FILES ?= \
24         $(LINUX_DIR)/sound/soundcore.ko \
25         $(LINUX_DIR)/sound/core/snd.ko \
26         $(LINUX_DIR)/sound/core/snd-hwdep.ko \
27         $(LINUX_DIR)/sound/core/seq/snd-seq-device.ko \
28         $(LINUX_DIR)/sound/core/snd-rawmidi.ko \
29         $(LINUX_DIR)/sound/core/snd-timer.ko \
30         $(LINUX_DIR)/sound/core/snd-pcm.ko \
31         $(LINUX_DIR)/sound/core/oss/snd-mixer-oss.ko \
32         $(LINUX_DIR)/sound/core/oss/snd-pcm-oss.ko \
33         $(LINUX_DIR)/sound/core/snd-compress.ko
34
35 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.12.0)),1)
36 SOUNDCORE_LOAD += \
37         $(if $(CONFIG_SND_DMAENGINE_PCM),snd-pcm-dmaengine)
38
39 SOUNDCORE_FILES += \
40         $(if $(CONFIG_SND_DMAENGINE_PCM),$(LINUX_DIR)/sound/core/snd-pcm-dmaengine.ko)
41 endif
42
43 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.14.0)),1)
44 SOUNDCORE_LOAD += \
45         snd-page-alloc
46
47 SOUNDCORE_FILES += \
48         $(LINUX_DIR)/sound/core/snd-page-alloc.ko
49 endif
50
51 define KernelPackage/sound-core
52   SUBMENU:=$(SOUND_MENU)
53   TITLE:=Sound support
54   DEPENDS:=@AUDIO_SUPPORT
55   KCONFIG:= \
56         CONFIG_SOUND \
57         CONFIG_SND \
58         CONFIG_SND_HWDEP \
59         CONFIG_SND_RAWMIDI \
60         CONFIG_SND_TIMER \
61         CONFIG_SND_PCM \
62         CONFIG_SND_SEQUENCER \
63         CONFIG_SND_VIRMIDI \
64         CONFIG_SND_SEQ_DUMMY \
65         CONFIG_SND_SEQUENCER_OSS=y \
66         CONFIG_HOSTAUDIO \
67         CONFIG_SND_PCM_OSS \
68         CONFIG_SND_MIXER_OSS \
69         CONFIG_SOUND_OSS_CORE_PRECLAIM=y \
70         CONFIG_SND_COMPRESS_OFFLOAD
71   FILES:=$(SOUNDCORE_FILES)
72   AUTOLOAD:=$(call AutoLoad,30,$(SOUNDCORE_LOAD))
73   $(call AddDepends/input)
74 endef
75
76 define KernelPackage/sound-core/uml
77   FILES:= \
78         $(LINUX_DIR)/sound/soundcore.ko \
79         $(LINUX_DIR)/arch/um/drivers/hostaudio.ko
80   AUTOLOAD:=$(call AutoLoad,30,soundcore hostaudio)
81 endef
82
83 define KernelPackage/sound-core/description
84  Kernel modules for sound support
85 endef
86
87 $(eval $(call KernelPackage,sound-core))
88
89
90 define AddDepends/sound
91   SUBMENU:=$(SOUND_MENU)
92   DEPENDS+=kmod-sound-core $(1) @!TARGET_uml
93 endef
94
95
96 define KernelPackage/ac97
97   TITLE:=ac97 controller
98   KCONFIG:=CONFIG_SND_AC97_CODEC
99   FILES:= \
100         $(LINUX_DIR)/sound/ac97_bus.ko \
101         $(LINUX_DIR)/sound/pci/ac97/snd-ac97-codec.ko
102   AUTOLOAD:=$(call AutoLoad,35,ac97_bus snd-ac97-codec)
103   $(call AddDepends/sound)
104 endef
105
106 define KernelPackage/ac97/description
107  The ac97 controller
108 endef
109
110 $(eval $(call KernelPackage,ac97))
111
112
113 define KernelPackage/sound-seq
114   TITLE:=Sequencer support
115   FILES:= \
116         $(LINUX_DIR)/sound/core/seq/snd-seq.ko \
117         $(LINUX_DIR)/sound/core/seq/snd-seq-midi-event.ko \
118         $(LINUX_DIR)/sound/core/seq/snd-seq-midi.ko
119   AUTOLOAD:=$(call AutoLoad,35,snd-seq snd-seq-midi-event snd-seq-midi)
120   $(call AddDepends/sound)
121 endef
122
123 define KernelPackage/sound-seq/description
124  Kernel modules for sequencer support
125 endef
126
127 $(eval $(call KernelPackage,sound-seq))
128
129
130 define KernelPackage/sound-i8x0
131   TITLE:=Intel/SiS/nVidia/AMD/ALi AC97 Controller
132   DEPENDS:=+kmod-ac97
133   KCONFIG:=CONFIG_SND_INTEL8X0
134   FILES:=$(LINUX_DIR)/sound/pci/snd-intel8x0.ko
135   AUTOLOAD:=$(call AutoLoad,36,snd-intel8x0)
136   $(call AddDepends/sound)
137 endef
138
139 define KernelPackage/sound-i8x0/description
140  support for the integrated AC97 sound device on motherboards
141  with Intel/SiS/nVidia/AMD chipsets, or ALi chipsets using
142  the M5455 Audio Controller.
143 endef
144
145 $(eval $(call KernelPackage,sound-i8x0))
146
147
148 define KernelPackage/sound-cs5535audio
149   TITLE:=CS5535 PCI Controller
150   DEPENDS:=+kmod-ac97
151   KCONFIG:=CONFIG_SND_CS5535AUDIO
152   FILES:=$(LINUX_DIR)/sound/pci/cs5535audio/snd-cs5535audio.ko
153   AUTOLOAD:=$(call AutoLoad,36,snd-cs5535audio)
154   $(call AddDepends/sound)
155 endef
156
157 define KernelPackage/sound-cs5535audio/description
158  Support for the integrated AC97 sound device on olpc
159 endef
160
161 $(eval $(call KernelPackage,sound-cs5535audio))
162
163
164 define KernelPackage/sound-soc-core
165   TITLE:=SoC sound support
166   DEPENDS:=+kmod-regmap +kmod-ac97
167   KCONFIG:= \
168         CONFIG_SND_SOC \
169         CONFIG_SND_SOC_DMAENGINE_PCM=y \
170         CONFIG_SND_SOC_ALL_CODECS=n
171   FILES:=$(LINUX_DIR)/sound/soc/snd-soc-core.ko
172   AUTOLOAD:=$(call AutoLoad,55, snd-soc-core)
173   $(call AddDepends/sound)
174 endef
175
176 $(eval $(call KernelPackage,sound-soc-core))
177
178
179 define KernelPackage/sound-soc-ac97
180   TITLE:=AC97 Codec support
181   KCONFIG:=CONFIG_SND_SOC_AC97_CODEC
182   FILES:=$(LINUX_DIR)/sound/soc/codecs/snd-soc-ac97.ko
183   AUTOLOAD:=$(call AutoLoad,57,snd-soc-ac97)
184   DEPENDS:=+kmod-ac97 +kmod-sound-soc-core +TARGET_ep93xx:kmod-sound-soc-ep93xx-ac97
185   $(call AddDepends/sound)
186 endef
187
188 $(eval $(call KernelPackage,sound-soc-ac97))
189
190
191 define KernelPackage/sound-soc-imx
192   TITLE:=IMX SoC support
193   KCONFIG:=\
194         CONFIG_SND_IMX_SOC \
195         CONFIG_SND_SOC_IMX_AUDMUX \
196         CONFIG_SND_SOC_FSL_SSI \
197         CONFIG_SND_SOC_IMX_PCM_DMA
198   FILES:= \
199         $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-audmux.ko \
200         $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
201         $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko
202   AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
203   DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core
204   $(call AddDepends/sound)
205 endef
206
207 define KernelPackage/sound-soc-imx/description
208  Support for i.MX6 Platform sound (ssi/audmux/pcm)
209 endef
210
211 $(eval $(call KernelPackage,sound-soc-imx))
212
213
214 define KernelPackage/sound-soc-imx-sgtl5000
215   TITLE:=IMX SoC support for SGTL5000
216   KCONFIG:=CONFIG_SND_SOC_IMX_SGTL5000
217   FILES:=\
218         $(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko \
219         $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-sgtl5000.ko
220   AUTOLOAD:=$(call AutoLoad,57,snd-soc-sgtl5000 snd-soc-imx-sgtl5000)
221   DEPENDS:=@TARGET_imx6 +kmod-sound-soc-imx
222   $(call AddDepends/sound)
223 endef
224
225 define KernelPackage/sound-soc-imx-sgtl5000/description
226  Support for i.MX6 Platform sound SGTL5000 codec
227 endef
228
229 $(eval $(call KernelPackage,sound-soc-imx-sgtl5000))
230
231
232 define KernelPackage/sound-soc-gw_avila
233   TITLE:=Gateworks Avila SoC sound support
234   KCONFIG:= \
235         CONFIG_SND_GW_AVILA_SOC \
236         CONFIG_SND_GW_AVILA_SOC_PCM \
237         CONFIG_SND_GW_AVILA_SOC_HSS
238   FILES:= \
239         $(LINUX_DIR)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
240         $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila.ko \
241         $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-pcm.ko \
242         $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-hss.ko
243   AUTOLOAD:=$(call AutoLoad,65,snd-soc-tlv320aic3x snd-soc-gw-avila snd-soc-gw-avila-pcm snd-soc-gw-avila-hss)
244   DEPENDS:=@TARGET_ixp4xx +kmod-sound-soc-core
245   $(call AddDepends/sound)
246 endef
247
248 $(eval $(call KernelPackage,sound-soc-gw_avila))
249
250
251 define KernelPackage/pcspkr
252   DEPENDS:=@TARGET_x86
253   TITLE:=PC speaker support
254   KCONFIG:= \
255         CONFIG_INPUT_PCSPKR \
256         CONFIG_SND_PCSP
257   FILES:= \
258         $(LINUX_DIR)/drivers/input/misc/pcspkr.ko \
259         $(LINUX_DIR)/sound/drivers/pcsp/snd-pcsp.ko
260   AUTOLOAD:=$(call AutoLoad,50,pcspkr snd-pcsp)
261   $(call AddDepends/input)
262   $(call AddDepends/sound)
263 endef
264
265 define KernelPackage/pcspkr/description
266  This enables sounds (tones) through the pc speaker
267 endef
268
269 $(eval $(call KernelPackage,pcspkr))