Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946122AbbFSVRU (ORCPT ); Fri, 19 Jun 2015 17:17:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51452 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756081AbbFSUjK (ORCPT ); Fri, 19 Jun 2015 16:39:10 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , gabriel@unseen.is, Marek Szyprowski , Maxime Ripard , Vinod Koul Subject: [PATCH 4.0 047/105] dmaengine: Fix choppy sound because of unimplemented resume Date: Fri, 19 Jun 2015 13:35:37 -0700 Message-Id: <20150619203559.589858101@linuxfoundation.org> X-Mailer: git-send-email 2.4.4 In-Reply-To: <20150619203558.187802739@linuxfoundation.org> References: <20150619203558.187802739@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1926 Lines: 52 4.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Krzysztof Kozlowski commit 88d04643c66052a1cf92a6fd5f92dff0f7757f61 upstream. Some drivers implement only pause operation (no resuming). Example is pl330 where pause is needed for getting residuum. pl330 does not support resume operation, transfer must be stopped after pause. However for slaves this is exposed always as "pause and resume" which introduces subtle errors on Odroid U3 board (Exynos4412 with pl330). After adding pause function to pl330 driver the audio playback (utilizing DMA) gets choppy after some time (approximately 24 hours). Fix this by exposing "cmd_pause" if and only if pause and resume are implemented. Signed-off-by: Krzysztof Kozlowski Reported-by: gabriel@unseen.is Reported-by: Marek Szyprowski Fixes: 88987d2c7534 ("dmaengine: pl330: add DMA_PAUSE feature") Acked-by: Maxime Ripard Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/dmaengine.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -505,7 +505,11 @@ int dma_get_slave_caps(struct dma_chan * caps->directions = device->directions; caps->residue_granularity = device->residue_granularity; - caps->cmd_pause = !!device->device_pause; + /* + * Some devices implement only pause (e.g. to get residuum) but no + * resume. However cmd_pause is advertised as pause AND resume. + */ + caps->cmd_pause = !!(device->device_pause && device->device_resume); caps->cmd_terminate = !!device->device_terminate_all; return 0; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/