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>
21 static struct snd_soc_card smdk
;
24 * Default CFG switch settings to use this driver:
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
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
41 $ amixer sset 'Right Capture Source' 'Line'
42 $ amixer sset 'Left Capture Source' 'Line'
45 static struct snd_soc_dai_link smdk_dai
= {
47 .stream_name
= "AC97 PCM",
48 .platform_name
= "s3c24xx-pcm-audio",
49 .cpu_dai_name
= "s3c-ac97",
50 .codec_dai_name
= "wm9713-hifi",
51 .codec_name
= "wm9713-codec",
54 static struct snd_soc_card smdk
= {
56 .dai_link
= &smdk_dai
,
60 static struct platform_device
*smdk_snd_wm9713_device
;
61 static struct platform_device
*smdk_snd_ac97_device
;
63 static int __init
smdk_init(void)
67 smdk_snd_wm9713_device
= platform_device_alloc("wm9713-codec", -1);
68 if (!smdk_snd_wm9713_device
)
71 ret
= platform_device_add(smdk_snd_wm9713_device
);
75 smdk_snd_ac97_device
= platform_device_alloc("soc-audio", -1);
76 if (!smdk_snd_ac97_device
) {
81 platform_set_drvdata(smdk_snd_ac97_device
, &smdk
);
83 ret
= platform_device_add(smdk_snd_ac97_device
);
85 platform_device_put(smdk_snd_ac97_device
);
91 platform_device_put(smdk_snd_wm9713_device
);
95 static void __exit
smdk_exit(void)
97 platform_device_unregister(smdk_snd_ac97_device
);
100 module_init(smdk_init
);
101 module_exit(smdk_exit
);
103 /* Module information */
104 MODULE_AUTHOR("Jaswinder Singh Brar, jassi.brar@samsung.com");
105 MODULE_DESCRIPTION("ALSA SoC SMDK+WM9713");
106 MODULE_LICENSE("GPL");