[alsa-devel] [RFC PATCH 2/4] ALSA: core: add .notify callback for pcm ops

Raymond Yau superquad.vortex2 at gmail.com
Thu Jul 9 09:25:58 CEST 2015


> >
> > When appl_ptr is updated let low-level driver know.
> >
> > This is only enabled when the NO_REWIND hardware flag is used,
> > so that the low-level driver/hardware to opportunistically pre-fetch
> > data.
> >
> > FIXME: should we rely on .ack for this?
> > Signed-off-by: Pierre-Louis Bossart <
pierre-louis.bossart at linux.intel.com>
>
> Hmm, OK, so the forward is allowed but with workarounds...
> But then why rewind won't work in a similar way?  DSP might be able to
> cancel some of inflight data.
>
> In other words, I see no reason to strict notify callback only for
> no_rewinds.  This is an optional ops in anyway.
>
> Also, I find the name "notify" a bit too ambiguous.  In this case,
> it's notifying the applptr change.  So, a name related with the
> function would be more understandable.
>
>

If driver specify no rewind flag, should alsa lib

1) return error when application call snd_pcm_rewind() and
snd_pcm_forward() ?
2) return zero when call snd_pcm_rewindable() and snd_pcm_forwardable()

How can the application recover when hw_ptr is behind appl_ptr when stop
threshold is set to boundary ?

Do you mean compressed audio stream don't support rewind and forward ?


More information about the Alsa-devel mailing list