]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Return negative delays from SNDRV_PCM_IOCTL_DELAY.
authorJeffery Miller <jmiller@neverware.com>
Sat, 21 Apr 2018 04:20:46 +0000 (23:20 -0500)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Apr 2018 06:41:35 +0000 (08:41 +0200)
commit99453fad1a5f9cab44e9ac46f96e3ebe889c89a3
tree36add24bfb45ba8eee0a08a37aabc9f38756037c
parent5d30052dd442074c10ab35b64bd53a3dc43cea79
ALSA: pcm: Return negative delays from SNDRV_PCM_IOCTL_DELAY.

The commit c6a33edbdf5e ("ALSA: pcm: Remove set_fs() in PCM core code")
changed SNDRV_PCM_IOCTL_DELAY to return an inconsistent error instead of a
negative delay.  Originally the call would succeed and return the negative
delay.  The Chromium OS Audio Server (CRAS) gets confused and hangs when
the error is returned instead of the negative delay.

Help CRAS avoid the issue by rolling back the behavior to return a
negative delay instead of an error.

Fixes: c6a33edbdf5e ("ALSA: pcm: Remove set_fs() in PCM core code")
Signed-off-by: Jeffery Miller <jmiller@neverware.com>
Cc: <stable@vger.kernel.org> # v4.13+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_compat.c
sound/core/pcm_native.c