ok, thanks for confirming. we'll remove the INFO_RESUME flag in SOF and
follow-up with the removal on all other Intel drivers. Thanks for
enlightening us on this.
Actually one more question related to the documentation, which reads
"Note that the trigger with SUSPEND can always be called when
snd_pcm_suspend_all() is called, regardless of the SNDRV_PCM_INFO_RESUME
flag. The RESUME flag affects only the behavior of snd_pcm_resume().
(Thus, in theory, SNDRV_PCM_TRIGGER_RESUME isn’t needed to be handled in
the trigger callback when no SNDRV_PCM_INFO_RESUME flag is set. But,
it’s better to keep it for compatibility reasons.)"
I could not figure out what the last sentence means. It's my
understanding that the resume_trigger will never be called with the code
flow below when INFO_RESUME isn't declared. Would you mind clarifying
what this compatibility might be? Thanks!
static int snd_pcm_pre_resume(struct snd_pcm_substream *substream, int
state)
{
struct snd_pcm_runtime *runtime = substream->runtime;
if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
return -ENOSYS;
res = ops->pre_action(substream, state);
if (res < 0)
return res; <<< return means trigger_resume is not called?
res = ops->do_action(substream, state);
static const struct action_ops snd_pcm_action_resume = {
.pre_action = snd_pcm_pre_resume,
.do_action = snd_pcm_do_resume,
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel