sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / sound / soc / pxa / em-x270.c
blob966163d1c813271b5df393e52eb5fe0ebd9e86ac
1 /*
2 * SoC audio driver for EM-X270, eXeda and CM-X300
4 * Copyright 2007, 2009 CompuLab, Ltd.
6 * Author: Mike Rapoport <mike@compulab.co.il>
8 * Copied from tosa.c:
9 * Copyright 2005 Wolfson Microelectronics PLC.
10 * Copyright 2005 Openedhand Ltd.
12 * Authors: Liam Girdwood <lrg@slimlogic.co.uk>
13 * Richard Purdie <richard@openedhand.com>
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
22 #include <linux/module.h>
23 #include <linux/moduleparam.h>
24 #include <linux/device.h>
26 #include <sound/core.h>
27 #include <sound/pcm.h>
28 #include <sound/soc.h>
30 #include <asm/mach-types.h>
31 #include <mach/audio.h>
33 #include "pxa2xx-ac97.h"
35 static struct snd_soc_dai_link em_x270_dai[] = {
37 .name = "AC97",
38 .stream_name = "AC97 HiFi",
39 .cpu_dai_name = "pxa2xx-ac97",
40 .codec_dai_name = "wm9712-hifi",
41 .platform_name = "pxa-pcm-audio",
42 .codec_name = "wm9712-codec",
45 .name = "AC97 Aux",
46 .stream_name = "AC97 Aux",
47 .cpu_dai_name = "pxa2xx-ac97-aux",
48 .codec_dai_name ="wm9712-aux",
49 .platform_name = "pxa-pcm-audio",
50 .codec_name = "wm9712-codec",
54 static struct snd_soc_card em_x270 = {
55 .name = "EM-X270",
56 .owner = THIS_MODULE,
57 .dai_link = em_x270_dai,
58 .num_links = ARRAY_SIZE(em_x270_dai),
61 static struct platform_device *em_x270_snd_device;
63 static int __init em_x270_init(void)
65 int ret;
67 if (!(machine_is_em_x270() || machine_is_exeda()
68 || machine_is_cm_x300()))
69 return -ENODEV;
71 em_x270_snd_device = platform_device_alloc("soc-audio", -1);
72 if (!em_x270_snd_device)
73 return -ENOMEM;
75 platform_set_drvdata(em_x270_snd_device, &em_x270);
76 ret = platform_device_add(em_x270_snd_device);
78 if (ret)
79 platform_device_put(em_x270_snd_device);
81 return ret;
84 static void __exit em_x270_exit(void)
86 platform_device_unregister(em_x270_snd_device);
89 module_init(em_x270_init);
90 module_exit(em_x270_exit);
92 /* Module information */
93 MODULE_AUTHOR("Mike Rapoport");
94 MODULE_DESCRIPTION("ALSA SoC EM-X270, eXeda and CM-X300");
95 MODULE_LICENSE("GPL");