1
2
3
4
5
6
7
8
9
10#include <linux/module.h>
11#include <sound/soc.h>
12
13#include "s3c24xx_simtec.h"
14
15
16
17
18
19
20
21
22
23
24
25
26static const struct snd_soc_dapm_widget dapm_widgets[] = {
27 SND_SOC_DAPM_HP("Headphone Jack", NULL),
28 SND_SOC_DAPM_LINE("Line In", NULL),
29 SND_SOC_DAPM_LINE("Line Out", NULL),
30 SND_SOC_DAPM_MIC("Mic Jack", NULL),
31};
32
33static const struct snd_soc_dapm_route base_map[] = {
34 { "Headphone Jack", NULL, "LHPOUT"},
35 { "Headphone Jack", NULL, "RHPOUT"},
36
37 { "Line Out", NULL, "LOUT" },
38 { "Line Out", NULL, "ROUT" },
39
40 { "LLINEIN", NULL, "Line In"},
41 { "RLINEIN", NULL, "Line In"},
42
43 { "MICIN", NULL, "Mic Jack"},
44};
45
46
47
48
49
50
51
52
53static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
54{
55 simtec_audio_init(rtd);
56
57 return 0;
58}
59
60static struct snd_soc_dai_link simtec_dai_aic23 = {
61 .name = "tlv320aic23",
62 .stream_name = "TLV320AIC23",
63 .codec_name = "tlv320aic3x-codec.0-001a",
64 .cpu_dai_name = "s3c24xx-iis",
65 .codec_dai_name = "tlv320aic3x-hifi",
66 .platform_name = "s3c24xx-iis",
67 .init = simtec_tlv320aic23_init,
68};
69
70
71static struct snd_soc_card snd_soc_machine_simtec_aic23 = {
72 .name = "Simtec",
73 .owner = THIS_MODULE,
74 .dai_link = &simtec_dai_aic23,
75 .num_links = 1,
76
77 .dapm_widgets = dapm_widgets,
78 .num_dapm_widgets = ARRAY_SIZE(dapm_widgets),
79 .dapm_routes = base_map,
80 .num_dapm_routes = ARRAY_SIZE(base_map),
81};
82
83static int simtec_audio_tlv320aic23_probe(struct platform_device *pd)
84{
85 return simtec_audio_core_probe(pd, &snd_soc_machine_simtec_aic23);
86}
87
88static struct platform_driver simtec_audio_tlv320aic23_driver = {
89 .driver = {
90 .name = "s3c24xx-simtec-tlv320aic23",
91 .pm = simtec_audio_pm,
92 },
93 .probe = simtec_audio_tlv320aic23_probe,
94 .remove = simtec_audio_remove,
95};
96
97module_platform_driver(simtec_audio_tlv320aic23_driver);
98
99MODULE_ALIAS("platform:s3c24xx-simtec-tlv320aic23");
100MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
101MODULE_DESCRIPTION("ALSA SoC Simtec Audio support");
102MODULE_LICENSE("GPL");
103