Commit 6df5d768 authored by Subhransu S. Prusty's avatar Subhransu S. Prusty Committed by Mark Brown

ASoC: Intel: mrfld: Use snd_soc_dai_get_drvdata to derive drv data

Signed-off-by: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 10615a5c
...@@ -252,7 +252,7 @@ int sst_fill_stream_params(void *substream, ...@@ -252,7 +252,7 @@ int sst_fill_stream_params(void *substream,
} }
static int sst_platform_alloc_stream(struct snd_pcm_substream *substream, static int sst_platform_alloc_stream(struct snd_pcm_substream *substream,
struct snd_soc_platform *platform) struct snd_soc_dai *dai)
{ {
struct sst_runtime_stream *stream = struct sst_runtime_stream *stream =
substream->runtime->private_data; substream->runtime->private_data;
...@@ -260,7 +260,7 @@ static int sst_platform_alloc_stream(struct snd_pcm_substream *substream, ...@@ -260,7 +260,7 @@ static int sst_platform_alloc_stream(struct snd_pcm_substream *substream,
struct snd_sst_params str_params = {0}; struct snd_sst_params str_params = {0};
struct snd_sst_alloc_params_ext alloc_params = {0}; struct snd_sst_alloc_params_ext alloc_params = {0};
int ret_val = 0; int ret_val = 0;
struct sst_data *ctx = snd_soc_platform_get_drvdata(platform); struct sst_data *ctx = snd_soc_dai_get_drvdata(dai);
/* set codec params and inform SST driver the same */ /* set codec params and inform SST driver the same */
sst_fill_pcm_params(substream, &param); sst_fill_pcm_params(substream, &param);
...@@ -377,10 +377,10 @@ static void sst_media_close(struct snd_pcm_substream *substream, ...@@ -377,10 +377,10 @@ static void sst_media_close(struct snd_pcm_substream *substream,
kfree(stream); kfree(stream);
} }
static inline unsigned int get_current_pipe_id(struct snd_soc_platform *platform, static inline unsigned int get_current_pipe_id(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream) struct snd_pcm_substream *substream)
{ {
struct sst_data *sst = snd_soc_platform_get_drvdata(platform); struct sst_data *sst = snd_soc_dai_get_drvdata(dai);
struct sst_dev_stream_map *map = sst->pdata->pdev_strm_map; struct sst_dev_stream_map *map = sst->pdata->pdev_strm_map;
struct sst_runtime_stream *stream = struct sst_runtime_stream *stream =
substream->runtime->private_data; substream->runtime->private_data;
...@@ -389,7 +389,7 @@ static inline unsigned int get_current_pipe_id(struct snd_soc_platform *platform ...@@ -389,7 +389,7 @@ static inline unsigned int get_current_pipe_id(struct snd_soc_platform *platform
pipe_id = map[str_id].device_id; pipe_id = map[str_id].device_id;
dev_dbg(platform->dev, "got pipe_id = %#x for str_id = %d\n", dev_dbg(dai->dev, "got pipe_id = %#x for str_id = %d\n",
pipe_id, str_id); pipe_id, str_id);
return pipe_id; return pipe_id;
} }
...@@ -407,7 +407,7 @@ static int sst_media_prepare(struct snd_pcm_substream *substream, ...@@ -407,7 +407,7 @@ static int sst_media_prepare(struct snd_pcm_substream *substream,
return ret_val; return ret_val;
} }
ret_val = sst_platform_alloc_stream(substream, dai->platform); ret_val = sst_platform_alloc_stream(substream, dai);
if (ret_val <= 0) if (ret_val <= 0)
return ret_val; return ret_val;
snprintf(substream->pcm->id, sizeof(substream->pcm->id), snprintf(substream->pcm->id, sizeof(substream->pcm->id),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment