[PATCH] ALSA: pcm: Add SNDRV_PCM_INFO_EXPLICIT_SYNC flag

Takashi Iwai tiwai at suse.de
Sat Aug 14 08:42:18 CEST 2021


On Fri, 13 Aug 2021 10:21:42 +0200,
Takashi Iwai wrote:
> 
> ALSA PCM core has an optimized way to communicate with user-space for
> its control and status data via mmap on the supported architectures
> like x86.  Depending on the situation, however, we'd rather want to
> enforce user-space notifying the applptr or hwptr change explicitly
> via ioctl.  For example, the upcoming non-contig and non-coherent
> buffer handling would need an explicit sync, and this needs to catch
> the applptr and hwptr changes.  Also, ASoC SOF driver will have the
> SPIB support that has the similar requirement for the explicit control
> of the applptr and hwptr.
> 
> This patch adds the new PCM hardware info flag,
> SNDRV_PCM_INFO_EXPLICIT_SYNC.  When this flag is set, PCM core
> disables both the control and the status mmap, which enforces
> user-space to update via SYNC_PTR ioctl.  In that way, drivers can
> catch the applptr and hwptr update and apply the sync operation if
> needed.
> 
> Link: https://lore.kernel.org/r/20210812113818.6479-1-tiwai@suse.de
> Link: https://lore.kernel.org/r/20210610205326.1176400-1-pierre-louis.bossart@linux.intel.com
> Signed-off-by: Takashi Iwai <tiwai at suse.de>

Now merged to for-next branch.


Takashi


More information about the Alsa-devel mailing list