Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp15330ybt; Tue, 30 Jun 2020 13:51:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6hdIM3uKF7DnQ5yIfF69l6N9Y4EcOdiSfGVfddoyYJHgRCSg1TkN/CFaCx10/yxYity8m X-Received: by 2002:a50:9a82:: with SMTP id p2mr24640660edb.130.1593549896497; Tue, 30 Jun 2020 13:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593549896; cv=none; d=google.com; s=arc-20160816; b=HSG6H2STi/aTyTEPckZMp9oL6p4g+aL2vUMJGr+SNOh+rN77kKOolbJekAL1a+qYhM 3nIxD43VD3ZI1dVb6+yx1I6M9dbl87PGAS6meFi8xDmusAezl4w2gIGfVTPdRFyhEW7q lb4PHigsYDlFb3t22ABCrb2eeRcVWqHcZ7q+M1UGbX35ksmn94KXTFxYQuyrzcb7y6k8 7kRipdWU3mJSEVVy1rBpByEeywvndGdR9YGGFWyZavFLdOuKa4veCLYJpNahLyd7cOK0 MTtbTFuyaIGtzsvR7x276lPBWqYyr5NBB+ZTGcY3rqHGxHOq0OyE7xYSG2jE6t2wTNP5 Lg9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=mfiMhvbmtnm+tXAKCN63eyhgj9b7musJa++oOQ18GmI=; b=FP3+jd9ERIV6HnaY7O50QR5A8osVhA3S8B11FNj3OXHhyuHRIlKJcI3gcClmzlzHZY N7lI3vlauC1h/87TbSH+X1aOtLr/Z14tRKaTMYtBS4PYYUwlsCb+NLVgyZ5ke2O5FPk8 T//NnqgW+QrpNfHh0NrZvOsw5OYvyvBem8+y7p/xhVMFWZxOF4HzF9dbhKHYNiGu2U7S 0kyoENHCqNMX11WW1Ef2pwz0apyAkO3Vyi95mR69QOBp54JSlkDN9tj1ybsy0vwdsW/0 gnFckEX5m2DnhbtfppasGhb+ZzBLrtjtN9M7lwmM7+q2UV2dBv7GkE9ZtPQpqgTSNG4Q Y0sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=BAIwnhaN; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=UfTIEjG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly20si2456246ejb.607.2020.06.30.13.44.33; Tue, 30 Jun 2020 13:44:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=BAIwnhaN; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=UfTIEjG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390825AbgF3Sdm (ORCPT + 99 others); Tue, 30 Jun 2020 14:33:42 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55873 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729676AbgF3Sdl (ORCPT ); Tue, 30 Jun 2020 14:33:41 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7D3705C00B5; Tue, 30 Jun 2020 14:33:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 30 Jun 2020 14:33:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=m fiMhvbmtnm+tXAKCN63eyhgj9b7musJa++oOQ18GmI=; b=BAIwnhaNqYpRzszHu kMJQzYdfuqPvgkWKcv/YfGqZlwZCaYxibCE3p2BwXzniISJ8Knxje8fW7bUXsDol 77S530XIAuWFHOXKJgHYfAU/dqxEwK9rtrXCWgcBeR2qwOH2sAGPC73V8uTuw6HE MPEB3vhhit/sdnzjQgaJ/4SEUN/lG7uD9nqOvrqLrEjZC4Qpk4uPQclwjHIfSudj /m1JSb3aJWoGJ7w/P3Qga1kH5x+LNJlXtNRz02UFKSOudzeqWLiwjrShiro0vAfC qdFCzMLIUSz/TygjvyrV/OKNO5tNHQITJ0XK+CfYJGNsM5xXHpEgmy2UjufliBKO YDtJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=mfiMhvbmtnm+tXAKCN63eyhgj9b7musJa++oOQ18G mI=; b=UfTIEjG5HUvcqW9D1KsWrGE4hsFLj7TjV1lskAM7i8l/lrlysD1x7xOcK Ob+SlbSOoOcjA4KayDgbbeb1gXehyhmLkBHfC3wfJSJJN0t3rRJcISD/gaCcMiog oSP8bXyn7GMw24Zx/j9RFrz2hC9RwA0et7a5F54bQmWQmROZjdRjpGZIQRE7aEcr 4WFtMbpBSFf6TRpa9ZBSHR3hb5ckphPsyp71yeD+BMtb9X3y4OdGRjOn+WVqKBX9 5hO0Bh1XpYrM+wVtF77GPfi3c+08w5SnFMtRViZ38eGAISYlVGbNS4prymwmgKN0 3OP1kZVIIRxAPXPv4B828lnDEzBQQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtddtgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeegieejue dvffeuvdfftdetfeeuhfekhefgueffjeevtedtlefgueduffffteeftdenucffohhmrghi nhepkhgvrhhnvghlrdhorhhgnecukfhppeekfedrkeeirdekledruddtjeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgr hhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 6861630600BF; Tue, 30 Jun 2020 14:33:39 -0400 (EDT) Date: Tue, 30 Jun 2020 20:33:28 +0200 From: Greg KH To: Sasha Levin Cc: Alexander Tsoy , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Takashi Iwai Subject: Re: [PATCH 4.9 026/191] ALSA: usb-audio: Improve frames size computation Message-ID: <20200630183328.GA1916087@kroah.com> References: <20200629154007.2495120-1-sashal@kernel.org> <20200629154007.2495120-27-sashal@kernel.org> <20200630165407.GZ1931@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200630165407.GZ1931@sasha-vm> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 12:54:07PM -0400, Sasha Levin wrote: > On Tue, Jun 30, 2020 at 01:49:50PM +0300, Alexander Tsoy wrote: > > В Пн, 29/06/2020 в 11:37 -0400, Sasha Levin пишет: > > > From: Alexander Tsoy > > > > > > [ Upstream commit f0bd62b64016508938df9babe47f65c2c727d25c ] > > > > > > For computation of the the next frame size current value of fs/fps > > > and > > > accumulated fractional parts of fs/fps are used, where values are > > > stored > > > in Q16.16 format. This is quite natural for computing frame size for > > > asynchronous endpoints driven by explicit feedback, since in this > > > case > > > fs/fps is a value provided by the feedback endpoint and it's already > > > in > > > the Q format. If an error is accumulated over time, the device can > > > adjust fs/fps value to prevent buffer overruns/underruns. > > > > > > But for synchronous endpoints the accuracy provided by these > > > computations > > > is not enough. Due to accumulated error the driver periodically > > > produces > > > frames with incorrect size (+/- 1 audio sample). > > > > > > This patch fixes this issue by implementing a different algorithm for > > > frame size computation. It is based on accumulating of the remainders > > > from division fs/fps and it doesn't accumulate errors over time. This > > > new method is enabled for synchronous and adaptive playback > > > endpoints. > > > > > > Signed-off-by: Alexander Tsoy > > > Link: > > > https://lore.kernel.org/r/20200424022449.14972-1-alexander@tsoy.me > > > Signed-off-by: Takashi Iwai > > > Signed-off-by: Sasha Levin > > > --- > > > sound/usb/card.h | 4 ++++ > > > sound/usb/endpoint.c | 43 ++++++++++++++++++++++++++++++++++++++-- > > > --- > > > sound/usb/endpoint.h | 1 + > > > sound/usb/pcm.c | 2 ++ > > > 4 files changed, 45 insertions(+), 5 deletions(-) > > > > Please drop this patch from the queue for now (and for 4.4 as well). It > > introduced a regression for some devices. The fix is available, but not > > accepted yet. > > I've dropped it from the older branches, but note that it's already in > newer released stable kernels. Should it be reverted or should we wait > for the fix? I was going to wait for the fix.