]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Call substream ack() method upon compat mmap commit
authorAlan Young <consult.awy@gmail.com>
Fri, 9 Jul 2021 08:48:54 +0000 (09:48 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jul 2021 11:10:12 +0000 (13:10 +0200)
commita4bd1fd07b7d677e7eec115cc1b0442c3b3fc498
tree9fb77f556407893d3789e4cfc4ef712f5825da18
parent01da9c8979f3d24bb75ef7080a8d9915e88dff94
ALSA: pcm: Call substream ack() method upon compat mmap commit

If a 32-bit application is being used with a 64-bit kernel and is using
the mmap mechanism to write data, then the SNDRV_PCM_IOCTL_SYNC_PTR
ioctl results in calling snd_pcm_ioctl_sync_ptr_compat(). Make this use
pcm_lib_apply_appl_ptr() so that the substream's ack() method, if
defined, is called.

The snd_pcm_sync_ptr() function, used in the 64-bit ioctl case, already
uses snd_pcm_ioctl_sync_ptr_compat().

Fixes: 73b3990a2031 ("ALSA: pcm: Call ack() whenever appl_ptr is updated")
Signed-off-by: Alan Young <consult.awy@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/c441f18c-eb2a-3bdd-299a-696ccca2de9c@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c