diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-27 09:47:11 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-27 09:47:11 -0500 |
commit | 1289e9e8b42f973f2ab39e5f4f2239ff826c27e9 (patch) | |
tree | f0462154211f734f278e981a5d5ae1ec66f1fb03 /sound/pci/hda/Makefile | |
parent | 30d72e9f614e7bd76e28d4d92bd54d90a96905bb (diff) |
ALSA: hda - Modularize HD-audio driver
Split the monolithc HD-audio driver into several pieces:
- snd-hda-intel HD-audio PCI controller driver; loaded via udev
- snd-hda-codec HD-audio codec bus driver
- snd-hda-codec-* Specific HD-audio codec drivers
When built as modules, snd-hda-codec (that is invoked by snd-hda-intel)
looks up the codec vendor ID and loads the corresponding codec module
automatically via request_module().
When built in a kernel, each codec drivers are statically hooked up
before probing the PCI.
This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module
information for each driver, and driver-linking codes between
codec-bus and codec drivers.
TODO:
- Avoid EXPORT_SYMBOL*() when built-in kernel
- Restore __devinit appropriately depending on the condition
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/Makefile')
-rw-r--r-- | sound/pci/hda/Makefile | 77 |
1 files changed, 57 insertions, 20 deletions
diff --git a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile index 6daf5fd9a279..50f9d0967251 100644 --- a/sound/pci/hda/Makefile +++ b/sound/pci/hda/Makefile | |||
@@ -1,22 +1,59 @@ | |||
1 | snd-hda-intel-y := hda_intel.o | 1 | snd-hda-intel-objs := hda_intel.o |
2 | # since snd-hda-intel is the only driver using hda-codec, | ||
3 | # merge it into a single module although it was originally | ||
4 | # designed to be individual modules | ||
5 | snd-hda-intel-y += hda_codec.o | ||
6 | snd-hda-intel-$(CONFIG_PROC_FS) += hda_proc.o | ||
7 | snd-hda-intel-$(CONFIG_SND_HDA_ELD) += hda_eld.o | ||
8 | snd-hda-intel-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o | ||
9 | snd-hda-intel-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o | ||
10 | snd-hda-intel-$(CONFIG_SND_HDA_GENERIC) += hda_generic.o | ||
11 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_REALTEK) += patch_realtek.o | ||
12 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CMEDIA) += patch_cmedia.o | ||
13 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_ANALOG) += patch_analog.o | ||
14 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_SIGMATEL) += patch_sigmatel.o | ||
15 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_SI3054) += patch_si3054.o | ||
16 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_ATIHDMI) += patch_atihdmi.o | ||
17 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CONEXANT) += patch_conexant.o | ||
18 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_VIA) += patch_via.o | ||
19 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_NVHDMI) += patch_nvhdmi.o | ||
20 | snd-hda-intel-$(CONFIG_SND_HDA_CODEC_INTELHDMI) += patch_intelhdmi.o | ||
21 | 2 | ||
3 | snd-hda-codec-y := hda_codec.o | ||
4 | snd-hda-codec-$(CONFIG_SND_HDA_GENERIC) += hda_generic.o | ||
5 | snd-hda-codec-$(CONFIG_PROC_FS) += hda_proc.o | ||
6 | # snd-hda-codec-$(CONFIG_SND_HDA_ELD) += hda_eld.o | ||
7 | snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o | ||
8 | snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o | ||
9 | |||
10 | snd-hda-codec-realtek-objs := patch_realtek.o | ||
11 | snd-hda-codec-cmedia-objs := patch_cmedia.o | ||
12 | snd-hda-codec-analog-objs := patch_analog.o | ||
13 | snd-hda-codec-idt-objs := patch_sigmatel.o | ||
14 | snd-hda-codec-si3054-objs := patch_si3054.o | ||
15 | snd-hda-codec-atihdmi-objs := patch_atihdmi.o | ||
16 | snd-hda-codec-conexant-objs := patch_conexant.o | ||
17 | snd-hda-codec-via-objs := patch_via.o | ||
18 | snd-hda-codec-nvhdmi-objs := patch_nvhdmi.o | ||
19 | snd-hda-codec-intelhdmi-objs := patch_intelhdmi.o hda_eld.o | ||
20 | |||
21 | # common driver | ||
22 | obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o | ||
23 | |||
24 | # codec drivers (note: CONFIG_SND_HDA_CODEC_XXX are booleans) | ||
25 | ifdef CONFIG_SND_HDA_CODEC_REALTEK | ||
26 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-realtek.o | ||
27 | endif | ||
28 | ifdef CONFIG_SND_HDA_CODEC_CMEDIA | ||
29 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-cmedia.o | ||
30 | endif | ||
31 | ifdef CONFIG_SND_HDA_CODEC_ANALOG | ||
32 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-analog.o | ||
33 | endif | ||
34 | ifdef CONFIG_SND_HDA_CODEC_SIGMATEL | ||
35 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-idt.o | ||
36 | endif | ||
37 | ifdef CONFIG_SND_HDA_CODEC_SI3054 | ||
38 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-si3054.o | ||
39 | endif | ||
40 | ifdef CONFIG_SND_HDA_CODEC_ATIHDMI | ||
41 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-atihdmi.o | ||
42 | endif | ||
43 | ifdef CONFIG_SND_HDA_CODEC_CONEXANT | ||
44 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-conexant.o | ||
45 | endif | ||
46 | ifdef CONFIG_SND_HDA_CODEC_VIA | ||
47 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-via.o | ||
48 | endif | ||
49 | ifdef CONFIG_SND_HDA_CODEC_NVHDMI | ||
50 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-nvhdmi.o | ||
51 | endif | ||
52 | ifdef CONFIG_SND_HDA_CODEC_INTELHDMI | ||
53 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-intelhdmi.o | ||
54 | endif | ||
55 | |||
56 | # this must be the last entry after codec drivers; | ||
57 | # otherwise the codec patches won't be hooked before the PCI probe | ||
58 | # when built in kernel | ||
22 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o | 59 | obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o |