From patchwork Tue Sep 16 13:53:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 4918121 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 617FE9F349 for ; Tue, 16 Sep 2014 13:53:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9924620142 for ; Tue, 16 Sep 2014 13:55:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AF8B201F5 for ; Tue, 16 Sep 2014 13:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754447AbaIPNyz (ORCPT ); Tue, 16 Sep 2014 09:54:55 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:43446 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754126AbaIPNyG (ORCPT ); Tue, 16 Sep 2014 09:54:06 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s8GDrwBW026685; Tue, 16 Sep 2014 08:53:58 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8GDrwpW015035; Tue, 16 Sep 2014 08:53:58 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Tue, 16 Sep 2014 08:53:58 -0500 Received: from dlep32.itg.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8GDrpMl031603; Tue, 16 Sep 2014 08:53:56 -0500 From: Peter Ujfalusi To: , , Russell King - ARM Linux CC: , , Subject: [PATCH v2 2/2] dmaengine: omap-dma: Restore the CLINK_CTRL in resume path Date: Tue, 16 Sep 2014 16:53:49 +0300 Message-ID: <1410875629-1540-3-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410875629-1540-1-git-send-email-peter.ujfalusi@ti.com> References: <1410875629-1540-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the audio stream is paused or suspended we stop the sDMA and when it is unpaused/resumed we start the channel without reconfiguring it. The omap_dma_stop() clears the link configuration when we pause the dma, but it is not setting it back on start. This will result only one audio buffer to be played back and the DMA will stop, since the linking is disabled. We need to restore the CLINK_CTRL register in case of resume. Signed-off-by: Peter Ujfalusi Acked-by: Russell King --- drivers/dma/omap-dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index c01ea505ee7c..e0990c505889 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -1019,6 +1019,9 @@ static int omap_dma_resume(struct omap_chan *c) if (c->paused) { mb(); + /* Restore chanel link register */ + omap_dma_chan_write(c, CLNK_CTRL, c->desc->clnk_ctrl); + omap_dma_start(c, c->desc); c->paused = false; }