aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-01-27 00:59:19 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-01-27 15:49:21 -0500
commitff6e64dabf66b8e4e7def21857320085fc68db6b (patch)
tree4a11b05b7cc4dbd2995e1040772fd55cb65f17e9 /sound/soc/s3c24xx
parentfc93ea2f9315eda2ec8645c2f8bcc30f75a6b88e (diff)
ASoC: AC97: SMDK: Add wm9713 machine driver
This patch adds the common machine driver for SMDKs that have a WM9713 codec attched to the AC97 controller. 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/s3c24xx')
-rw-r--r--sound/soc/s3c24xx/Kconfig8
-rw-r--r--sound/soc/s3c24xx/Makefile2
-rw-r--r--sound/soc/s3c24xx/smdk_wm9713.c97
3 files changed, 107 insertions, 0 deletions
diff --git a/sound/soc/s3c24xx/Kconfig b/sound/soc/s3c24xx/Kconfig
index ad3690ec3de8..d1c6f9392463 100644
--- a/sound/soc/s3c24xx/Kconfig
+++ b/sound/soc/s3c24xx/Kconfig
@@ -115,3 +115,11 @@ config SND_S3C24XX_SOC_SIMTEC_HERMES
115 select SND_S3C24XX_SOC_I2S 115 select SND_S3C24XX_SOC_I2S
116 select SND_SOC_TLV320AIC3X 116 select SND_SOC_TLV320AIC3X
117 select SND_S3C24XX_SOC_SIMTEC 117 select SND_S3C24XX_SOC_SIMTEC
118
119config SND_SOC_SMDK_WM9713
120 tristate "SoC AC97 Audio support for SMDK with WM9713"
121 depends on SND_S3C24XX_SOC && MACH_SMDK6410
122 select SND_SOC_WM9713
123 select SND_S3C_SOC_AC97
124 help
125 Sat Y if you want to add support for SoC audio on the SMDK.
diff --git a/sound/soc/s3c24xx/Makefile b/sound/soc/s3c24xx/Makefile
index b7411bd59f33..1117678ae4e1 100644
--- a/sound/soc/s3c24xx/Makefile
+++ b/sound/soc/s3c24xx/Makefile
@@ -28,6 +28,7 @@ snd-soc-s3c24xx-simtec-objs := s3c24xx_simtec.o
28snd-soc-s3c24xx-simtec-hermes-objs := s3c24xx_simtec_hermes.o 28snd-soc-s3c24xx-simtec-hermes-objs := s3c24xx_simtec_hermes.o
29snd-soc-s3c24xx-simtec-tlv320aic23-objs := s3c24xx_simtec_tlv320aic23.o 29snd-soc-s3c24xx-simtec-tlv320aic23-objs := s3c24xx_simtec_tlv320aic23.o
30snd-soc-smdk64xx-wm8580-objs := smdk64xx_wm8580.o 30snd-soc-smdk64xx-wm8580-objs := smdk64xx_wm8580.o
31snd-soc-smdk-wm9713-objs := smdk_wm9713.o
31 32
32obj-$(CONFIG_SND_S3C24XX_SOC_JIVE_WM8750) += snd-soc-jive-wm8750.o 33obj-$(CONFIG_SND_S3C24XX_SOC_JIVE_WM8750) += snd-soc-jive-wm8750.o
33obj-$(CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o 34obj-$(CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -39,3 +40,4 @@ obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC) += snd-soc-s3c24xx-simtec.o
39obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES) += snd-soc-s3c24xx-simtec-hermes.o 40obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES) += snd-soc-s3c24xx-simtec-hermes.o
40obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23) += snd-soc-s3c24xx-simtec-tlv320aic23.o 41obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23) += snd-soc-s3c24xx-simtec-tlv320aic23.o
41obj-$(CONFIG_SND_S3C64XX_SOC_WM8580) += snd-soc-smdk64xx-wm8580.o 42obj-$(CONFIG_SND_S3C64XX_SOC_WM8580) += snd-soc-smdk64xx-wm8580.o
43obj-$(CONFIG_SND_SOC_SMDK_WM9713) += snd-soc-smdk-wm9713.o
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c
new file mode 100644
index 000000000000..7dd933f7cbf9
--- /dev/null
+++ b/sound/soc/s3c24xx/smdk_wm9713.c
@@ -0,0 +1,97 @@
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 "../codecs/wm9713.h"
19#include "s3c-dma.h"
20#include "s3c-ac97.h"
21
22static struct snd_soc_card smdk;
23
24/*
25 Playback (HeadPhone):-
26 Headphone Playback Switch - On
27 $ amixer cset numid=4 1
28
29 Right Headphone Out Mux - Headphone
30 $ amixer cset numid=92 2
31 Left Headphone Out Mux - Headphone
32 $ amixer cset numid=93 2
33
34 Right HP Mixer PCM Playback Switch - On
35 $ amixer cset numid=75 1
36 Left HP Mixer PCM Playback Switch - On
37 $ amixer cset numid=81 1
38
39 Capture (LineIn):-
40 Right Capture Source - Line
41 $ amixer cset numid=86 2
42 Left Capture Source - Line
43 $ amixer cset numid=87 2
44*/
45
46static struct snd_soc_dai_link smdk_dai = {
47 .name = "AC97",
48 .stream_name = "AC97 PCM",
49 .cpu_dai = &s3c_ac97_dai[S3C_AC97_DAI_PCM],
50 .codec_dai = &wm9713_dai[WM9713_DAI_AC97_HIFI],
51};
52
53static struct snd_soc_card smdk = {
54 .name = "SMDK",
55 .platform = &s3c24xx_soc_platform,
56 .dai_link = &smdk_dai,
57 .num_links = 1,
58};
59
60static struct snd_soc_device smdk_snd_ac97_devdata = {
61 .card = &smdk,
62 .codec_dev = &soc_codec_dev_wm9713,
63};
64
65static struct platform_device *smdk_snd_ac97_device;
66
67static int __init smdk_init(void)
68{
69 int ret;
70
71 smdk_snd_ac97_device = platform_device_alloc("soc-audio", -1);
72 if (!smdk_snd_ac97_device)
73 return -ENOMEM;
74
75 platform_set_drvdata(smdk_snd_ac97_device,
76 &smdk_snd_ac97_devdata);
77 smdk_snd_ac97_devdata.dev = &smdk_snd_ac97_device->dev;
78
79 ret = platform_device_add(smdk_snd_ac97_device);
80 if (ret)
81 platform_device_put(smdk_snd_ac97_device);
82
83 return ret;
84}
85
86static void __exit smdk_exit(void)
87{
88 platform_device_unregister(smdk_snd_ac97_device);
89}
90
91module_init(smdk_init);
92module_exit(smdk_exit);
93
94/* Module information */
95MODULE_AUTHOR("Jaswinder Singh Brar, jassi.brar@samsung.com");
96MODULE_DESCRIPTION("ALSA SoC SMDK+WM9713");
97MODULE_LICENSE("GPL");