aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>2014-09-09 05:41:32 -0400
committerMark Brown <broonie@kernel.org>2014-09-16 19:39:42 -0400
commit6df5d768050f31d810dd3ba0ad8210922c3e9b6d (patch)
treedaefee21b55b77a43531ff98bc84574ec60af2f5
parent10615a5c49721803ed258316280858142a24e72a (diff)
ASoC: Intel: mrfld: Use snd_soc_dai_get_drvdata to derive drv data
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/sst-mfld-platform-pcm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/intel/sst-mfld-platform-pcm.c b/sound/soc/intel/sst-mfld-platform-pcm.c
index 9906b7c1c2e1..8e1b2c14291c 100644
--- a/sound/soc/intel/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/sst-mfld-platform-pcm.c
@@ -252,7 +252,7 @@ int sst_fill_stream_params(void *substream,
252} 252}
253 253
254static int sst_platform_alloc_stream(struct snd_pcm_substream *substream, 254static int sst_platform_alloc_stream(struct snd_pcm_substream *substream,
255 struct snd_soc_platform *platform) 255 struct snd_soc_dai *dai)
256{ 256{
257 struct sst_runtime_stream *stream = 257 struct sst_runtime_stream *stream =
258 substream->runtime->private_data; 258 substream->runtime->private_data;
@@ -260,7 +260,7 @@ static int sst_platform_alloc_stream(struct snd_pcm_substream *substream,
260 struct snd_sst_params str_params = {0}; 260 struct snd_sst_params str_params = {0};
261 struct snd_sst_alloc_params_ext alloc_params = {0}; 261 struct snd_sst_alloc_params_ext alloc_params = {0};
262 int ret_val = 0; 262 int ret_val = 0;
263 struct sst_data *ctx = snd_soc_platform_get_drvdata(platform); 263 struct sst_data *ctx = snd_soc_dai_get_drvdata(dai);
264 264
265 /* set codec params and inform SST driver the same */ 265 /* set codec params and inform SST driver the same */
266 sst_fill_pcm_params(substream, &param); 266 sst_fill_pcm_params(substream, &param);
@@ -377,10 +377,10 @@ static void sst_media_close(struct snd_pcm_substream *substream,
377 kfree(stream); 377 kfree(stream);
378} 378}
379 379
380static inline unsigned int get_current_pipe_id(struct snd_soc_platform *platform, 380static inline unsigned int get_current_pipe_id(struct snd_soc_dai *dai,
381 struct snd_pcm_substream *substream) 381 struct snd_pcm_substream *substream)
382{ 382{
383 struct sst_data *sst = snd_soc_platform_get_drvdata(platform); 383 struct sst_data *sst = snd_soc_dai_get_drvdata(dai);
384 struct sst_dev_stream_map *map = sst->pdata->pdev_strm_map; 384 struct sst_dev_stream_map *map = sst->pdata->pdev_strm_map;
385 struct sst_runtime_stream *stream = 385 struct sst_runtime_stream *stream =
386 substream->runtime->private_data; 386 substream->runtime->private_data;
@@ -389,7 +389,7 @@ static inline unsigned int get_current_pipe_id(struct snd_soc_platform *platform
389 389
390 pipe_id = map[str_id].device_id; 390 pipe_id = map[str_id].device_id;
391 391
392 dev_dbg(platform->dev, "got pipe_id = %#x for str_id = %d\n", 392 dev_dbg(dai->dev, "got pipe_id = %#x for str_id = %d\n",
393 pipe_id, str_id); 393 pipe_id, str_id);
394 return pipe_id; 394 return pipe_id;
395} 395}
@@ -407,7 +407,7 @@ static int sst_media_prepare(struct snd_pcm_substream *substream,
407 return ret_val; 407 return ret_val;
408 } 408 }
409 409
410 ret_val = sst_platform_alloc_stream(substream, dai->platform); 410 ret_val = sst_platform_alloc_stream(substream, dai);
411 if (ret_val <= 0) 411 if (ret_val <= 0)
412 return ret_val; 412 return ret_val;
413 snprintf(substream->pcm->id, sizeof(substream->pcm->id), 413 snprintf(substream->pcm->id, sizeof(substream->pcm->id),