]> Git Repo - linux.git/commit
ALSA: pcm: introduce INFO_NO_REWINDS flag
authorPierre-Louis Bossart <[email protected]>
Fri, 19 Nov 2021 23:08:50 +0000 (17:08 -0600)
committerMark Brown <[email protected]>
Wed, 24 Nov 2021 12:57:18 +0000 (12:57 +0000)
commitb456abe63f60ad93c83a526d33b71574bc32656c
tree94c85af14b3d80371e201924a4209673f2723423
parent0e888a74e52db369e19aec908131cf171079b306
ALSA: pcm: introduce INFO_NO_REWINDS flag

When the hardware can only deal with a monotonically increasing
appl_ptr, this flag can be set.

In case the application requests a rewind, be it with a
snd_pcm_rewind() or with a direct change of a mmap'ed pointer followed
by a SNDRV_PCM_IOCTL_SYNC_PTR, this patch checks if a rewind
occurred and returns an error.

Credits to Takashi Iwai for identifying the path with SYNC_PTR and
suggesting the pointer checks.

Suggested-by: Takashi Iwai <[email protected]>
Reviewed-by: Takashi Iwai <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
Reviewed-by: Kai Vehmanen <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
include/uapi/sound/asound.h
sound/core/pcm_lib.c
This page took 0.053842 seconds and 4 git commands to generate.