kernel: Add dummy sound driver
[openwrt/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 SOUNDCORE_LOAD += \
36 $(if $(CONFIG_SND_DMAENGINE_PCM),snd-pcm-dmaengine)
37
38 SOUNDCORE_FILES += \
39 $(if $(CONFIG_SND_DMAENGINE_PCM),$(LINUX_DIR)/sound/core/snd-pcm-dmaengine.ko)
40
41 define KernelPackage/sound-core
42 SUBMENU:=$(SOUND_MENU)
43 TITLE:=Sound support
44 DEPENDS:=@AUDIO_SUPPORT +kmod-input-core
45 KCONFIG:= \
46 CONFIG_SOUND \
47 CONFIG_SND \
48 CONFIG_SND_HWDEP \
49 CONFIG_SND_RAWMIDI \
50 CONFIG_SND_TIMER \
51 CONFIG_SND_PCM \
52 CONFIG_SND_SEQUENCER \
53 CONFIG_SND_VIRMIDI \
54 CONFIG_SND_SEQ_DUMMY \
55 CONFIG_SND_SEQUENCER_OSS=y \
56 CONFIG_HOSTAUDIO \
57 CONFIG_SND_PCM_OSS \
58 CONFIG_SND_MIXER_OSS \
59 CONFIG_SOUND_OSS_CORE_PRECLAIM=y \
60 CONFIG_SND_COMPRESS_OFFLOAD
61 FILES:=$(SOUNDCORE_FILES)
62 AUTOLOAD:=$(call AutoLoad,30,$(SOUNDCORE_LOAD))
63 endef
64
65 define KernelPackage/sound-core/uml
66 FILES:= \
67 $(LINUX_DIR)/sound/soundcore.ko \
68 $(LINUX_DIR)/arch/um/drivers/hostaudio.ko
69 AUTOLOAD:=$(call AutoLoad,30,soundcore hostaudio)
70 endef
71
72 define KernelPackage/sound-core/description
73 Kernel modules for sound support
74 endef
75
76 $(eval $(call KernelPackage,sound-core))
77
78
79 define AddDepends/sound
80 SUBMENU:=$(SOUND_MENU)
81 DEPENDS+=kmod-sound-core $(1) @!TARGET_uml
82 endef
83
84
85 define KernelPackage/ac97
86 TITLE:=ac97 controller
87 KCONFIG:=CONFIG_SND_AC97_CODEC
88 FILES:= \
89 $(LINUX_DIR)/sound/ac97_bus.ko \
90 $(LINUX_DIR)/sound/pci/ac97/snd-ac97-codec.ko
91 AUTOLOAD:=$(call AutoLoad,35,ac97_bus snd-ac97-codec)
92 $(call AddDepends/sound)
93 endef
94
95 define KernelPackage/ac97/description
96 The ac97 controller
97 endef
98
99 $(eval $(call KernelPackage,ac97))
100
101
102 define KernelPackage/sound-mpu401
103 TITLE:=MPU-401 uart driver
104 KCONFIG:=CONFIG_SND_MPU401_UART
105 FILES:= \
106 $(LINUX_DIR)/sound/drivers/mpu401/snd-mpu401-uart.ko
107 AUTOLOAD:=$(call AutoLoad,35,snd-mpu401-uart)
108 $(call AddDepends/sound)
109 endef
110
111 define KernelPackage/sound-mpu401/description
112 support for MIDI ports compatible with the Roland MPU-401
113 interface in UART mode.
114 endef
115
116 $(eval $(call KernelPackage,sound-mpu401))
117
118
119 define KernelPackage/sound-seq
120 TITLE:=Sequencer support
121 FILES:= \
122 $(LINUX_DIR)/sound/core/seq/snd-seq.ko \
123 $(LINUX_DIR)/sound/core/seq/snd-seq-midi-event.ko \
124 $(LINUX_DIR)/sound/core/seq/snd-seq-midi.ko
125 AUTOLOAD:=$(call AutoLoad,35,snd-seq snd-seq-midi-event snd-seq-midi)
126 $(call AddDepends/sound)
127 endef
128
129 define KernelPackage/sound-seq/description
130 Kernel modules for sequencer support
131 endef
132
133 $(eval $(call KernelPackage,sound-seq))
134
135
136 define KernelPackage/sound-i8x0
137 TITLE:=Intel/SiS/nVidia/AMD/ALi AC97 Controller
138 DEPENDS:=+kmod-ac97
139 KCONFIG:=CONFIG_SND_INTEL8X0
140 FILES:=$(LINUX_DIR)/sound/pci/snd-intel8x0.ko
141 AUTOLOAD:=$(call AutoLoad,36,snd-intel8x0)
142 $(call AddDepends/sound)
143 endef
144
145 define KernelPackage/sound-i8x0/description
146 support for the integrated AC97 sound device on motherboards
147 with Intel/SiS/nVidia/AMD chipsets, or ALi chipsets using
148 the M5455 Audio Controller.
149 endef
150
151 $(eval $(call KernelPackage,sound-i8x0))
152
153
154 define KernelPackage/sound-via82xx
155 TITLE:=VIA 82xx AC97 Controller
156 DEPENDS:=+kmod-ac97 +kmod-sound-mpu401
157 KCONFIG:=CONFIG_SND_VIA82XX
158 FILES:=$(LINUX_DIR)/sound/pci/snd-via82xx.ko
159 AUTOLOAD:=$(call AutoLoad,36,snd-via82xx)
160 $(call AddDepends/sound)
161 endef
162
163 define KernelPackage/sound-via82xx/description
164 support for the integrated AC97 sound device on motherboards
165 with VIA chipsets.
166 endef
167
168 $(eval $(call KernelPackage,sound-via82xx))
169
170
171 define KernelPackage/sound-soc-core
172 TITLE:=SoC sound support
173 DEPENDS:=+kmod-regmap +kmod-ac97
174 KCONFIG:= \
175 CONFIG_SND_SOC \
176 CONFIG_SND_SOC_DMAENGINE_PCM=y \
177 CONFIG_SND_SOC_ALL_CODECS=n
178 FILES:=$(LINUX_DIR)/sound/soc/snd-soc-core.ko
179 AUTOLOAD:=$(call AutoLoad,55, snd-soc-core)
180 $(call AddDepends/sound)
181 endef
182
183 $(eval $(call KernelPackage,sound-soc-core))
184
185
186 define KernelPackage/sound-soc-ac97
187 TITLE:=AC97 Codec support
188 KCONFIG:=CONFIG_SND_SOC_AC97_CODEC
189 FILES:=$(LINUX_DIR)/sound/soc/codecs/snd-soc-ac97.ko
190 AUTOLOAD:=$(call AutoLoad,57,snd-soc-ac97)
191 DEPENDS:=+kmod-ac97 +kmod-sound-soc-core
192 $(call AddDepends/sound)
193 endef
194
195 $(eval $(call KernelPackage,sound-soc-ac97))
196
197
198 define KernelPackage/sound-soc-imx
199 TITLE:=IMX SoC support
200 KCONFIG:=\
201 CONFIG_SND_IMX_SOC \
202 CONFIG_SND_SOC_IMX_AUDMUX \
203 CONFIG_SND_SOC_FSL_SSI \
204 CONFIG_SND_SOC_IMX_PCM_DMA
205 FILES:= \
206 $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-audmux.ko \
207 $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
208 $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko
209 AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
210 DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core
211 $(call AddDepends/sound)
212 endef
213
214 define KernelPackage/sound-soc-imx/description
215 Support for i.MX6 Platform sound (ssi/audmux/pcm)
216 endef
217
218 $(eval $(call KernelPackage,sound-soc-imx))
219
220
221 define KernelPackage/sound-soc-imx-sgtl5000
222 TITLE:=IMX SoC support for SGTL5000
223 KCONFIG:=CONFIG_SND_SOC_IMX_SGTL5000
224 FILES:=\
225 $(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko \
226 $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-sgtl5000.ko
227 AUTOLOAD:=$(call AutoLoad,57,snd-soc-sgtl5000 snd-soc-imx-sgtl5000)
228 DEPENDS:=@TARGET_imx6 +kmod-sound-soc-imx
229 $(call AddDepends/sound)
230 endef
231
232 define KernelPackage/sound-soc-imx-sgtl5000/description
233 Support for i.MX6 Platform sound SGTL5000 codec
234 endef
235
236 $(eval $(call KernelPackage,sound-soc-imx-sgtl5000))
237
238
239 define KernelPackage/sound-soc-gw_avila
240 TITLE:=Gateworks Avila SoC sound support
241 KCONFIG:= \
242 CONFIG_SND_GW_AVILA_SOC \
243 CONFIG_SND_GW_AVILA_SOC_PCM \
244 CONFIG_SND_GW_AVILA_SOC_HSS
245 FILES:= \
246 $(LINUX_DIR)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
247 $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila.ko \
248 $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-pcm.ko \
249 $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-hss.ko
250 AUTOLOAD:=$(call AutoLoad,65,snd-soc-tlv320aic3x snd-soc-gw-avila snd-soc-gw-avila-pcm snd-soc-gw-avila-hss)
251 DEPENDS:=@TARGET_ixp4xx +kmod-sound-soc-core
252 $(call AddDepends/sound)
253 endef
254
255 $(eval $(call KernelPackage,sound-soc-gw_avila))
256
257
258 define KernelPackage/pcspkr
259 DEPENDS:=@TARGET_x86 +kmod-input-core
260 TITLE:=PC speaker support
261 KCONFIG:= \
262 CONFIG_INPUT_PCSPKR \
263 CONFIG_SND_PCSP
264 FILES:= \
265 $(LINUX_DIR)/drivers/input/misc/pcspkr.ko \
266 $(LINUX_DIR)/sound/drivers/pcsp/snd-pcsp.ko
267 AUTOLOAD:=$(call AutoLoad,50,pcspkr snd-pcsp)
268 $(call AddDepends/sound)
269 endef
270
271 define KernelPackage/pcspkr/description
272 This enables sounds (tones) through the pc speaker
273 endef
274
275 $(eval $(call KernelPackage,pcspkr))
276
277 define KernelPackage/sound-dummy
278 $(call AddDepends/sound)
279 TITLE:=Null sound output driver (sink)
280 KCONFIG:= \
281 CONFIG_SND_DUMMY
282 FILES:= \
283 $(LINUX_DIR)/sound/drivers/snd-dummy.ko
284 AUTOLOAD:=$(call AutoLoad,32,snd-dummy)
285 endef
286
287 define KernelPackage/sound_dummy/description
288 Dummy sound device for Alsa when no hardware present
289 endef
290
291 $(eval $(call KernelPackage,sound-dummy))