diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-01 11:16:21 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-06 12:34:29 -0500 |
commit | 72303cafcb5cc9fd1227d0edd458f62bef1a397e (patch) | |
tree | 46db6611b440fe588d93babb7956540182219e44 /sound/soc/samsung/jive_wm8750.c | |
parent | 5cc10b9b77c234e89e7c4aca56d8a3c571111955 (diff) |
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>
Diffstat (limited to 'sound/soc/samsung/jive_wm8750.c')
-rw-r--r-- | sound/soc/samsung/jive_wm8750.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index b5f6abd9d221..6c3b359bb4c1 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c | |||
@@ -61,20 +61,6 @@ static int jive_hw_params(struct snd_pcm_substream *substream, | |||
61 | s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params), | 61 | s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params), |
62 | s3c_i2sv2_get_clock(cpu_dai)); | 62 | s3c_i2sv2_get_clock(cpu_dai)); |
63 | 63 | ||
64 | /* set codec DAI configuration */ | ||
65 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | | ||
66 | SND_SOC_DAIFMT_NB_NF | | ||
67 | SND_SOC_DAIFMT_CBS_CFS); | ||
68 | if (ret < 0) | ||
69 | return ret; | ||
70 | |||
71 | /* set cpu DAI configuration */ | ||
72 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | | ||
73 | SND_SOC_DAIFMT_NB_NF | | ||
74 | SND_SOC_DAIFMT_CBS_CFS); | ||
75 | if (ret < 0) | ||
76 | return ret; | ||
77 | |||
78 | /* set the codec system clock for DAC and ADC */ | 64 | /* set the codec system clock for DAC and ADC */ |
79 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk, | 65 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk, |
80 | SND_SOC_CLOCK_IN); | 66 | SND_SOC_CLOCK_IN); |
@@ -121,6 +107,8 @@ static struct snd_soc_dai_link jive_dai = { | |||
121 | .platform_name = "s3c2412-i2s", | 107 | .platform_name = "s3c2412-i2s", |
122 | .codec_name = "wm8750.0-001a", | 108 | .codec_name = "wm8750.0-001a", |
123 | .init = jive_wm8750_init, | 109 | .init = jive_wm8750_init, |
110 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
111 | SND_SOC_DAIFMT_CBS_CFS, | ||
124 | .ops = &jive_ops, | 112 | .ops = &jive_ops, |
125 | }; | 113 | }; |
126 | 114 | ||