Commit 796b64a7 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: intel: sst-mfld-platform-pcm: add .delay support

Now ALSA SoC supports .delay for component.
This patch uses it, and not update runtime->delay on .pointer
directly / secretly.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871r3gy25j.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent feea640a
......@@ -653,10 +653,21 @@ static snd_pcm_uframes_t sst_soc_pointer(struct snd_soc_component *component,
dev_err(rtd->dev, "sst: error code = %d\n", ret_val);
return ret_val;
}
substream->runtime->delay = str_info->pcm_delay;
return str_info->buffer_ptr;
}
static snd_pcm_sframes_t sst_soc_delay(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
struct sst_runtime_stream *stream = substream->runtime->private_data;
struct pcm_stream_info *str_info = &stream->stream_info;
if (sst_get_stream_status(stream) == SST_PLATFORM_INIT)
return 0;
return str_info->pcm_delay;
}
static int sst_soc_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
......@@ -695,6 +706,7 @@ static const struct snd_soc_component_driver sst_soc_platform_drv = {
.open = sst_soc_open,
.trigger = sst_soc_trigger,
.pointer = sst_soc_pointer,
.delay = sst_soc_delay,
.compress_ops = &sst_platform_compress_ops,
.pcm_construct = sst_soc_pcm_new,
};
......
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