diff options
author | Rander Wang <rander.wang@intel.com> | 2023-02-02 15:29:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-03 12:03:53 +0000 |
commit | 7f956297272bbc3535a02fa32579375a0d40283c (patch) | |
tree | 616a53595d50c19f9ac30790e6941e195795cb5e /sound/soc/sof/sof-priv.h | |
parent | 27c2100b6bc8b0b064f89250eb4081431299115f (diff) | |
download | linux-stable-7f956297272bbc3535a02fa32579375a0d40283c.tar.gz linux-stable-7f956297272bbc3535a02fa32579375a0d40283c.tar.bz2 linux-stable-7f956297272bbc3535a02fa32579375a0d40283c.zip |
ASoC: SOF: add get_stream_position ops for pcm delay
PCM delay depends on stream position based on hardware
counter to calculate stream delay so add this ops to get
stream position according to hardware counter.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r-- | sound/soc/sof/sof-priv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index fd1c3b17a396..14f7adb2dc12 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -248,6 +248,15 @@ struct snd_sof_dsp_ops { /* pcm ack */ int (*pcm_ack)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); /* optional */ + /* + * optional callback to retrieve the link DMA position for the substream + * when the position is not reported in the shared SRAM windows but + * instead from a host-accessible hardware counter. + */ + u64 (*get_stream_position)(struct snd_sof_dev *sdev, + struct snd_soc_component *component, + struct snd_pcm_substream *substream); /* optional */ + /* host read DSP stream data */ int (*ipc_msg_data)(struct snd_sof_dev *sdev, struct snd_sof_pcm_stream *sps, |