1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37#include <linux/module.h>
38#include <linux/moduleparam.h>
39#include <linux/device.h>
40#include <asm/dma.h>
41
42#include <sound/core.h>
43#include <sound/pcm.h>
44#include <sound/soc.h>
45
46#include <linux/gpio.h>
47#include <asm/portmux.h>
48
49#include "../codecs/ad1980.h"
50
51#include "bf5xx-ac97.h"
52
53static struct snd_soc_card bf5xx_board;
54
55static struct snd_soc_dai_link bf5xx_board_dai[] = {
56 {
57 .name = "AC97",
58 .stream_name = "AC97 HiFi",
59 .cpu_dai_name = "bfin-ac97.0",
60 .codec_dai_name = "ad1980-hifi",
61 .platform_name = "bfin-ac97-pcm-audio",
62 .codec_name = "ad1980",
63 },
64 {
65 .name = "AC97",
66 .stream_name = "AC97 HiFi",
67 .cpu_dai_name = "bfin-ac97.1",
68 .codec_dai_name = "ad1980-hifi",
69 .platform_name = "bfin-ac97-pcm-audio",
70 .codec_name = "ad1980",
71 },
72};
73
74static struct snd_soc_card bf5xx_board = {
75 .name = "bfin-ad1980",
76 .owner = THIS_MODULE,
77 .dai_link = &bf5xx_board_dai[CONFIG_SND_BF5XX_SPORT_NUM],
78 .num_links = 1,
79};
80
81static struct platform_device *bf5xx_board_snd_device;
82
83static int __init bf5xx_board_init(void)
84{
85 int ret;
86
87 bf5xx_board_snd_device = platform_device_alloc("soc-audio", -1);
88 if (!bf5xx_board_snd_device)
89 return -ENOMEM;
90
91 platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board);
92 ret = platform_device_add(bf5xx_board_snd_device);
93
94 if (ret)
95 platform_device_put(bf5xx_board_snd_device);
96
97 return ret;
98}
99
100static void __exit bf5xx_board_exit(void)
101{
102 platform_device_unregister(bf5xx_board_snd_device);
103}
104
105module_init(bf5xx_board_init);
106module_exit(bf5xx_board_exit);
107
108
109MODULE_AUTHOR("Cliff Cai");
110MODULE_DESCRIPTION("ALSA SoC AD1980/1 BF5xx board (Obsolete)");
111MODULE_LICENSE("GPL");
112