[alsa-devel] [PATCH] ALSA: pcm: Return negative delays from SNDRV_PCM_IOCTL_DELAY.
Takashi Iwai
tiwai at suse.de
Mon Apr 23 08:45:55 CEST 2018
On Sat, 21 Apr 2018 06:20:46 +0200,
Jeffery Miller wrote:
>
> The commit c2c86a97175f ("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: c2c86a97175f ("ALSA: pcm: Remove set_fs() in PCM core code")
> Signed-off-by: Jeffery Miller <jmiller at neverware.com>
> ---
>
> This patch changes the SNDRV_PCM_IOCTL_DELAY ioctl return behavior to
> be similar to what it was in an earlier kernel.
> I encountered this when upgrading from the 4.4 kernel to 4.14. Chrome
> Audio Server (cras) does not handle the error return as gracefully
> as it was handling the successful but negative delays.
>
> The intent of this patch is to simply revert the behavior of the call
> to match what it was previously.
>
> It has been applied and tested with the 4.14 kernel. I did confirm this
> is still an issue and is resolved with the patch on the tiwai/sound.git
> master branch.
This is an oversight, indeed. Applied now.
thanks,
Takashi
More information about the Alsa-devel
mailing list