aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-18 16:57:17 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-19 08:24:52 -0500
commitd0c36631bbee9eb89f2fe4251e0e9583f37156cd (patch)
treec50c382d8c21f93968350a82118285660cdc5120 /sound/soc
parentdf573d2fd1b077b98ffc3eb62a9908075e69e578 (diff)
ASoC: s3c24xx_uda134x DAI accessor functions and static cleanup
Missed these during review. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/s3c24xx/s3c24xx_uda134x.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sound/soc/s3c24xx/s3c24xx_uda134x.c b/sound/soc/s3c24xx/s3c24xx_uda134x.c
index 487b010730b8..92d90f2f6901 100644
--- a/sound/soc/s3c24xx/s3c24xx_uda134x.c
+++ b/sound/soc/s3c24xx/s3c24xx_uda134x.c
@@ -63,7 +63,7 @@ static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
63 63
64static struct platform_device *s3c24xx_uda134x_snd_device; 64static struct platform_device *s3c24xx_uda134x_snd_device;
65 65
66int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) 66static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
67{ 67{
68 int ret = 0; 68 int ret = 0;
69#ifdef ENFORCE_RATES 69#ifdef ENFORCE_RATES
@@ -115,7 +115,7 @@ int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
115 return ret; 115 return ret;
116} 116}
117 117
118void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream) 118static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream)
119{ 119{
120 mutex_lock(&clk_lock); 120 mutex_lock(&clk_lock);
121 pr_debug("%s %d\n", __func__, clk_users); 121 pr_debug("%s %d\n", __func__, clk_users);
@@ -180,39 +180,38 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream,
180 return -EINVAL; 180 return -EINVAL;
181 } 181 }
182 182
183 ret = codec_dai->dai_ops.set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | 183 ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
184 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); 184 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
185 if (ret < 0) 185 if (ret < 0)
186 return ret; 186 return ret;
187 187
188 ret = cpu_dai->dai_ops.set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | 188 ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
189 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); 189 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
190 if (ret < 0) 190 if (ret < 0)
191 return ret; 191 return ret;
192 192
193 ret = cpu_dai->dai_ops.set_sysclk(cpu_dai, clk_source , clk, 193 ret = snd_soc_dai_set_sysclk(cpu_dai, clk_source , clk,
194 SND_SOC_CLOCK_IN); 194 SND_SOC_CLOCK_IN);
195 if (ret < 0) 195 if (ret < 0)
196 return ret; 196 return ret;
197 197
198 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_MCLK, 198 ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_MCLK, fs_mode);
199 fs_mode);
200 if (ret < 0) 199 if (ret < 0)
201 return ret; 200 return ret;
202 201
203 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_BCLK, 202 ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_BCLK,
204 S3C2410_IISMOD_32FS); 203 S3C2410_IISMOD_32FS);
205 if (ret < 0) 204 if (ret < 0)
206 return ret; 205 return ret;
207 206
208 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER, 207 ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER,
209 S3C24XX_PRESCALE(div, div)); 208 S3C24XX_PRESCALE(div, div));
210 if (ret < 0) 209 if (ret < 0)
211 return ret; 210 return ret;
212 211
213 /* set the codec system clock for DAC and ADC */ 212 /* set the codec system clock for DAC and ADC */
214 ret = codec_dai->dai_ops.set_sysclk(codec_dai, 0, clk, 213 ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk,
215 SND_SOC_CLOCK_OUT); 214 SND_SOC_CLOCK_OUT);
216 if (ret < 0) 215 if (ret < 0)
217 return ret; 216 return ret;
218 217