ALSA: pcm: Assure sync with the pending stop operation at suspend
authorTakashi Iwai <tiwai@suse.de>
Sat, 6 Feb 2021 20:36:54 +0000 (21:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:19 +0000 (11:37 +0100)
commit7011cd4599ef80bad9453a3e4ea0aa3f86ff5e3f
tree5e7fcc7d799807a27114023c7ea120f84087fadf
parent6bcf443bce968a5622102b12e5f0f87364f4a153
ALSA: pcm: Assure sync with the pending stop operation at suspend

commit 2c87c1a49c9d113a9f3e8e951d7d64be5ff50ac1 upstream.

The current PCM code calls the sync_stop at the resume action due to
the analogy to the PCM prepare call pattern.  But, it makes little
sense, as the sync should have been done rather at the suspend time,
not at the resume time.

This patch corrects the sync_stop call at suspend/resume to assure the
sync before finishing the suspend.

Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210206203656.15959-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/pcm_native.c