Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5092283ybv; Tue, 11 Feb 2020 09:02:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwGAzc47dW4o6A54U+OwbivS/C9k7CdU9gFWk4yitVLhBCKtkaTIDSIqlXQzp1EpWzQj4Bt X-Received: by 2002:a9d:6c01:: with SMTP id f1mr5773005otq.133.1581440566682; Tue, 11 Feb 2020 09:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581440566; cv=none; d=google.com; s=arc-20160816; b=LQIRh0eWI7c3RQhYl6GrvWC5s94P9jtAT+ck0+VuYNpaSihjr09MwZi/riodzWvdDx JPi6lk7fQhCdVFv4vTCy5HrrL59WtfY+BbV4gpY3ip2E37b/g6LxKIdgnXTHqKsVBmD4 2M1krh5S+ffx1gqFYnKL4m/IkP4lfzwLw+3KYM/M2R9JBu7wxnsegsvtCrQqE1r6HGjM eYLzOCWBOm2G+/84v3YvjMnbaRWJQRXQzuVEJP910ZSil8eZfAJSSF+RqyiCfMA3JT84 mg2pcbukWhgSJ0Vd4VCX4XSPk1gICWNphOk1YiC4lArnD4khBr4NzkulEyHT+0LVGKu5 56bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to:subject:cc:to:from :date; bh=QOxGSxorllsi2mnSAPFoSIxToJ9aPQ8mB78ih+IXFg0=; b=ozbF0AaPToQiUXKO+cohcC5gRqcEl3+t+GGHeVDhOIldzD/GrqXMBoXXTKJWCy1pRA LKLGzZrhomjMMzv66pl55ZnOOxYIOPgAwys2i5mwOacZkwVQYHnywb2C9lCy6dAt1O2l MGWB3GPgh6BMgRjkPB/YROv+ixYlDj6DrTDfa66iIdbyDJ9JSMdSPMUAnFaRovedkFYx pe3M3RmfQRnFDh3quPtekYoCsxD44r+x7DeeXy1IYWyfH0VylEYvNXW3wYB0jBP+o5dS RvBNb0yCDAXHFAKDRaBD0h1xxMl0cigStXOpsFpZDOGsKh3tVtWd97lYYqnG2iSvT9gr +r6A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si1901087oid.150.2020.02.11.09.02.26; Tue, 11 Feb 2020 09:02:46 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729593AbgBKPsW (ORCPT + 99 others); Tue, 11 Feb 2020 10:48:22 -0500 Received: from foss.arm.com ([217.140.110.172]:48156 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729058AbgBKPsW (ORCPT ); Tue, 11 Feb 2020 10:48:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 73FB730E; Tue, 11 Feb 2020 07:48:21 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB56D3F68E; Tue, 11 Feb 2020 07:48:20 -0800 (PST) Date: Tue, 11 Feb 2020 15:48:19 +0000 From: Mark Brown To: Peter Ujfalusi Cc: alsa-devel@alsa-project.org, broonie@kernel.org, lars@metafoo.de, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, Mark Brown , perex@perex.cz, tiwai@suse.com, vkoul@kernel.org Subject: Applied "ALSA: dmaengine_pcm: Consider DMA cache caused delay in pointer callback" to the asoc tree In-Reply-To: <20200210153336.10218-1-peter.ujfalusi@ti.com> Message-Id: X-Patchwork-Hint: ignore Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ALSA: dmaengine_pcm: Consider DMA cache caused delay in pointer callback has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 9d789dc047e32fb0f85ff192f883a534017512a2 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 10 Feb 2020 17:33:36 +0200 Subject: [PATCH] ALSA: dmaengine_pcm: Consider DMA cache caused delay in pointer callback Some DMA engines can have big FIFOs which adds to the latency. The DMAengine framework can report the FIFO utilization in bytes. Use this information for the delay reporting. Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200210153336.10218-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown --- sound/core/pcm_dmaengine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c index d8be7b488162..6852bb670b4e 100644 --- a/sound/core/pcm_dmaengine.c +++ b/sound/core/pcm_dmaengine.c @@ -240,6 +240,7 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_pointer_no_residue); snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream) { struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); + struct snd_pcm_runtime *runtime = substream->runtime; struct dma_tx_state state; enum dma_status status; unsigned int buf_size; @@ -257,7 +258,7 @@ snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream) state.in_flight_bytes); } - return bytes_to_frames(substream->runtime, pos); + return bytes_to_frames(runtime, pos); } EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_pointer); -- 2.20.1