Commit 077a2ba4 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: Use dai_fmt in kirkwood-openrd machine driver

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d4d9820b
...@@ -26,18 +26,7 @@ static int openrd_client_hw_params(struct snd_pcm_substream *substream, ...@@ -26,18 +26,7 @@ static int openrd_client_hw_params(struct snd_pcm_substream *substream,
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai; unsigned int freq;
int ret;
unsigned int freq, fmt;
fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
if (ret < 0)
return ret;
ret = snd_soc_dai_set_fmt(codec_dai, fmt);
if (ret < 0)
return ret;
switch (params_rate(params)) { switch (params_rate(params)) {
default: default:
...@@ -69,6 +58,7 @@ static struct snd_soc_dai_link openrd_client_dai[] = { ...@@ -69,6 +58,7 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
.platform_name = "kirkwood-pcm-audio", .platform_name = "kirkwood-pcm-audio",
.codec_dai_name = "cs42l51-hifi", .codec_dai_name = "cs42l51-hifi",
.codec_name = "cs42l51-codec.0-004a", .codec_name = "cs42l51-codec.0-004a",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
.ops = &openrd_client_ops, .ops = &openrd_client_ops,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment