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/hda_codec.h | |
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/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 9fe0b67bb1e4..586ea08b340b 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -642,6 +642,16 @@ struct hda_codec_preset { | |||
642 | int (*patch)(struct hda_codec *codec); | 642 | int (*patch)(struct hda_codec *codec); |
643 | }; | 643 | }; |
644 | 644 | ||
645 | struct hda_codec_preset_list { | ||
646 | const struct hda_codec_preset *preset; | ||
647 | struct module *owner; | ||
648 | struct list_head list; | ||
649 | }; | ||
650 | |||
651 | /* initial hook */ | ||
652 | int snd_hda_add_codec_preset(struct hda_codec_preset_list *preset); | ||
653 | int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset); | ||
654 | |||
645 | /* ops set by the preset patch */ | 655 | /* ops set by the preset patch */ |
646 | struct hda_codec_ops { | 656 | struct hda_codec_ops { |
647 | int (*build_controls)(struct hda_codec *codec); | 657 | int (*build_controls)(struct hda_codec *codec); |
@@ -735,6 +745,7 @@ struct hda_codec { | |||
735 | 745 | ||
736 | /* detected preset */ | 746 | /* detected preset */ |
737 | const struct hda_codec_preset *preset; | 747 | const struct hda_codec_preset *preset; |
748 | struct module *owner; | ||
738 | const char *name; /* codec name */ | 749 | const char *name; /* codec name */ |
739 | const char *modelname; /* model name for preset */ | 750 | const char *modelname; /* model name for preset */ |
740 | 751 | ||