diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-27 11:48:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-16 15:00:00 -0400 |
commit | 26e6781155482f17847a408e72721f63c7c71cc6 (patch) | |
tree | e2e622b796aeba27e92e5ade68ecb8ba06cb0932 /sound/soc/samsung | |
parent | d5efccd5b6843c504042735c1e20d9252daefd98 (diff) |
ASoC: Use dai_fmt in Speyside
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r-- | sound/soc/samsung/speyside.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index f9ab7707a3e4..a4a9fc7e8c76 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c | |||
@@ -92,33 +92,6 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card, | |||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | static int speyside_hw_params(struct snd_pcm_substream *substream, | ||
96 | struct snd_pcm_hw_params *params) | ||
97 | { | ||
98 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
99 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
100 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
101 | int ret; | ||
102 | |||
103 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ||
104 | | SND_SOC_DAIFMT_NB_NF | ||
105 | | SND_SOC_DAIFMT_CBM_CFM); | ||
106 | if (ret < 0) | ||
107 | return ret; | ||
108 | |||
109 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | ||
110 | | SND_SOC_DAIFMT_NB_NF | ||
111 | | SND_SOC_DAIFMT_CBM_CFM); | ||
112 | if (ret < 0) | ||
113 | return ret; | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static struct snd_soc_ops speyside_ops = { | ||
119 | .hw_params = speyside_hw_params, | ||
120 | }; | ||
121 | |||
122 | static struct snd_soc_jack speyside_headset; | 95 | static struct snd_soc_jack speyside_headset; |
123 | 96 | ||
124 | /* Headset jack detection DAPM pins */ | 97 | /* Headset jack detection DAPM pins */ |
@@ -208,7 +181,8 @@ static struct snd_soc_dai_link speyside_dai[] = { | |||
208 | .platform_name = "samsung-audio", | 181 | .platform_name = "samsung-audio", |
209 | .codec_name = "wm8996.1-001a", | 182 | .codec_name = "wm8996.1-001a", |
210 | .init = speyside_wm8996_init, | 183 | .init = speyside_wm8996_init, |
211 | .ops = &speyside_ops, | 184 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
185 | | SND_SOC_DAIFMT_CBM_CFM, | ||
212 | }, | 186 | }, |
213 | { | 187 | { |
214 | .name = "Baseband", | 188 | .name = "Baseband", |
@@ -216,7 +190,8 @@ static struct snd_soc_dai_link speyside_dai[] = { | |||
216 | .cpu_dai_name = "wm8996-aif2", | 190 | .cpu_dai_name = "wm8996-aif2", |
217 | .codec_dai_name = "wm1250-ev1", | 191 | .codec_dai_name = "wm1250-ev1", |
218 | .codec_name = "wm1250-ev1.1-0027", | 192 | .codec_name = "wm1250-ev1.1-0027", |
219 | .ops = &speyside_ops, | 193 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
194 | | SND_SOC_DAIFMT_CBM_CFM, | ||
220 | .ignore_suspend = 1, | 195 | .ignore_suspend = 1, |
221 | }, | 196 | }, |
222 | }; | 197 | }; |