On Thu, 10 Jun 2021 22:53:24 +0200, Pierre-Louis Bossart wrote:
In case of mmap, by default alsa-lib mmaps both control and status data.
If driver subscribes for application pointer update, driver needs to get notification whenever appl ptr changes. With the above case driver won't get appl ptr notifications.
This patch check on a hw info flag and returns error when user land asks for mmaping control & status data, thus forcing user to issue IOCTL_SYNC_PTR.
This patch was originally submitted in 2017, c.f. https://lore.kernel.org/alsa-devel/1494896518-23399-4-git-send-email-subhran...
Suggested-by: Takashi Iwai tiwai@suse.de Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
This kind of flag itself was what I also introduced for another purpose, too. There is a WIP patch that allows the use of non-coherent non-contiguous buffer pages, and this flag would fit for that. FWIW, the patch is found at https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=topic...
Takashi