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