diff options
| -rw-r--r-- | sound/soc/qcom/lpass-platform.c | 14 | ||||
| -rw-r--r-- | sound/soc/qcom/lpass.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index db000c6987a1..a144c14c7169 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c | |||
| @@ -84,9 +84,9 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, | |||
| 84 | struct snd_pcm_hw_params *params) | 84 | struct snd_pcm_hw_params *params) |
| 85 | { | 85 | { |
| 86 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 86 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
| 87 | struct lpass_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(soc_runtime); | ||
| 88 | struct lpass_data *drvdata = | 87 | struct lpass_data *drvdata = |
| 89 | snd_soc_platform_get_drvdata(soc_runtime->platform); | 88 | snd_soc_platform_get_drvdata(soc_runtime->platform); |
| 89 | struct lpass_pcm_data *pcm_data = drvdata->private_data; | ||
| 90 | struct lpass_variant *v = drvdata->variant; | 90 | struct lpass_variant *v = drvdata->variant; |
| 91 | snd_pcm_format_t format = params_format(params); | 91 | snd_pcm_format_t format = params_format(params); |
| 92 | unsigned int channels = params_channels(params); | 92 | unsigned int channels = params_channels(params); |
| @@ -177,9 +177,9 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, | |||
| 177 | static int lpass_platform_pcmops_hw_free(struct snd_pcm_substream *substream) | 177 | static int lpass_platform_pcmops_hw_free(struct snd_pcm_substream *substream) |
| 178 | { | 178 | { |
| 179 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 179 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
| 180 | struct lpass_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(soc_runtime); | ||
| 181 | struct lpass_data *drvdata = | 180 | struct lpass_data *drvdata = |
| 182 | snd_soc_platform_get_drvdata(soc_runtime->platform); | 181 | snd_soc_platform_get_drvdata(soc_runtime->platform); |
| 182 | struct lpass_pcm_data *pcm_data = drvdata->private_data; | ||
| 183 | struct lpass_variant *v = drvdata->variant; | 183 | struct lpass_variant *v = drvdata->variant; |
| 184 | unsigned int reg; | 184 | unsigned int reg; |
| 185 | int ret; | 185 | int ret; |
| @@ -201,9 +201,9 @@ static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream) | |||
| 201 | { | 201 | { |
| 202 | struct snd_pcm_runtime *runtime = substream->runtime; | 202 | struct snd_pcm_runtime *runtime = substream->runtime; |
| 203 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 203 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
| 204 | struct lpass_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(soc_runtime); | ||
| 205 | struct lpass_data *drvdata = | 204 | struct lpass_data *drvdata = |
| 206 | snd_soc_platform_get_drvdata(soc_runtime->platform); | 205 | snd_soc_platform_get_drvdata(soc_runtime->platform); |
| 206 | struct lpass_pcm_data *pcm_data = drvdata->private_data; | ||
| 207 | struct lpass_variant *v = drvdata->variant; | 207 | struct lpass_variant *v = drvdata->variant; |
| 208 | int ret, ch, dir = substream->stream; | 208 | int ret, ch, dir = substream->stream; |
| 209 | 209 | ||
| @@ -255,9 +255,9 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream, | |||
| 255 | int cmd) | 255 | int cmd) |
| 256 | { | 256 | { |
| 257 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 257 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
| 258 | struct lpass_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(soc_runtime); | ||
| 259 | struct lpass_data *drvdata = | 258 | struct lpass_data *drvdata = |
| 260 | snd_soc_platform_get_drvdata(soc_runtime->platform); | 259 | snd_soc_platform_get_drvdata(soc_runtime->platform); |
| 260 | struct lpass_pcm_data *pcm_data = drvdata->private_data; | ||
| 261 | struct lpass_variant *v = drvdata->variant; | 261 | struct lpass_variant *v = drvdata->variant; |
| 262 | int ret, ch, dir = substream->stream; | 262 | int ret, ch, dir = substream->stream; |
| 263 | 263 | ||
| @@ -331,9 +331,9 @@ static snd_pcm_uframes_t lpass_platform_pcmops_pointer( | |||
| 331 | struct snd_pcm_substream *substream) | 331 | struct snd_pcm_substream *substream) |
| 332 | { | 332 | { |
| 333 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 333 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
| 334 | struct lpass_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(soc_runtime); | ||
| 335 | struct lpass_data *drvdata = | 334 | struct lpass_data *drvdata = |
| 336 | snd_soc_platform_get_drvdata(soc_runtime->platform); | 335 | snd_soc_platform_get_drvdata(soc_runtime->platform); |
| 336 | struct lpass_pcm_data *pcm_data = drvdata->private_data; | ||
| 337 | struct lpass_variant *v = drvdata->variant; | 337 | struct lpass_variant *v = drvdata->variant; |
| 338 | unsigned int base_addr, curr_addr; | 338 | unsigned int base_addr, curr_addr; |
| 339 | int ret, ch, dir = substream->stream; | 339 | int ret, ch, dir = substream->stream; |
| @@ -483,7 +483,7 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime) | |||
| 483 | return -ENOMEM; | 483 | return -ENOMEM; |
| 484 | 484 | ||
| 485 | data->i2s_port = cpu_dai->driver->id; | 485 | data->i2s_port = cpu_dai->driver->id; |
| 486 | snd_soc_pcm_set_drvdata(soc_runtime, data); | 486 | drvdata->private_data = data; |
| 487 | 487 | ||
| 488 | psubstream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; | 488 | psubstream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; |
| 489 | if (psubstream) { | 489 | if (psubstream) { |
| @@ -570,8 +570,8 @@ static void lpass_platform_pcm_free(struct snd_pcm *pcm) | |||
| 570 | substream = pcm->streams[i].substream; | 570 | substream = pcm->streams[i].substream; |
| 571 | if (substream) { | 571 | if (substream) { |
| 572 | rt = substream->private_data; | 572 | rt = substream->private_data; |
| 573 | data = snd_soc_pcm_get_drvdata(rt); | ||
| 574 | drvdata = snd_soc_platform_get_drvdata(rt->platform); | 573 | drvdata = snd_soc_platform_get_drvdata(rt->platform); |
| 574 | data = drvdata->private_data; | ||
| 575 | 575 | ||
| 576 | ch = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 576 | ch = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
| 577 | ? data->rdma_ch | 577 | ? data->rdma_ch |
diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index 30714ad1e138..35b3cea8207d 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h | |||
| @@ -58,6 +58,8 @@ struct lpass_data { | |||
| 58 | /* 8016 specific */ | 58 | /* 8016 specific */ |
| 59 | struct clk *pcnoc_mport_clk; | 59 | struct clk *pcnoc_mport_clk; |
| 60 | struct clk *pcnoc_sway_clk; | 60 | struct clk *pcnoc_sway_clk; |
| 61 | |||
| 62 | void *private_data; | ||
| 61 | }; | 63 | }; |
| 62 | 64 | ||
| 63 | /* Vairant data per each SOC */ | 65 | /* Vairant data per each SOC */ |
