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
12 #include <linux/module.h>
13 #include <linux/moduleparam.h>
14 #include <linux/platform_device.h>
15 #include <linux/i2c.h>
17 #include <sound/core.h>
18 #include <sound/pcm.h>
19 #include <sound/soc.h>
20 #include <sound/soc-dapm.h>
22 #include <sound/sh_fsi.h>
23 #include <../sound/soc/codecs/ak4642.h>
25 static int fsi_ak4642_dai_init(struct snd_soc_codec
*codec
)
29 ret
= snd_soc_dai_set_fmt(&ak4642_dai
, SND_SOC_DAIFMT_CBM_CFM
);
33 ret
= snd_soc_dai_set_sysclk(&ak4642_dai
, 0, 11289600, 0);
38 static struct snd_soc_dai_link fsi_dai_link
= {
40 .stream_name
= "AK4642",
41 .cpu_dai
= &fsi_soc_dai
[0], /* fsi */
42 .codec_dai
= &ak4642_dai
,
43 .init
= fsi_ak4642_dai_init
,
47 static struct snd_soc_card fsi_soc_card
= {
49 .platform
= &fsi_soc_platform
,
50 .dai_link
= &fsi_dai_link
,
54 static struct snd_soc_device fsi_snd_devdata
= {
55 .card
= &fsi_soc_card
,
56 .codec_dev
= &soc_codec_dev_ak4642
,
59 static struct platform_device
*fsi_snd_device
;
61 static int __init
fsi_ak4642_init(void)
65 fsi_snd_device
= platform_device_alloc("soc-audio", -1);
69 platform_set_drvdata(fsi_snd_device
,
71 fsi_snd_devdata
.dev
= &fsi_snd_device
->dev
;
72 ret
= platform_device_add(fsi_snd_device
);
75 platform_device_put(fsi_snd_device
);
81 static void __exit
fsi_ak4642_exit(void)
83 platform_device_unregister(fsi_snd_device
);
86 module_init(fsi_ak4642_init
);
87 module_exit(fsi_ak4642_exit
);
89 MODULE_LICENSE("GPL");
90 MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card");
91 MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");