diff options
Diffstat (limited to 'sound/soc/samsung/pcm.c')
-rw-r--r-- | sound/soc/samsung/pcm.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index e54256fc4b2c..6a5e4bf6ac96 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c | |||
@@ -275,7 +275,6 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream, | |||
275 | { | 275 | { |
276 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 276 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
277 | struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(rtd->cpu_dai); | 277 | struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(rtd->cpu_dai); |
278 | struct s3c_dma_params *dma_data; | ||
279 | void __iomem *regs = pcm->regs; | 278 | void __iomem *regs = pcm->regs; |
280 | struct clk *clk; | 279 | struct clk *clk; |
281 | int sclk_div, sync_div; | 280 | int sclk_div, sync_div; |
@@ -284,13 +283,6 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream, | |||
284 | 283 | ||
285 | dev_dbg(pcm->dev, "Entered %s\n", __func__); | 284 | dev_dbg(pcm->dev, "Entered %s\n", __func__); |
286 | 285 | ||
287 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
288 | dma_data = pcm->dma_playback; | ||
289 | else | ||
290 | dma_data = pcm->dma_capture; | ||
291 | |||
292 | snd_soc_dai_set_dma_data(rtd->cpu_dai, substream, dma_data); | ||
293 | |||
294 | /* Strictly check for sample size */ | 286 | /* Strictly check for sample size */ |
295 | switch (params_format(params)) { | 287 | switch (params_format(params)) { |
296 | case SNDRV_PCM_FORMAT_S16_LE: | 288 | case SNDRV_PCM_FORMAT_S16_LE: |
@@ -461,10 +453,20 @@ static const struct snd_soc_dai_ops s3c_pcm_dai_ops = { | |||
461 | .set_fmt = s3c_pcm_set_fmt, | 453 | .set_fmt = s3c_pcm_set_fmt, |
462 | }; | 454 | }; |
463 | 455 | ||
456 | static int s3c_pcm_dai_probe(struct snd_soc_dai *dai) | ||
457 | { | ||
458 | struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(dai); | ||
459 | |||
460 | snd_soc_dai_init_dma_data(dai, pcm->dma_playback, pcm->dma_capture); | ||
461 | |||
462 | return 0; | ||
463 | } | ||
464 | |||
464 | #define S3C_PCM_RATES SNDRV_PCM_RATE_8000_96000 | 465 | #define S3C_PCM_RATES SNDRV_PCM_RATE_8000_96000 |
465 | 466 | ||
466 | #define S3C_PCM_DAI_DECLARE \ | 467 | #define S3C_PCM_DAI_DECLARE \ |
467 | .symmetric_rates = 1, \ | 468 | .symmetric_rates = 1, \ |
469 | .probe = s3c_pcm_dai_probe, \ | ||
468 | .ops = &s3c_pcm_dai_ops, \ | 470 | .ops = &s3c_pcm_dai_ops, \ |
469 | .playback = { \ | 471 | .playback = { \ |
470 | .channels_min = 2, \ | 472 | .channels_min = 2, \ |