Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2025602imu; Fri, 14 Dec 2018 04:42:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/UFCt7RsLYc70Nsx2SO6beXGR6qXgr7R7a8DtJW5s6qRrB7XyMfffkZAjkB1Gno/9GdI4ny X-Received: by 2002:a63:4002:: with SMTP id n2mr2550758pga.137.1544791353200; Fri, 14 Dec 2018 04:42:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791353; cv=none; d=google.com; s=arc-20160816; b=ENIajGBTjXE+NGr8qXCeAx9PaLGZ3Zq8ZjlM5TeCK9SYlIl12HRP4crEGTn6WHiyPW fLcLygAZL9UMY9U2YMtbPsQ7bEMNe/7rlBcSaPDK6XXzmA6S0Vom6I17Ke3wlOSdUb7K XhTG3If8/Osa075n39wO+KkmW6LiWxSTq/3gRLON7AyWUQM3lZa05h0rTQEqma7IrX1y OPDD1Kkr6x3ebQjqA4vjBqEJQeFB9QdlyHCiu1cmBnayxxVmQ8a57QgdG2ILZdUQInR1 ObYWxvhPt27Ke0UQRikcY4g446rcj/JHF1h3gQzQL6kBdtNdm4dFL/lqO9WZuEO9HtVl Ql+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4+cDr/b7kDmADHFyBFmM+7akVI/RBTTeIRbEKp2RmkY=; b=f71ZiSRWNDj2Wf+WPf+BMuyTT3nVA6BLLbzC8sFlklAVAzoIF56cxVBzSUIUn0sHYy AtrbJFvPxaacEI5JyAm3/eNbe5e7VTxMVI0oHqOwz2BEZ50TKaWMMS3rrRVsWAveWT4H +k9cHIs1rALKOVvDhvl1JLwBR1cHA7C8eyLoJdQ1eqb9Vh1bQPkIRKzpkwu/1MMIj66O YjSDZZN+J3dFSSNomJI3QxPGPoHlsZzzuQKRcjD5bPukH0VcbJ23uQN33VD1FaOXQZTi 7AzF2Vetb9p/xnAml7mcTHquBgpGLKj7qyJBaRRevVPoAyATocokb/wrMAqYswBdUIH0 OgCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0AyNd8zk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t65si4140890pfb.247.2018.12.14.04.42.18; Fri, 14 Dec 2018 04:42:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0AyNd8zk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730714AbeLNMkS (ORCPT + 99 others); Fri, 14 Dec 2018 07:40:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:48900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730463AbeLNMEP (ORCPT ); Fri, 14 Dec 2018 07:04:15 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 822262146F; Fri, 14 Dec 2018 12:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789055; bh=RZnFNtdNTeexfCxuachR9pmsCk7+cs89Psly2Xirs+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0AyNd8zkHmJQnkkJtVKes/Hzix43M5cnVjbUAnXmqc/FjURv3l6BaOcNqznSnjaCT nvmYX5jWiYzsZczlR+xa28QuOziBTfKXmRz6rQ3iBJav7l7wGAWWl+E6NJKeR2yj1H C5PqC+evw9isDFkqSceZ8dsYhIPa4qn9P9LxAHYU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Jarkko Nikula , Mark Brown , Sasha Levin Subject: [PATCH 4.19 077/142] ASoC: omap-mcbsp: Fix latency value calculation for pm_qos Date: Fri, 14 Dec 2018 12:59:22 +0100 Message-Id: <20181214115750.145092847@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit dd2f52d8991af9fe0928d59ec502ba52be7bc38d ] The latency number is in usec for the pm_qos. Correct the calculation to give us the time in usec Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/omap/omap-mcbsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index d0ebb6b9bfac..2d6decbfc99e 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -308,9 +308,9 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, pkt_size = channels; } - latency = ((((buffer_size - pkt_size) / channels) * 1000) - / (params->rate_num / params->rate_den)); - + latency = (buffer_size - pkt_size) / channels; + latency = latency * USEC_PER_SEC / + (params->rate_num / params->rate_den); mcbsp->latency[substream->stream] = latency; omap_mcbsp_set_threshold(substream, pkt_size); -- 2.19.1