aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-28 05:58:17 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-28 06:37:36 -0500
commit077a2ba4c8e40e6256948c3b4cc60608a284f555 (patch)
tree5469d3f29439628847e82d8d3d33c5098aae115c
parentd4d9820b4ad6d6227cad090a9f695eea37814215 (diff)
ASoC: Use dai_fmt in kirkwood-openrd machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/kirkwood/kirkwood-openrd.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sound/soc/kirkwood/kirkwood-openrd.c b/sound/soc/kirkwood/kirkwood-openrd.c
index 8a5a3ddaa5e2..55d2ed3df30d 100644
--- a/sound/soc/kirkwood/kirkwood-openrd.c
+++ b/sound/soc/kirkwood/kirkwood-openrd.c
@@ -26,18 +26,7 @@ static int openrd_client_hw_params(struct snd_pcm_substream *substream,
26{ 26{
27 struct snd_soc_pcm_runtime *rtd = substream->private_data; 27 struct snd_soc_pcm_runtime *rtd = substream->private_data;
28 struct snd_soc_dai *codec_dai = rtd->codec_dai; 28 struct snd_soc_dai *codec_dai = rtd->codec_dai;
29 struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 29 unsigned int freq;
30 int ret;
31 unsigned int freq, fmt;
32
33 fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
34 ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
35 if (ret < 0)
36 return ret;
37
38 ret = snd_soc_dai_set_fmt(codec_dai, fmt);
39 if (ret < 0)
40 return ret;
41 30
42 switch (params_rate(params)) { 31 switch (params_rate(params)) {
43 default: 32 default:
@@ -69,6 +58,7 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
69 .platform_name = "kirkwood-pcm-audio", 58 .platform_name = "kirkwood-pcm-audio",
70 .codec_dai_name = "cs42l51-hifi", 59 .codec_dai_name = "cs42l51-hifi",
71 .codec_name = "cs42l51-codec.0-004a", 60 .codec_name = "cs42l51-codec.0-004a",
61 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
72 .ops = &openrd_client_ops, 62 .ops = &openrd_client_ops,
73}, 63},
74}; 64};