aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-27 09:47:11 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-27 09:47:11 -0500
commit1289e9e8b42f973f2ab39e5f4f2239ff826c27e9 (patch)
treef0462154211f734f278e981a5d5ae1ec66f1fb03 /sound/pci/hda/patch_sigmatel.c
parent30d72e9f614e7bd76e28d4d92bd54d90a96905bb (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_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 70181d500536..9e07f44ab28a 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -33,7 +33,6 @@
33#include <sound/jack.h> 33#include <sound/jack.h>
34#include "hda_codec.h" 34#include "hda_codec.h"
35#include "hda_local.h" 35#include "hda_local.h"
36#include "hda_patch.h"
37#include "hda_beep.h" 36#include "hda_beep.h"
38 37
39enum { 38enum {
@@ -5455,7 +5454,7 @@ static int patch_stac9872(struct hda_codec *codec)
5455/* 5454/*
5456 * patch entries 5455 * patch entries
5457 */ 5456 */
5458struct hda_codec_preset snd_hda_preset_sigmatel[] = { 5457static struct hda_codec_preset snd_hda_preset_sigmatel[] = {
5459 { .id = 0x83847690, .name = "STAC9200", .patch = patch_stac9200 }, 5458 { .id = 0x83847690, .name = "STAC9200", .patch = patch_stac9200 },
5460 { .id = 0x83847882, .name = "STAC9220 A1", .patch = patch_stac922x }, 5459 { .id = 0x83847882, .name = "STAC9220 A1", .patch = patch_stac922x },
5461 { .id = 0x83847680, .name = "STAC9221 A1", .patch = patch_stac922x }, 5460 { .id = 0x83847680, .name = "STAC9221 A1", .patch = patch_stac922x },
@@ -5519,3 +5518,27 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = {
5519 { .id = 0x111d76b7, .name = "92HD71B5X", .patch = patch_stac92hd71bxx }, 5518 { .id = 0x111d76b7, .name = "92HD71B5X", .patch = patch_stac92hd71bxx },
5520 {} /* terminator */ 5519 {} /* terminator */
5521}; 5520};
5521
5522MODULE_ALIAS("snd-hda-codec-id:8384*");
5523MODULE_ALIAS("snd-hda-codec-id:111d*");
5524
5525MODULE_LICENSE("GPL");
5526MODULE_DESCRIPTION("IDT/Sigmatel HD-audio codec");
5527
5528static struct hda_codec_preset_list sigmatel_list = {
5529 .preset = snd_hda_preset_sigmatel,
5530 .owner = THIS_MODULE,
5531};
5532
5533static int __init patch_sigmatel_init(void)
5534{
5535 return snd_hda_add_codec_preset(&sigmatel_list);
5536}
5537
5538static void __exit patch_sigmatel_exit(void)
5539{
5540 snd_hda_delete_codec_preset(&sigmatel_list);
5541}
5542
5543module_init(patch_sigmatel_init)
5544module_exit(patch_sigmatel_exit)