aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi-da7210.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-01-19 21:46:02 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-21 14:01:47 -0500
commit4d805f7b6607f6e547dc22e5d57c201e43d21c05 (patch)
tree41ce090f7f9f3f4cc76e74101a108218da447f62 /sound/soc/sh/fsi-da7210.c
parent0d032c19e764ad2f60292f58116f6c2a052a58ab (diff)
ASoC: sh: fsi: Add snd_soc_dai_set_fmt support
This patch add snd_soc_dai_ops :: set_fmt to FSI driver and select master/slave clock mode by snd_soc_dai_set_fmt on fsi-xxx.c instead of platform infomation code. This patch remove fsi_is_master function which is no longer needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi-da7210.c')
-rw-r--r--sound/soc/sh/fsi-da7210.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c
index e8df9da92f71..9b24ed466ab1 100644
--- a/sound/soc/sh/fsi-da7210.c
+++ b/sound/soc/sh/fsi-da7210.c
@@ -15,11 +15,19 @@
15 15
16static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd) 16static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd)
17{ 17{
18 struct snd_soc_dai *dai = rtd->codec_dai; 18 struct snd_soc_dai *codec = rtd->codec_dai;
19 struct snd_soc_dai *cpu = rtd->cpu_dai;
20 int ret;
19 21
20 return snd_soc_dai_set_fmt(dai, 22 ret = snd_soc_dai_set_fmt(codec,
21 SND_SOC_DAIFMT_I2S | 23 SND_SOC_DAIFMT_I2S |
22 SND_SOC_DAIFMT_CBM_CFM); 24 SND_SOC_DAIFMT_CBM_CFM);
25 if (ret < 0)
26 return ret;
27
28 ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_CBS_CFS);
29
30 return ret;
23} 31}
24 32
25static struct snd_soc_dai_link fsi_da7210_dai = { 33static struct snd_soc_dai_link fsi_da7210_dai = {