aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-01 11:16:14 -0500
committerMark Brown <broonie@kernel.org>2015-01-06 12:34:27 -0500
commit734890a6c99ee81b935164963c03fc8bbf3f821b (patch)
treee6fb80d9b5016df69f59aea69497050d76f8dda3 /sound/soc
parentdea53bd36811d6b117a497eb91b2e4a54ef73548 (diff)
ASoC: wm1133-ev1: 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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/wm1133-ev1.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/soc/fsl/wm1133-ev1.c b/sound/soc/fsl/wm1133-ev1.c
index 804749a6c61e..d072bd13db09 100644
--- a/sound/soc/fsl/wm1133-ev1.c
+++ b/sound/soc/fsl/wm1133-ev1.c
@@ -87,7 +87,6 @@ static int wm1133_ev1_hw_params(struct snd_pcm_substream *substream,
87 snd_pcm_format_t format = params_format(params); 87 snd_pcm_format_t format = params_format(params);
88 unsigned int rate = params_rate(params); 88 unsigned int rate = params_rate(params);
89 unsigned int channels = params_channels(params); 89 unsigned int channels = params_channels(params);
90 u32 dai_format;
91 90
92 /* find the correct audio parameters */ 91 /* find the correct audio parameters */
93 for (i = 0; i < ARRAY_SIZE(wm8350_audio); i++) { 92 for (i = 0; i < ARRAY_SIZE(wm8350_audio); i++) {
@@ -104,15 +103,6 @@ static int wm1133_ev1_hw_params(struct snd_pcm_substream *substream,
104 /* codec FLL input is 14.75 MHz from MCLK */ 103 /* codec FLL input is 14.75 MHz from MCLK */
105 snd_soc_dai_set_pll(codec_dai, 0, 0, 14750000, wm8350_audio[i].sysclk); 104 snd_soc_dai_set_pll(codec_dai, 0, 0, 14750000, wm8350_audio[i].sysclk);
106 105
107 dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
108 SND_SOC_DAIFMT_CBM_CFM;
109
110 /* set codec DAI configuration */
111 snd_soc_dai_set_fmt(codec_dai, dai_format);
112
113 /* set cpu DAI configuration */
114 snd_soc_dai_set_fmt(cpu_dai, dai_format);
115
116 /* TODO: The SSI driver should figure this out for us */ 106 /* TODO: The SSI driver should figure this out for us */
117 switch (channels) { 107 switch (channels) {
118 case 2: 108 case 2:
@@ -244,6 +234,8 @@ static struct snd_soc_dai_link wm1133_ev1_dai = {
244 .init = wm1133_ev1_init, 234 .init = wm1133_ev1_init,
245 .ops = &wm1133_ev1_ops, 235 .ops = &wm1133_ev1_ops,
246 .symmetric_rates = 1, 236 .symmetric_rates = 1,
237 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
238 SND_SOC_DAIFMT_CBM_CFM,
247}; 239};
248 240
249static struct snd_soc_card wm1133_ev1 = { 241static struct snd_soc_card wm1133_ev1 = {