summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi-ak4642.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-01-24 02:43:19 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-26 12:25:47 +0100
commitf17c13ca52d5c5a6a164536244a6debb8cd17983 (patch)
treea3a9a1fd3a0ed7cf1bb49f6c8c8591826fa58940 /sound/soc/sh/fsi-ak4642.c
parentASoC: sh: fsi: free from NULL pointer of struct sh_fsi_platform_info (diff)
downloadlinux-f17c13ca52d5c5a6a164536244a6debb8cd17983.tar.xz
linux-f17c13ca52d5c5a6a164536244a6debb8cd17983.zip
ASoC: sh: fsi: modify selection method of I2S/PCM/SPDIF format
Current format selection of FSI-codecs depended on platform information for FSI, and chip default settings for codecs. It is not understandable/formal method. This patch modify FSI and FSI-codecs to use snd_soc_dai_set_fmt. But FSI can use I2S/PCM and SPDIF format today. It can be selected to I2S/PCM by snd_soc_dai_set_fmt, but can not select SPDIF. So, this patch change FSI platform information to have DAI/SPDIF mode. If platform selects DAI mode (default), FSI-codecs can select I2S/PCM by snd_soc_dai_set_fmt, and if it is SPDIF mode, FSI become SPDIF format. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi-ak4642.c')
-rw-r--r--sound/soc/sh/fsi-ak4642.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
index ce058c749e6a..d6f4703b3c07 100644
--- a/sound/soc/sh/fsi-ak4642.c
+++ b/sound/soc/sh/fsi-ak4642.c
@@ -36,7 +36,8 @@ static int fsi_ak4642_dai_init(struct snd_soc_pcm_runtime *rtd)
if (ret < 0)
return ret;
- ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_CBS_CFS);
+ ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_LEFT_J |
+ SND_SOC_DAIFMT_CBS_CFS);
return ret;
}