All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH RFC v2 2/4] ALSA: pcm: Add SNDRV_PCM_INFO_EXPLICIT_SYNC flag
Date: Fri, 13 Aug 2021 08:03:51 +0200	[thread overview]
Message-ID: <s5h7dgplw3c.wl-tiwai@suse.de> (raw)
In-Reply-To: <0a2debee-439d-ebb8-2832-039074194d75@linux.intel.com>

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

  reply	other threads:[~2021-08-13  6:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 11:38 [PATCH RFC v2 0/4] ALSA: Support for non-coherent and non-contiguous page allocation Takashi Iwai
2021-08-12 11:38 ` [PATCH RFC v2 1/4] ALSA: memalloc: Count continuous pages in vmalloc buffer handler Takashi Iwai
2021-08-12 11:38 ` [PATCH RFC v2 2/4] ALSA: pcm: Add SNDRV_PCM_INFO_EXPLICIT_SYNC flag Takashi Iwai
2021-08-12 18:37   ` Pierre-Louis Bossart
2021-08-13  6:03     ` Takashi Iwai [this message]
2021-08-12 11:38 ` [PATCH RFC v2 3/4] ALSA: memalloc: Support for non-contiguous page allocation Takashi Iwai
2021-08-12 11:38 ` [PATCH RFC v2 4/4] ALSA: memalloc: Support for non-coherent " Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h7dgplw3c.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.