diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2021-11-20 00:08:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-11-24 13:57:19 +0100 |
commit | 4a39ea3f07f14f21a6b97e78c972f71fc5761d3a (patch) | |
tree | 1db11c9a7f991783004e062ee59d3a850958016d /sound/soc/sof/ops.h | |
parent | ALSA: pcm: introduce INFO_NO_REWINDS flag (diff) | |
download | linux-4a39ea3f07f14f21a6b97e78c972f71fc5761d3a.tar.xz linux-4a39ea3f07f14f21a6b97e78c972f71fc5761d3a.zip |
ASoC: SOF: pcm: add .ack callback support
Add the indirections required at the core level for platform-specific
operations on ack.
Note that on errors in the .ack the ALSA core will restore the
previous appl_ptr.
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20211119230852.206310-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ops.h')
-rw-r--r-- | sound/soc/sof/ops.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index a0648a13e3eb..0226a53148c9 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -487,6 +487,16 @@ snd_sof_pcm_platform_pointer(struct snd_sof_dev *sdev, return 0; } +/* pcm ack */ +static inline int snd_sof_pcm_platform_ack(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream) +{ + if (sof_ops(sdev) && sof_ops(sdev)->pcm_ack) + return sof_ops(sdev)->pcm_ack(sdev, substream); + + return 0; +} + #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES) static inline int snd_sof_probe_compr_assign(struct snd_sof_dev *sdev, |