Commit 734890a6 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dea53bd3
...@@ -87,7 +87,6 @@ static int wm1133_ev1_hw_params(struct snd_pcm_substream *substream, ...@@ -87,7 +87,6 @@ static int wm1133_ev1_hw_params(struct snd_pcm_substream *substream,
snd_pcm_format_t format = params_format(params); snd_pcm_format_t format = params_format(params);
unsigned int rate = params_rate(params); unsigned int rate = params_rate(params);
unsigned int channels = params_channels(params); unsigned int channels = params_channels(params);
u32 dai_format;
/* find the correct audio parameters */ /* find the correct audio parameters */
for (i = 0; i < ARRAY_SIZE(wm8350_audio); i++) { 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,15 +103,6 @@ static int wm1133_ev1_hw_params(struct snd_pcm_substream *substream,
/* codec FLL input is 14.75 MHz from MCLK */ /* codec FLL input is 14.75 MHz from MCLK */
snd_soc_dai_set_pll(codec_dai, 0, 0, 14750000, wm8350_audio[i].sysclk); snd_soc_dai_set_pll(codec_dai, 0, 0, 14750000, wm8350_audio[i].sysclk);
dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM;
/* set codec DAI configuration */
snd_soc_dai_set_fmt(codec_dai, dai_format);
/* set cpu DAI configuration */
snd_soc_dai_set_fmt(cpu_dai, dai_format);
/* TODO: The SSI driver should figure this out for us */ /* TODO: The SSI driver should figure this out for us */
switch (channels) { switch (channels) {
case 2: case 2:
...@@ -244,6 +234,8 @@ static struct snd_soc_dai_link wm1133_ev1_dai = { ...@@ -244,6 +234,8 @@ static struct snd_soc_dai_link wm1133_ev1_dai = {
.init = wm1133_ev1_init, .init = wm1133_ev1_init,
.ops = &wm1133_ev1_ops, .ops = &wm1133_ev1_ops,
.symmetric_rates = 1, .symmetric_rates = 1,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM,
}; };
static struct snd_soc_card wm1133_ev1 = { static struct snd_soc_card wm1133_ev1 = {
......
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