aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_atihdmi.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_atihdmi.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_atihdmi.c')
-rw-r--r--sound/pci/hda/patch_atihdmi.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_atihdmi.c b/sound/pci/hda/patch_atihdmi.c
index 5603a1acddb1..5887b827bb32 100644
--- a/sound/pci/hda/patch_atihdmi.c
+++ b/sound/pci/hda/patch_atihdmi.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
32struct atihdmi_spec { 31struct atihdmi_spec {
33 struct hda_multi_out multiout; 32 struct hda_multi_out multiout;
@@ -187,7 +186,7 @@ static int patch_atihdmi(struct hda_codec *codec)
187/* 186/*
188 * patch entries 187 * patch entries
189 */ 188 */
190struct hda_codec_preset snd_hda_preset_atihdmi[] = { 189static struct hda_codec_preset snd_hda_preset_atihdmi[] = {
191 { .id = 0x1002793c, .name = "ATI RS600 HDMI", .patch = patch_atihdmi }, 190 { .id = 0x1002793c, .name = "ATI RS600 HDMI", .patch = patch_atihdmi },
192 { .id = 0x10027919, .name = "ATI RS600 HDMI", .patch = patch_atihdmi }, 191 { .id = 0x10027919, .name = "ATI RS600 HDMI", .patch = patch_atihdmi },
193 { .id = 0x1002791a, .name = "ATI RS690/780 HDMI", .patch = patch_atihdmi }, 192 { .id = 0x1002791a, .name = "ATI RS690/780 HDMI", .patch = patch_atihdmi },
@@ -196,3 +195,31 @@ struct hda_codec_preset snd_hda_preset_atihdmi[] = {
196 { .id = 0x17e80047, .name = "Chrontel HDMI", .patch = patch_atihdmi }, 195 { .id = 0x17e80047, .name = "Chrontel HDMI", .patch = patch_atihdmi },
197 {} /* terminator */ 196 {} /* terminator */
198}; 197};
198
199MODULE_ALIAS("snd-hda-codec-id:1002793c");
200MODULE_ALIAS("snd-hda-codec-id:10027919");
201MODULE_ALIAS("snd-hda-codec-id:1002791a");
202MODULE_ALIAS("snd-hda-codec-id:1002aa01");
203MODULE_ALIAS("snd-hda-codec-id:10951390");
204MODULE_ALIAS("snd-hda-codec-id:17e80047");
205
206MODULE_LICENSE("GPL");
207MODULE_DESCRIPTION("ATI HDMI HD-audio codec");
208
209static struct hda_codec_preset_list atihdmi_list = {
210 .preset = snd_hda_preset_atihdmi,
211 .owner = THIS_MODULE,
212};
213
214static int __init patch_atihdmi_init(void)
215{
216 return snd_hda_add_codec_preset(&atihdmi_list);
217}
218
219static void __exit patch_atihdmi_exit(void)
220{
221 snd_hda_delete_codec_preset(&atihdmi_list);
222}
223
224module_init(patch_atihdmi_init)
225module_exit(patch_atihdmi_exit)