aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi-ak4642.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sh/fsi-ak4642.c')
-rw-r--r--sound/soc/sh/fsi-ak4642.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
index dad575a22622..d96602de71de 100644
--- a/sound/soc/sh/fsi-ak4642.c
+++ b/sound/soc/sh/fsi-ak4642.c
@@ -11,17 +11,17 @@
11 11
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <sound/sh_fsi.h> 13#include <sound/sh_fsi.h>
14#include <../sound/soc/codecs/ak4642.h>
15 14
16static int fsi_ak4642_dai_init(struct snd_soc_codec *codec) 15static int fsi_ak4642_dai_init(struct snd_soc_pcm_runtime *rtd)
17{ 16{
17 struct snd_soc_dai *dai = rtd->codec_dai;
18 int ret; 18 int ret;
19 19
20 ret = snd_soc_dai_set_fmt(&ak4642_dai, SND_SOC_DAIFMT_CBM_CFM); 20 ret = snd_soc_dai_set_fmt(dai, SND_SOC_DAIFMT_CBM_CFM);
21 if (ret < 0) 21 if (ret < 0)
22 return ret; 22 return ret;
23 23
24 ret = snd_soc_dai_set_sysclk(&ak4642_dai, 0, 11289600, 0); 24 ret = snd_soc_dai_set_sysclk(dai, 0, 11289600, 0);
25 25
26 return ret; 26 return ret;
27} 27}
@@ -29,24 +29,25 @@ static int fsi_ak4642_dai_init(struct snd_soc_codec *codec)
29static struct snd_soc_dai_link fsi_dai_link = { 29static struct snd_soc_dai_link fsi_dai_link = {
30 .name = "AK4642", 30 .name = "AK4642",
31 .stream_name = "AK4642", 31 .stream_name = "AK4642",
32 .cpu_dai = &fsi_soc_dai[FSI_PORT_A], 32 .cpu_dai_name = "fsia-dai", /* fsi A */
33 .codec_dai = &ak4642_dai, 33 .codec_dai_name = "ak4642-hifi",
34#ifdef CONFIG_MACH_AP4EVB
35 .platform_name = "sh_fsi2",
36 .codec_name = "ak4642-codec.0-0013",
37#else
38 .platform_name = "sh_fsi.0",
39 .codec_name = "ak4642-codec.0-0012",
40#endif
34 .init = fsi_ak4642_dai_init, 41 .init = fsi_ak4642_dai_init,
35 .ops = NULL, 42 .ops = NULL,
36}; 43};
37 44
38static struct snd_soc_card fsi_soc_card = { 45static struct snd_soc_card fsi_soc_card = {
39 .name = "FSI", 46 .name = "FSI (AK4642)",
40 .platform = &fsi_soc_platform,
41 .dai_link = &fsi_dai_link, 47 .dai_link = &fsi_dai_link,
42 .num_links = 1, 48 .num_links = 1,
43}; 49};
44 50
45static struct snd_soc_device fsi_snd_devdata = {
46 .card = &fsi_soc_card,
47 .codec_dev = &soc_codec_dev_ak4642,
48};
49
50static struct platform_device *fsi_snd_device; 51static struct platform_device *fsi_snd_device;
51 52
52static int __init fsi_ak4642_init(void) 53static int __init fsi_ak4642_init(void)
@@ -57,9 +58,7 @@ static int __init fsi_ak4642_init(void)
57 if (!fsi_snd_device) 58 if (!fsi_snd_device)
58 goto out; 59 goto out;
59 60
60 platform_set_drvdata(fsi_snd_device, 61 platform_set_drvdata(fsi_snd_device, &fsi_soc_card);
61 &fsi_snd_devdata);
62 fsi_snd_devdata.dev = &fsi_snd_device->dev;
63 ret = platform_device_add(fsi_snd_device); 62 ret = platform_device_add(fsi_snd_device);
64 63
65 if (ret) 64 if (ret)