Loading include/sound/pcm.h +4 −2 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ struct snd_pcm_ops { int (*prepare)(struct snd_pcm_substream *substream); int (*trigger)(struct snd_pcm_substream *substream, int cmd); snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *substream); int (*delay_blk)(struct snd_pcm_substream *substream); int (*wall_clock)(struct snd_pcm_substream *substream, struct timespec *audio_ts); int (*copy)(struct snd_pcm_substream *substream, int channel, Loading Loading @@ -872,6 +873,7 @@ int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, int snd_pcm_update_state(struct snd_pcm_substream *substream, struct snd_pcm_runtime *runtime); int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); int snd_pcm_update_delay_blk(struct snd_pcm_substream *substream); int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream); Loading include/sound/q6asm-v2.h +4 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,8 @@ struct audio_client { int (*fptr_cache_ops)(struct audio_buffer *abuff, int cache_op); atomic_t unmap_cb_success; atomic_t reset; /* holds latest DSP pipeline delay */ uint32_t path_delay; }; void q6asm_audio_client_free(struct audio_client *ac); Loading Loading @@ -470,5 +472,7 @@ int q6asm_send_mtmx_strtr_window(struct audio_client *ac, struct asm_session_mtmx_strtr_param_window_v2_t *window_param, uint32_t param_id); /* Retrieve the current DSP path delay */ int q6asm_get_path_delay(struct audio_client *ac); #endif /* __Q6_ASM_H__ */ include/sound/soc.h +10 −0 Original line number Diff line number Diff line Loading @@ -907,6 +907,16 @@ struct snd_soc_platform_driver { snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, struct snd_soc_dai *); /* * 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 *, struct snd_soc_dai *); /* platform stream pcm ops */ const struct snd_pcm_ops *ops; Loading sound/core/pcm_lib.c +5 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,11 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) return snd_pcm_update_hw_ptr0(substream, 0); } int snd_pcm_update_delay_blk(struct snd_pcm_substream *substream) { return substream->ops->delay_blk(substream); } /** * snd_pcm_set_ops - set the PCM operators * @pcm: the pcm instance Loading sound/core/pcm_native.c +6 −0 Original line number Diff line number Diff line Loading @@ -2608,6 +2608,12 @@ static int snd_pcm_delay(struct snd_pcm_substream *substream, int err; snd_pcm_sframes_t n = 0; /* * Called outside irq lock, as this will block waiting for * DSP to respond. */ snd_pcm_update_delay_blk(substream); snd_pcm_stream_lock_irq(substream); switch (runtime->status->state) { case SNDRV_PCM_STATE_DRAINING: Loading Loading
include/sound/pcm.h +4 −2 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ struct snd_pcm_ops { int (*prepare)(struct snd_pcm_substream *substream); int (*trigger)(struct snd_pcm_substream *substream, int cmd); snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *substream); int (*delay_blk)(struct snd_pcm_substream *substream); int (*wall_clock)(struct snd_pcm_substream *substream, struct timespec *audio_ts); int (*copy)(struct snd_pcm_substream *substream, int channel, Loading Loading @@ -872,6 +873,7 @@ int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, int snd_pcm_update_state(struct snd_pcm_substream *substream, struct snd_pcm_runtime *runtime); int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); int snd_pcm_update_delay_blk(struct snd_pcm_substream *substream); int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream); Loading
include/sound/q6asm-v2.h +4 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,8 @@ struct audio_client { int (*fptr_cache_ops)(struct audio_buffer *abuff, int cache_op); atomic_t unmap_cb_success; atomic_t reset; /* holds latest DSP pipeline delay */ uint32_t path_delay; }; void q6asm_audio_client_free(struct audio_client *ac); Loading Loading @@ -470,5 +472,7 @@ int q6asm_send_mtmx_strtr_window(struct audio_client *ac, struct asm_session_mtmx_strtr_param_window_v2_t *window_param, uint32_t param_id); /* Retrieve the current DSP path delay */ int q6asm_get_path_delay(struct audio_client *ac); #endif /* __Q6_ASM_H__ */
include/sound/soc.h +10 −0 Original line number Diff line number Diff line Loading @@ -907,6 +907,16 @@ struct snd_soc_platform_driver { snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, struct snd_soc_dai *); /* * 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 *, struct snd_soc_dai *); /* platform stream pcm ops */ const struct snd_pcm_ops *ops; Loading
sound/core/pcm_lib.c +5 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,11 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) return snd_pcm_update_hw_ptr0(substream, 0); } int snd_pcm_update_delay_blk(struct snd_pcm_substream *substream) { return substream->ops->delay_blk(substream); } /** * snd_pcm_set_ops - set the PCM operators * @pcm: the pcm instance Loading
sound/core/pcm_native.c +6 −0 Original line number Diff line number Diff line Loading @@ -2608,6 +2608,12 @@ static int snd_pcm_delay(struct snd_pcm_substream *substream, int err; snd_pcm_sframes_t n = 0; /* * Called outside irq lock, as this will block waiting for * DSP to respond. */ snd_pcm_update_delay_blk(substream); snd_pcm_stream_lock_irq(substream); switch (runtime->status->state) { case SNDRV_PCM_STATE_DRAINING: Loading