From patchwork Wed May 14 03:23:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 4172371 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 2A56F9F1C0 for ; Wed, 14 May 2014 03:26:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 532D52025A for ; Wed, 14 May 2014 03:26:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77BF220254 for ; Wed, 14 May 2014 03:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754020AbaENDZo (ORCPT ); Tue, 13 May 2014 23:25:44 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:37042 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754014AbaENDZm (ORCPT ); Tue, 13 May 2014 23:25:42 -0400 Received: by mail-pa0-f54.google.com with SMTP id bj1so1074172pad.41 for ; Tue, 13 May 2014 20:25:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mIr9ZHSuSwZqsgu3uHsunWIWpONnQAPfFYLJELU8Kbo=; b=NWNEi32kbKy+5alGfvhwxCsey0hCBOEAsBNJS6xdZjYkfpY6Vmyd+ZfNlyw6mvlJXc xaLfaDtSBOF8Ql1OGdKojlSkyihtk3T39y8cNr4PvX/tYPupy7RSHUh2JEoFDr5XccNK Qs9wWSo5frhkbJOL+JTxZGnR4+jj/GXbHACUkKNwsiDu42n3XUQvwwYZ6W5tizR5/CxE RjIqClU93kdZTekLmbDEh+dmQzMC280NHEOiEQZoDTRjpXNFRIcKzFAknoGi2ZMML/E+ CPeafPVOeBzRQ7rJuALrQkJY5skCh3pqdgyB7ufSZ0Zzk6sWDkW5X84ul/urJLxYCeqU ZREw== X-Gm-Message-State: ALoCoQnYAKnUVsOHDnBuppfarWQhi42ul6g6sDdlwFImsu2KQu/UBR9u2lhSqmeJv8qII26nM0Q7 X-Received: by 10.66.136.131 with SMTP id qa3mr1043837pab.77.1400037941227; Tue, 13 May 2014 20:25:41 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id ay3sm685976pbb.62.2014.05.13.20.25.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 20:25:40 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Cc: vinod.koul@intel.com, dan.j.williams@intel.com, jassisinghbrar@gmail.com Subject: [PATCH] dma: pl330: Add support for DMA_PAUSE command Date: Wed, 14 May 2014 08:53:50 +0530 Message-Id: <1400037830-21211-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 While playing back audio, pmc_dmaengine requests the DMA channel to stop DMA transmission through DMA_PAUSE command. Currently PL330 driver doesn't support DMA pause command, leaving the DMA state inconsistent when the system resumes. Instead, it would be better to terminate the DMA transfer during suspend and restart again during resume. Tested with audio playback across a suspend-resume cycle. Signed-off-by: Tushar Behera --- drivers/dma/pl330.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 73fa9b7..cd70f42 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2362,6 +2362,7 @@ static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned LIST_HEAD(list); switch (cmd) { + case DMA_PAUSE: case DMA_TERMINATE_ALL: spin_lock_irqsave(&pch->lock, flags);