ASoC: jive_wm8750: 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>
This commit is contained in:
parent
5cc10b9b77
commit
72303cafcb
|
@ -61,20 +61,6 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
|
||||||
s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params),
|
s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params),
|
||||||
s3c_i2sv2_get_clock(cpu_dai));
|
s3c_i2sv2_get_clock(cpu_dai));
|
||||||
|
|
||||||
/* set codec DAI configuration */
|
|
||||||
ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
|
|
||||||
SND_SOC_DAIFMT_NB_NF |
|
|
||||||
SND_SOC_DAIFMT_CBS_CFS);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* set cpu DAI configuration */
|
|
||||||
ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
|
|
||||||
SND_SOC_DAIFMT_NB_NF |
|
|
||||||
SND_SOC_DAIFMT_CBS_CFS);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* set the codec system clock for DAC and ADC */
|
/* set the codec system clock for DAC and ADC */
|
||||||
ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
|
ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
|
||||||
SND_SOC_CLOCK_IN);
|
SND_SOC_CLOCK_IN);
|
||||||
|
@ -121,6 +107,8 @@ static struct snd_soc_dai_link jive_dai = {
|
||||||
.platform_name = "s3c2412-i2s",
|
.platform_name = "s3c2412-i2s",
|
||||||
.codec_name = "wm8750.0-001a",
|
.codec_name = "wm8750.0-001a",
|
||||||
.init = jive_wm8750_init,
|
.init = jive_wm8750_init,
|
||||||
|
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
|
||||||
|
SND_SOC_DAIFMT_CBS_CFS,
|
||||||
.ops = &jive_ops,
|
.ops = &jive_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue