GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / sound / soc / sh / fsi-ak4642.c
blobdad575a2262228fc1ffa6511bc036d74beade9dc
1 /*
2 * FSI-AK464x sound support for ms7724se
4 * Copyright (C) 2009 Renesas Solutions Corp.
5 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
12 #include <linux/platform_device.h>
13 #include <sound/sh_fsi.h>
14 #include <../sound/soc/codecs/ak4642.h>
16 static int fsi_ak4642_dai_init(struct snd_soc_codec *codec)
18 int ret;
20 ret = snd_soc_dai_set_fmt(&ak4642_dai, SND_SOC_DAIFMT_CBM_CFM);
21 if (ret < 0)
22 return ret;
24 ret = snd_soc_dai_set_sysclk(&ak4642_dai, 0, 11289600, 0);
26 return ret;
29 static struct snd_soc_dai_link fsi_dai_link = {
30 .name = "AK4642",
31 .stream_name = "AK4642",
32 .cpu_dai = &fsi_soc_dai[FSI_PORT_A],
33 .codec_dai = &ak4642_dai,
34 .init = fsi_ak4642_dai_init,
35 .ops = NULL,
38 static struct snd_soc_card fsi_soc_card = {
39 .name = "FSI",
40 .platform = &fsi_soc_platform,
41 .dai_link = &fsi_dai_link,
42 .num_links = 1,
45 static struct snd_soc_device fsi_snd_devdata = {
46 .card = &fsi_soc_card,
47 .codec_dev = &soc_codec_dev_ak4642,
50 static struct platform_device *fsi_snd_device;
52 static int __init fsi_ak4642_init(void)
54 int ret = -ENOMEM;
56 fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_A);
57 if (!fsi_snd_device)
58 goto out;
60 platform_set_drvdata(fsi_snd_device,
61 &fsi_snd_devdata);
62 fsi_snd_devdata.dev = &fsi_snd_device->dev;
63 ret = platform_device_add(fsi_snd_device);
65 if (ret)
66 platform_device_put(fsi_snd_device);
68 out:
69 return ret;
72 static void __exit fsi_ak4642_exit(void)
74 platform_device_unregister(fsi_snd_device);
77 module_init(fsi_ak4642_init);
78 module_exit(fsi_ak4642_exit);
80 MODULE_LICENSE("GPL");
81 MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card");
82 MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");