Commit 9b9974d3 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: intel: sst-mfld-platform-pcm: remove snd_pcm_ops

snd_pcm_ops is no longer needed.
Let's use component driver callback.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87muejaf2a.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3507bb5f
...@@ -586,7 +586,8 @@ static struct snd_soc_dai_driver sst_platform_dai[] = { ...@@ -586,7 +586,8 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
}, },
}; };
static int sst_platform_open(struct snd_pcm_substream *substream) static int sst_soc_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ {
struct snd_pcm_runtime *runtime; struct snd_pcm_runtime *runtime;
...@@ -598,15 +599,15 @@ static int sst_platform_open(struct snd_pcm_substream *substream) ...@@ -598,15 +599,15 @@ static int sst_platform_open(struct snd_pcm_substream *substream)
return 0; return 0;
} }
static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream, static int sst_soc_trigger(struct snd_soc_component *component,
int cmd) struct snd_pcm_substream *substream, int cmd)
{ {
int ret_val = 0, str_id; int ret_val = 0, str_id;
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
int status; int status;
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
dev_dbg(rtd->dev, "sst_platform_pcm_trigger called\n"); dev_dbg(rtd->dev, "%s called\n", __func__);
if (substream->pcm->internal) if (substream->pcm->internal)
return 0; return 0;
stream = substream->runtime->private_data; stream = substream->runtime->private_data;
...@@ -646,8 +647,8 @@ static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream, ...@@ -646,8 +647,8 @@ static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream,
} }
static snd_pcm_uframes_t sst_platform_pcm_pointer static snd_pcm_uframes_t sst_soc_pointer(struct snd_soc_component *component,
(struct snd_pcm_substream *substream) struct snd_pcm_substream *substream)
{ {
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
int ret_val, status; int ret_val, status;
...@@ -668,14 +669,8 @@ static snd_pcm_uframes_t sst_platform_pcm_pointer ...@@ -668,14 +669,8 @@ static snd_pcm_uframes_t sst_platform_pcm_pointer
return str_info->buffer_ptr; return str_info->buffer_ptr;
} }
static const struct snd_pcm_ops sst_platform_ops = { static int sst_soc_pcm_new(struct snd_soc_component *component,
.open = sst_platform_open, struct snd_soc_pcm_runtime *rtd)
.ioctl = snd_pcm_lib_ioctl,
.trigger = sst_platform_pcm_trigger,
.pointer = sst_platform_pcm_pointer,
};
static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_soc_dai *dai = rtd->cpu_dai; struct snd_soc_dai *dai = rtd->cpu_dai;
struct snd_pcm *pcm = rtd->pcm; struct snd_pcm *pcm = rtd->pcm;
...@@ -709,9 +704,12 @@ static const struct snd_soc_component_driver sst_soc_platform_drv = { ...@@ -709,9 +704,12 @@ static const struct snd_soc_component_driver sst_soc_platform_drv = {
.name = DRV_NAME, .name = DRV_NAME,
.probe = sst_soc_probe, .probe = sst_soc_probe,
.remove = sst_soc_remove, .remove = sst_soc_remove,
.ops = &sst_platform_ops, .open = sst_soc_open,
.ioctl = snd_soc_pcm_lib_ioctl,
.trigger = sst_soc_trigger,
.pointer = sst_soc_pointer,
.compr_ops = &sst_platform_compr_ops, .compr_ops = &sst_platform_compr_ops,
.pcm_new = sst_pcm_new, .pcm_construct = sst_soc_pcm_new,
}; };
static int sst_platform_probe(struct platform_device *pdev) static int sst_platform_probe(struct platform_device *pdev)
......
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