summaryrefslogtreecommitdiff
path: root/sound/soc/sof/pcm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-04-03 16:07:41 +0100
committerMark Brown <broonie@kernel.org>2024-04-03 16:07:41 +0100
commit327719aa629fa6382ecd38996191c4bc9ef0174b (patch)
treeaef80029634e52fed35890894f303a09622e4202 /sound/soc/sof/pcm.c
parent5faf65b5d1e36ec0a1eb3ba8ba2a8b7a779575ce (diff)
parent09bbc4f0d6ed0c7ca68c0c5fda9613917a1c9f6e (diff)
ASoC: Merge up fixes
Some of these, particularly the wm_adsp one in the immediate case, are needed as a basis for new work.
Diffstat (limited to 'sound/soc/sof/pcm.c')
-rw-r--r--sound/soc/sof/pcm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
index 7b88e24b7701..4e11df6b4823 100644
--- a/sound/soc/sof/pcm.c
+++ b/sound/soc/sof/pcm.c
@@ -384,13 +384,21 @@ static snd_pcm_uframes_t sof_pcm_pointer(struct snd_soc_component *component,
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component);
+ const struct sof_ipc_pcm_ops *pcm_ops = sof_ipc_get_ops(sdev, pcm);
struct snd_sof_pcm *spcm;
snd_pcm_uframes_t host, dai;
+ int ret = -EOPNOTSUPP;
/* nothing to do for BE */
if (rtd->dai_link->no_pcm)
return 0;
+ if (pcm_ops && pcm_ops->pointer)
+ ret = pcm_ops->pointer(component, substream, &host);
+
+ if (ret != -EOPNOTSUPP)
+ return ret ? ret : host;
+
/* use dsp ops pointer callback directly if set */
if (sof_ops(sdev)->pcm_pointer)
return sof_ops(sdev)->pcm_pointer(sdev, substream);