aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/smdk_wm9713.c
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-11-22 01:37:25 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-23 09:13:04 -0500
commit5033f43c66754296dfb0ac5c895208e4a7f93aac (patch)
tree343b6a07674afb35e026191c97bc6bc2f329f5bc /sound/soc/samsung/smdk_wm9713.c
parenta964f34d8b516633d471191156963bae0d1bf730 (diff)
ASoC: Samsung: Rename from s3c24xx to samsung
Finally, move the 's3c24xx' directory to 'samsung' Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung/smdk_wm9713.c')
-rw-r--r--sound/soc/samsung/smdk_wm9713.c107
1 files changed, 107 insertions, 0 deletions
diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c
new file mode 100644
index 00000000000..7ce243086e7
--- /dev/null
+++ b/sound/soc/samsung/smdk_wm9713.c
@@ -0,0 +1,107 @@
1/*
2 * smdk_wm9713.c -- SoC audio for SMDK
3 *
4 * Copyright 2010 Samsung Electronics Co. Ltd.
5 * Author: Jaswinder Singh Brar <jassi.brar@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
11 *
12 */
13
14#include <linux/module.h>
15#include <linux/device.h>
16#include <sound/soc.h>
17
18#include "dma.h"
19#include "ac97.h"
20
21static struct snd_soc_card smdk;
22
23/*
24 * Default CFG switch settings to use this driver:
25 *
26 * SMDK6410: Set CFG1 1-3 On, CFG2 1-4 Off
27 * SMDKC100: Set CFG6 1-3 On, CFG7 1 On
28 * SMDKC110: Set CFGB10 1-2 Off, CFGB12 1-3 On
29 * SMDKV210: Set CFGB10 1-2 Off, CFGB12 1-3 On
30 */
31
32/*
33 Playback (HeadPhone):-
34 $ amixer sset 'Headphone' unmute
35 $ amixer sset 'Right Headphone Out Mux' 'Headphone'
36 $ amixer sset 'Left Headphone Out Mux' 'Headphone'
37 $ amixer sset 'Right HP Mixer PCM' unmute
38 $ amixer sset 'Left HP Mixer PCM' unmute
39
40 Capture (LineIn):-
41 $ amixer sset 'Right Capture Source' 'Line'
42 $ amixer sset 'Left Capture Source' 'Line'
43*/
44
45static struct snd_soc_dai_link smdk_dai = {
46 .name = "AC97",
47 .stream_name = "AC97 PCM",
48 .platform_name = "samsung-audio",
49 .cpu_dai_name = "samsung-ac97",
50 .codec_dai_name = "wm9713-hifi",
51 .codec_name = "wm9713-codec",
52};
53
54static struct snd_soc_card smdk = {
55 .name = "SMDK WM9713",
56 .dai_link = &smdk_dai,
57 .num_links = 1,
58};
59
60static struct platform_device *smdk_snd_wm9713_device;
61static struct platform_device *smdk_snd_ac97_device;
62
63static int __init smdk_init(void)
64{
65 int ret;
66
67 smdk_snd_wm9713_device = platform_device_alloc("wm9713-codec", -1);
68 if (!smdk_snd_wm9713_device)
69 return -ENOMEM;
70
71 ret = platform_device_add(smdk_snd_wm9713_device);
72 if (ret)
73 goto err;
74
75 smdk_snd_ac97_device = platform_device_alloc("soc-audio", -1);
76 if (!smdk_snd_ac97_device) {
77 ret = -ENOMEM;
78 goto err;
79 }
80
81 platform_set_drvdata(smdk_snd_ac97_device, &smdk);
82
83 ret = platform_device_add(smdk_snd_ac97_device);
84 if (ret) {
85 platform_device_put(smdk_snd_ac97_device);
86 goto err;
87 }
88
89 return 0;
90err:
91 platform_device_put(smdk_snd_wm9713_device);
92 return ret;
93}
94
95static void __exit smdk_exit(void)
96{
97 platform_device_unregister(smdk_snd_ac97_device);
98 platform_device_unregister(smdk_snd_wm9713_device);
99}
100
101module_init(smdk_init);
102module_exit(smdk_exit);
103
104/* Module information */
105MODULE_AUTHOR("Jaswinder Singh Brar, jassi.brar@samsung.com");
106MODULE_DESCRIPTION("ALSA SoC SMDK+WM9713");
107MODULE_LICENSE("GPL");