On Mon, 18 Oct 2021 18:57:12 +0200, Pierre-Louis Bossart wrote:
I mean only about the use EXPLICIT_SYNC flag. There has been already an info flag SYNC_APPLPTR, and this should suffice for your purpose. In a nutshell:
EXPLICIT_SYNC = disable both control and status mmaps SYNC_APPLPTR = disable only control mmap
Humm, are you sure Takashi? it's been a long time since we discussed this and your initial direction was to disable both?
To quote your own words from https://lore.kernel.org/alsa-devel/s5hfug51g0x.wl-tiwai@suse.de/
"In mmap mode, we transfer data on the mmap buffer, and update appl_ptr via mmap control. Both are done without notification to the driver (which is intentional for avoiding the context switching).
So we want to disable this optimization and always notify to the driver. Disabling mmap status/control is the straight hack as it falls back to ioctl and then the driver can know the change."
The above text was correct, per se. There was no *_SYNC_APPLPTR flag at that time, hence the only option was to disable both mmaps (that was done for 32bit PCM compat streams).
But now we have two ways to disable, as mentioned in the previous mail, that allows selectively disabling only the control mmap, which is required in most cases.
I really don't mind changing, I don't have enough background on this, just wanted to make sure that disabling the control mmap is sufficient on paper before we re-run tests. Thanks!
Yes, please verify.
thanks,
Takashi