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_realtek.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_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9cd2545d988..ba640d36d64 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <sound/core.h> | 30 | #include <sound/core.h> |
31 | #include "hda_codec.h" | 31 | #include "hda_codec.h" |
32 | #include "hda_local.h" | 32 | #include "hda_local.h" |
33 | #include "hda_patch.h" | ||
34 | 33 | ||
35 | #define ALC880_FRONT_EVENT 0x01 | 34 | #define ALC880_FRONT_EVENT 0x01 |
36 | #define ALC880_DCVOL_EVENT 0x02 | 35 | #define ALC880_DCVOL_EVENT 0x02 |
@@ -16579,7 +16578,7 @@ static int patch_alc662(struct hda_codec *codec) | |||
16579 | /* | 16578 | /* |
16580 | * patch entries | 16579 | * patch entries |
16581 | */ | 16580 | */ |
16582 | struct hda_codec_preset snd_hda_preset_realtek[] = { | 16581 | static struct hda_codec_preset snd_hda_preset_realtek[] = { |
16583 | { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, | 16582 | { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, |
16584 | { .id = 0x10ec0262, .name = "ALC262", .patch = patch_alc262 }, | 16583 | { .id = 0x10ec0262, .name = "ALC262", .patch = patch_alc262 }, |
16585 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, | 16584 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, |
@@ -16611,3 +16610,26 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16611 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, | 16610 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, |
16612 | {} /* terminator */ | 16611 | {} /* terminator */ |
16613 | }; | 16612 | }; |
16613 | |||
16614 | MODULE_ALIAS("snd-hda-codec-id:10ec*"); | ||
16615 | |||
16616 | MODULE_LICENSE("GPL"); | ||
16617 | MODULE_DESCRIPTION("Realtek HD-audio codec"); | ||
16618 | |||
16619 | static struct hda_codec_preset_list realtek_list = { | ||
16620 | .preset = snd_hda_preset_realtek, | ||
16621 | .owner = THIS_MODULE, | ||
16622 | }; | ||
16623 | |||
16624 | static int __init patch_realtek_init(void) | ||
16625 | { | ||
16626 | return snd_hda_add_codec_preset(&realtek_list); | ||
16627 | } | ||
16628 | |||
16629 | static void __exit patch_realtek_exit(void) | ||
16630 | { | ||
16631 | snd_hda_delete_codec_preset(&realtek_list); | ||
16632 | } | ||
16633 | |||
16634 | module_init(patch_realtek_init) | ||
16635 | module_exit(patch_realtek_exit) | ||