Re: [PATCH RFC v2 2/4] ALSA: pcm: Add SNDRV_PCM_INFO_EXPLICIT_SYNC flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Aug 2021 20:37:06 +0200,
Pierre-Louis Bossart wrote:
> 
> 
> Hi Takashi,
> 
> > 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.
> > 
> > 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.
> 
> This looks like the same functionality as in the patch "ALSA: pcm:
> conditionally avoid mmap of control data" that we submitted for the SPIB
> support, no?

Yes, quite similar.  That's what I mentioned in the reply at that
time.

> I was about to resubmit a v2 based on my version (code was reviewed on
> GitHub in https://github.com/thesofproject/linux/pull/3076).
> 
> If it's the same solution, could this patch be applied first so we are
> aligned regardless of the order in which memalloc and SPIB patches are
> merged? The renaming is fine, and that was your idea that I implemented
> anyways.
> 
> I think there would be a need for a tag as well so that Mark's tree
> compiles when the SOF driver uses this.

Sure, I can merge this one with a slight more rewording.


thanks,

Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux