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/patch_conexant.c | |
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/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 076010708152..b20e1cede00b 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <sound/core.h> | 27 | #include <sound/core.h> |
28 | #include "hda_codec.h" | 28 | #include "hda_codec.h" |
29 | #include "hda_local.h" | 29 | #include "hda_local.h" |
30 | #include "hda_patch.h" | ||
31 | 30 | ||
32 | #define CXT_PIN_DIR_IN 0x00 | 31 | #define CXT_PIN_DIR_IN 0x00 |
33 | #define CXT_PIN_DIR_OUT 0x01 | 32 | #define CXT_PIN_DIR_OUT 0x01 |
@@ -1771,7 +1770,7 @@ static int patch_cxt5051(struct hda_codec *codec) | |||
1771 | /* | 1770 | /* |
1772 | */ | 1771 | */ |
1773 | 1772 | ||
1774 | struct hda_codec_preset snd_hda_preset_conexant[] = { | 1773 | static struct hda_codec_preset snd_hda_preset_conexant[] = { |
1775 | { .id = 0x14f15045, .name = "CX20549 (Venice)", | 1774 | { .id = 0x14f15045, .name = "CX20549 (Venice)", |
1776 | .patch = patch_cxt5045 }, | 1775 | .patch = patch_cxt5045 }, |
1777 | { .id = 0x14f15047, .name = "CX20551 (Waikiki)", | 1776 | { .id = 0x14f15047, .name = "CX20551 (Waikiki)", |
@@ -1780,3 +1779,28 @@ struct hda_codec_preset snd_hda_preset_conexant[] = { | |||
1780 | .patch = patch_cxt5051 }, | 1779 | .patch = patch_cxt5051 }, |
1781 | {} /* terminator */ | 1780 | {} /* terminator */ |
1782 | }; | 1781 | }; |
1782 | |||
1783 | MODULE_ALIAS("snd-hda-codec-id:14f15045"); | ||
1784 | MODULE_ALIAS("snd-hda-codec-id:14f15047"); | ||
1785 | MODULE_ALIAS("snd-hda-codec-id:14f15051"); | ||
1786 | |||
1787 | MODULE_LICENSE("GPL"); | ||
1788 | MODULE_DESCRIPTION("Conexant HD-audio codec"); | ||
1789 | |||
1790 | static struct hda_codec_preset_list conexant_list = { | ||
1791 | .preset = snd_hda_preset_conexant, | ||
1792 | .owner = THIS_MODULE, | ||
1793 | }; | ||
1794 | |||
1795 | static int __init patch_conexant_init(void) | ||
1796 | { | ||
1797 | return snd_hda_add_codec_preset(&conexant_list); | ||
1798 | } | ||
1799 | |||
1800 | static void __exit patch_conexant_exit(void) | ||
1801 | { | ||
1802 | snd_hda_delete_codec_preset(&conexant_list); | ||
1803 | } | ||
1804 | |||
1805 | module_init(patch_conexant_init) | ||
1806 | module_exit(patch_conexant_exit) | ||