From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ALSA: pcm: Return negative delays from SNDRV_PCM_IOCTL_DELAY. Date: Mon, 23 Apr 2018 08:45:55 +0200 Message-ID: References: <20180421042046.33408-1-jmiller@neverware.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 31609267284 for ; Mon, 23 Apr 2018 08:45:55 +0200 (CEST) In-Reply-To: <20180421042046.33408-1-jmiller@neverware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Jeffery Miller Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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 > --- > > 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