[alsa-devel] [PATCH 2/3] ALSA: pcm: add 'applptr' event of tracepoint

Takashi Iwai tiwai at suse.de
Sun Jun 11 18:53:35 CEST 2017


On Sun, 11 Jun 2017 08:48:07 +0200,
Takashi Sakamoto wrote:
> 
> In design of ALSA PCM core, both of hardware-side and application-side
> position on PCM buffer are maintained as a part of information for
> runtime of PCM substream. In a view of ALSA PCM application, these two
> positions can be updated by executing ioctl(2) with some commands.
> 
> There's an event of tracepoint for hardware-side position; 'hwptr'.
> On the other hand, no events for application-side position.
> 
> This commit adds a new event for this purpose; 'applptr'. When
> the application-side position is changed in kernel space, this event
> is probed with useful information for developers.
> 
> I note that the event is not probed for all of ALSA PCM applications,
> because the application-side position is passively maintained in mmap
> programming scenario. In this case, applications should be programmed
> with ioctl(2) with SNDRV_PCM_IOCTL_SYNC_PTR to commit the application-side
> position to kernel land when it operates any PCM frames.

Here "should" is no correct choice of word.  As you already noted in
the cover letter, the notification of appl_ptr in the mmap mode with
the status/control mmap is voluntary.   So, it's not "should be
programmed" but "may be programmed".


thanks,

Takashi


More information about the Alsa-devel mailing list