diff options
Diffstat (limited to 'sound/soc/sh/fsi-da7210.c')
-rw-r--r-- | sound/soc/sh/fsi-da7210.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c index 121bbb07bb03..4f9298f45215 100644 --- a/sound/soc/sh/fsi-da7210.c +++ b/sound/soc/sh/fsi-da7210.c | |||
@@ -12,11 +12,12 @@ | |||
12 | 12 | ||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <sound/sh_fsi.h> | 14 | #include <sound/sh_fsi.h> |
15 | #include "../codecs/da7210.h" | ||
16 | 15 | ||
17 | static int fsi_da7210_init(struct snd_soc_codec *codec) | 16 | static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd) |
18 | { | 17 | { |
19 | return snd_soc_dai_set_fmt(&da7210_dai, | 18 | struct snd_soc_dai *dai = rtd->codec_dai; |
19 | |||
20 | return snd_soc_dai_set_fmt(dai, | ||
20 | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | 21 | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
21 | SND_SOC_DAIFMT_CBM_CFM); | 22 | SND_SOC_DAIFMT_CBM_CFM); |
22 | } | 23 | } |
@@ -24,23 +25,19 @@ static int fsi_da7210_init(struct snd_soc_codec *codec) | |||
24 | static struct snd_soc_dai_link fsi_da7210_dai = { | 25 | static struct snd_soc_dai_link fsi_da7210_dai = { |
25 | .name = "DA7210", | 26 | .name = "DA7210", |
26 | .stream_name = "DA7210", | 27 | .stream_name = "DA7210", |
27 | .cpu_dai = &fsi_soc_dai[FSI_PORT_B], | 28 | .cpu_dai_name = "fsib-dai", /* FSI B */ |
28 | .codec_dai = &da7210_dai, | 29 | .codec_dai_name = "da7210-hifi", |
30 | .platform_name = "fsi-pcm-audio", | ||
31 | .codec_name = "da7210-codec.0-001a", | ||
29 | .init = fsi_da7210_init, | 32 | .init = fsi_da7210_init, |
30 | }; | 33 | }; |
31 | 34 | ||
32 | static struct snd_soc_card fsi_soc_card = { | 35 | static struct snd_soc_card fsi_soc_card = { |
33 | .name = "FSI", | 36 | .name = "FSI", |
34 | .platform = &fsi_soc_platform, | ||
35 | .dai_link = &fsi_da7210_dai, | 37 | .dai_link = &fsi_da7210_dai, |
36 | .num_links = 1, | 38 | .num_links = 1, |
37 | }; | 39 | }; |
38 | 40 | ||
39 | static struct snd_soc_device fsi_da7210_snd_devdata = { | ||
40 | .card = &fsi_soc_card, | ||
41 | .codec_dev = &soc_codec_dev_da7210, | ||
42 | }; | ||
43 | |||
44 | static struct platform_device *fsi_da7210_snd_device; | 41 | static struct platform_device *fsi_da7210_snd_device; |
45 | 42 | ||
46 | static int __init fsi_da7210_sound_init(void) | 43 | static int __init fsi_da7210_sound_init(void) |
@@ -51,8 +48,7 @@ static int __init fsi_da7210_sound_init(void) | |||
51 | if (!fsi_da7210_snd_device) | 48 | if (!fsi_da7210_snd_device) |
52 | return -ENOMEM; | 49 | return -ENOMEM; |
53 | 50 | ||
54 | platform_set_drvdata(fsi_da7210_snd_device, &fsi_da7210_snd_devdata); | 51 | platform_set_drvdata(fsi_da7210_snd_device, &fsi_soc_card); |
55 | fsi_da7210_snd_devdata.dev = &fsi_da7210_snd_device->dev; | ||
56 | ret = platform_device_add(fsi_da7210_snd_device); | 52 | ret = platform_device_add(fsi_da7210_snd_device); |
57 | if (ret) | 53 | if (ret) |
58 | platform_device_put(fsi_da7210_snd_device); | 54 | platform_device_put(fsi_da7210_snd_device); |