From 1b221c22c7984b5a833e7567774dbd2f4823686d Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Fri, 13 Mar 2020 15:25:57 -0700 Subject: [PATCH] ANDROID: GKI: SoC: pcm: Add fields to struct snd_pcm_ops and struct snd_soc_component_driver These are required to resolve the ABI diffs for these structs. Test: make Bug: 151372815 Signed-off-by: Kenneth Westfield Signed-off-by: Meng Wang Change-Id: Ic83229850787aaa07b5e1d0b22f3192afdd6e434 (cherry picked from commit 9206459050ce19be76c2e4d9a57c158fbcb2a5e4) [hridya: commit amended to only include ABI diff] Signed-off-by: Hridya Valsaraju --- include/sound/pcm.h | 3 +++ include/sound/soc.h | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e260af68ec0e..096f2a59b7ab 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -80,6 +80,9 @@ struct snd_pcm_ops { struct timespec *system_ts, struct timespec *audio_ts, struct snd_pcm_audio_tstamp_config *audio_tstamp_config, struct snd_pcm_audio_tstamp_report *audio_tstamp_report); + int (*delay_blk)(struct snd_pcm_substream *substream); + int (*wall_clock)(struct snd_pcm_substream *substream, + struct timespec *audio_ts); int (*fill_silence)(struct snd_pcm_substream *substream, int channel, unsigned long pos, unsigned long bytes); int (*copy_user)(struct snd_pcm_substream *substream, int channel, diff --git a/include/sound/soc.h b/include/sound/soc.h index 81db2139a254..6a03bda1ffb9 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -807,6 +807,16 @@ struct snd_soc_component_driver { int (*set_bias_level)(struct snd_soc_component *component, enum snd_soc_bias_level level); + /* + * For platform-caused delay reporting, where the thread blocks waiting + * for the delay amount to be determined. Defining this will cause the + * ASoC core to skip calling the delay callbacks for all components in + * the runtime. + * Optional. + */ + snd_pcm_sframes_t (*delay_blk)(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai); + const struct snd_pcm_ops *ops; const struct snd_compr_ops *compr_ops;