Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4712200imm; Mon, 18 Jun 2018 21:31:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKUV9K/VeBN6m1Vvd0R7p9xWsKeLmy9OBDf9fFbG2La9sq7fsvTUlpa+8ad8GOu47WrqfB8 X-Received: by 2002:a17:902:6105:: with SMTP id t5-v6mr17160714plj.138.1529382668345; Mon, 18 Jun 2018 21:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529382668; cv=none; d=google.com; s=arc-20160816; b=w5R4pS1Z0gbOp+tnVU75EWLmcrQMFZ0TZrih8cNujccqFTwALqkJu5jeVQxRx0nKnf UzvhziqlHha4oHmgul9hoefnQwoEMsGfyeKBpGKdUKDunpwIxZzTREQloymI1axMZqXo p/xYATqOcfTs+XFW9k+Q9NEJTD3D0WJqt2d8WQfP9ApCd1BmutGdaucc6RrGPODMbw5o Or95VIIhH1F6Lfr8JKNTcEIBgNmWrLUoou66l2Zv0yH7sxGTh5RIduzdGzOcNstJ2uRr 5OkT9jQate+Pa/9Hu6BcoqST0dUZpvAWL7WoQ7MbQlHPpQcRSq5n0hSBKXqtFYG72yqP CIyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=9v5/C9Z0slay93IXhZ7mgTtOL9XuZ5nksx/G11WY4vo=; b=bTYPdPQjAGUH0uoAPQYAixubAXXqlqIc7KYycjcAB957gMfd4IV2Npds5xe3OzhKtg zbKDVGLW61xoxgNxhgs1DETttJE3KnulhVRYkJ7eqZITfJa9djDld1NihG+LT6+w323k CU2CFagYtcBkkQAGNQKGWM7/fh3DvrOuNsgsc9SWoQ8aCqWUukzlQ96JRZcQuXo0Hd7i OZx3er8ld1YtqSGSobvXleFvUJVNaImBpQv5iXOmMidfUo37EahSrKTwSAuaxXC9Ao5b 6CqORtUG/e5UmmccuHaxbnyZI3E4h2DigvrQ1cGVzhDnBztOU+/Pyx5/ae+X6aEZiEcY s2vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=n4gJuJ3G; 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=pass (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 b4-v6si13480949pgu.390.2018.06.18.21.30.54; Mon, 18 Jun 2018 21:31:08 -0700 (PDT) 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=n4gJuJ3G; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965323AbeFSE3T (ORCPT + 99 others); Tue, 19 Jun 2018 00:29:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:40980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750816AbeFSE3R (ORCPT ); Tue, 19 Jun 2018 00:29:17 -0400 Received: from localhost (unknown [106.200.222.147]) (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 F337620661; Tue, 19 Jun 2018 04:29:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529382556; bh=dFalYT9mILSAljBoFp6rIikURZldsFLL31jACZnhyjE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n4gJuJ3GgdsncMQzNz1j6MkMHtBeme4w6jqcusulKAtn4kObNRB7F3DYXfi8zZbKc u1qDBet+8a527bDs8AFmRx7JliChQgFZ6hB0ssS0AfnOVXEqjtzhreEhLUiMbpit29 OxWbBZt5U7n9/pQzxxH8vz+jikHlzd8WU70IXFTA= Date: Tue, 19 Jun 2018 09:59:08 +0530 From: Vinod To: Janusz Krzysztofik Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Ujfalusi , Jarkko Nikula , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, Aaro Koskinen , Tony Lindgren , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] dmaengine: ti: omap-dma: Fix OMAP1510 incorrect residue_granularity Message-ID: <20180619042908.GM25852@vkoul-mobl> References: <20180605165957.29616-1-jmkrzyszt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180605165957.29616-1-jmkrzyszt@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05-06-18, 18:59, Janusz Krzysztofik wrote: > Commit 0198d7bb8a0c ("ASoC: omap-mcbsp: Convert to use the sdma-pcm > instead of omap-pcm") resulted in broken audio playback on OMAP1510 > (discovered on Amstrad Delta). > > When running on OMAP1510, omap-pcm used to obtain DMA offset from > snd_dmaengine_pcm_pointer_no_residue() based on DMA interrupt triggered > software calculations instead of snd_dmaengine_pcm_pointer() which > depended on residue value calculated from omap_dma_get_src_pos(). > Similar code path is still available in now used > sound/soc/soc-generic-dmaengine-pcm.c but it is not triggered. > > It was verified already before that omap_get_dma_src_pos() from > arch/arm/plat-omap/dma.c didn't work correctly for OMAP1510 - see > commit 1bdd7419910c ("ASoC: OMAP: fix OMAP1510 broken PCM pointer > callback") for details. Apparently the same applies to its successor, > omap_dma_get_src_pos() from drivers/dma/ti/omap-dma.c. > > On the other hand, snd_dmaengine_pcm_pointer_no_residue() is described > as depreciated and discouraged for use in new drivers because of its > unreliable accuracy. However, it seems the only working option for > OPAM1510 now, as long as a software calculated residue is not > implemented as OMAP1510 fallback in omap-dma. > > Using snd_dmaengine_pcm_pointer_no_residue() code path instead of > snd_dmaengine_pcm_pointer() in sound/soc/soc-generic-dmaengine-pcm.c > can be triggered in two ways: > - by passing pcm->flags |= SND_DMAENGINE_PCM_FLAG_NO_RESIDUE from > sound/soc/omap/sdma-pcm.c, > - by passing dma_caps.residue_granularity = > DMA_RESIDUE_GRANULARITY_DESCRIPTOR from DMA engine. > > Let's do the latter. > > Created and tested against next-20180531 tag from linux-next tree. This is not useful for log. I have stripped this and applied -- ~Vinod