diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-01 11:16:30 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-06 12:34:32 -0500 |
commit | 9cb2a25ce68aec15d5d940f5d3040bd66ca688c7 (patch) | |
tree | 4fb8b3b327a0358436fb11a6de315ec33a85fc9f | |
parent | fce20bf879dd5ce309c593c91bbb7b5e6ffd22e7 (diff) |
ASoC: migor: Use static DAI format setup
Set the dai_fmt field in the dai_link struct instead of manually calling
snd_soc_dai_fmt(). This makes the code cleaner and shorter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/migor.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c index c58c2529f103..82f582344fe7 100644 --- a/sound/soc/sh/migor.c +++ b/sound/soc/sh/migor.c | |||
@@ -63,16 +63,6 @@ static int migor_hw_params(struct snd_pcm_substream *substream, | |||
63 | if (ret < 0) | 63 | if (ret < 0) |
64 | return ret; | 64 | return ret; |
65 | 65 | ||
66 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_NB_IF | | ||
67 | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS); | ||
68 | if (ret < 0) | ||
69 | return ret; | ||
70 | |||
71 | ret = snd_soc_dai_set_fmt(rtd->cpu_dai, SND_SOC_DAIFMT_NB_IF | | ||
72 | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS); | ||
73 | if (ret < 0) | ||
74 | return ret; | ||
75 | |||
76 | codec_freq = rate * 512; | 66 | codec_freq = rate * 512; |
77 | /* | 67 | /* |
78 | * This propagates the parent frequency change to children and | 68 | * This propagates the parent frequency change to children and |
@@ -144,6 +134,8 @@ static struct snd_soc_dai_link migor_dai = { | |||
144 | .codec_dai_name = "wm8978-hifi", | 134 | .codec_dai_name = "wm8978-hifi", |
145 | .platform_name = "siu-pcm-audio", | 135 | .platform_name = "siu-pcm-audio", |
146 | .codec_name = "wm8978.0-001a", | 136 | .codec_name = "wm8978.0-001a", |
137 | .dai_fmt = SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_I2S | | ||
138 | SND_SOC_DAIFMT_CBS_CFS, | ||
147 | .ops = &migor_dai_ops, | 139 | .ops = &migor_dai_ops, |
148 | }; | 140 | }; |
149 | 141 | ||