2 * Copyright (c) 2010 Nuvoton technology corporation.
4 * Wan ZongShun <mcuos.com@gmail.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation;version 2 of the License.
12 #include <linux/module.h>
13 #include <linux/moduleparam.h>
14 #include <linux/timer.h>
15 #include <linux/interrupt.h>
16 #include <linux/platform_device.h>
18 #include <sound/core.h>
19 #include <sound/pcm.h>
20 #include <sound/soc.h>
21 #include <sound/soc-dapm.h>
23 #include "../codecs/ac97.h"
24 #include "nuc900-audio.h"
26 static struct snd_soc_dai_link nuc900evb_ac97_dai = {
28 .stream_name = "AC97 HiFi",
29 .cpu_dai = &nuc900_ac97_dai,
30 .codec_dai = &ac97_dai,
33 static struct snd_soc_card nuc900evb_audio_machine = {
34 .name = "NUC900EVB_AC97",
35 .dai_link = &nuc900evb_ac97_dai,
37 .platform = &nuc900_soc_platform,
40 static struct snd_soc_device nuc900evb_ac97_devdata = {
41 .card = &nuc900evb_audio_machine,
42 .codec_dev = &soc_codec_dev_ac97,
45 static struct platform_device *nuc900evb_asoc_dev;
47 static int __init nuc900evb_audio_init(void)
52 nuc900evb_asoc_dev = platform_device_alloc("soc-audio", -1);
53 if (!nuc900evb_asoc_dev)
56 /* nuc900 board audio device */
57 platform_set_drvdata(nuc900evb_asoc_dev, &nuc900evb_ac97_devdata);
59 nuc900evb_ac97_devdata.dev = &nuc900evb_asoc_dev->dev;
60 ret = platform_device_add(nuc900evb_asoc_dev);
63 platform_device_put(nuc900evb_asoc_dev);
64 nuc900evb_asoc_dev = NULL;
71 static void __exit nuc900evb_audio_exit(void)
73 platform_device_unregister(nuc900evb_asoc_dev);
76 module_init(nuc900evb_audio_init);
77 module_exit(nuc900evb_audio_exit);
79 MODULE_LICENSE("GPL");
80 MODULE_DESCRIPTION("NUC900 Series ASoC audio support");
81 MODULE_AUTHOR("Wan ZongShun");