2 * smdk_wm9713.c -- SoC audio for SMDK
4 * Copyright 2010 Samsung Electronics Co. Ltd.
5 * Author: Jaswinder Singh Brar <jassi.brar@samsung.com>
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.
14 #include <linux/module.h>
15 #include <linux/device.h>
16 #include <sound/soc.h>
18 #include "../codecs/wm9713.h"
22 static struct snd_soc_card smdk;
25 Playback (HeadPhone):-
26 Headphone Playback Switch - On
27 $ amixer cset numid=4 1
29 Right Headphone Out Mux - Headphone
30 $ amixer cset numid=92 2
31 Left Headphone Out Mux - Headphone
32 $ amixer cset numid=93 2
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
40 Right Capture Source - Line
41 $ amixer cset numid=86 2
42 Left Capture Source - Line
43 $ amixer cset numid=87 2
46 static struct snd_soc_dai_link smdk_dai = {
48 .stream_name = "AC97 PCM",
49 .cpu_dai = &s3c_ac97_dai[S3C_AC97_DAI_PCM],
50 .codec_dai = &wm9713_dai[WM9713_DAI_AC97_HIFI],
53 static struct snd_soc_card smdk = {
55 .platform = &s3c24xx_soc_platform,
56 .dai_link = &smdk_dai,
60 static struct snd_soc_device smdk_snd_ac97_devdata = {
62 .codec_dev = &soc_codec_dev_wm9713,
65 static struct platform_device *smdk_snd_ac97_device;
67 static int __init smdk_init(void)
71 smdk_snd_ac97_device = platform_device_alloc("soc-audio", -1);
72 if (!smdk_snd_ac97_device)
75 platform_set_drvdata(smdk_snd_ac97_device,
76 &smdk_snd_ac97_devdata);
77 smdk_snd_ac97_devdata.dev = &smdk_snd_ac97_device->dev;
79 ret = platform_device_add(smdk_snd_ac97_device);
81 platform_device_put(smdk_snd_ac97_device);
86 static void __exit smdk_exit(void)
88 platform_device_unregister(smdk_snd_ac97_device);
91 module_init(smdk_init);
92 module_exit(smdk_exit);
94 /* Module information */
95 MODULE_AUTHOR("Jaswinder Singh Brar, jassi.brar@samsung.com");
96 MODULE_DESCRIPTION("ALSA SoC SMDK+WM9713");
97 MODULE_LICENSE("GPL");