From patchwork Thu Aug 23 20:51:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Reid X-Patchwork-Id: 1368891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 208543FC66 for ; Thu, 23 Aug 2012 20:55:05 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4eND-0004DH-H4; Thu, 23 Aug 2012 20:51:27 +0000 Received: from mail-we0-f201.google.com ([74.125.82.201]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T4eN8-0004D3-Op for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 20:51:23 +0000 Received: by weyx56 with SMTP id x56so55138wey.0 for ; Thu, 23 Aug 2012 13:51:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=SvmO0oC/F/b+N+r4skTMWZEoZDA496OB+ORbe3Y/qIU=; b=QwHTiFb6ctvNTO25cWVz3/2Yy+4l2Z7t/pwde9yV0j+xeue7pHcEUpETLrC0cBJAXI jlrv3wjgTmsKyNefEQKOj/3oqmh6B1+ql1voEUSOccXu2HazhDgK7rrHD5KCiRNLIURy wEQ8yMstjQcP++QwrtJ2Cx+FTkAa/r+MZujusMsaxxdDvTGwdtck/YqHwLuU9ML3oZw4 8kp4JPrtEIa7zc6DsIwvP/J8ee3t9tHfeC2P5ZkhBN48kzJTiANyHrXh/0gWkrdjNntC DiDyqO24eSq3qiVy6X5jefjfEDd4SKdZNul7dqqeAfa7Sg4xr2XWUBxw3kJcpix0wCsU IPfg== Received: by 10.216.138.27 with SMTP id z27mr167311wei.13.1345755075336; Thu, 23 Aug 2012 13:51:15 -0700 (PDT) Received: by 10.216.138.27 with SMTP id z27mr167299wei.13.1345755075245; Thu, 23 Aug 2012 13:51:15 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id e5si54127wiw.0.2012.08.23.13.51.15 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 23 Aug 2012 13:51:15 -0700 (PDT) Received: from hojo20.mtv.corp.google.com (hojo20.mtv.corp.google.com [172.22.73.78]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id CE70A5C0050; Thu, 23 Aug 2012 13:51:14 -0700 (PDT) Received: by hojo20.mtv.corp.google.com (Postfix, from userid 123195) id 1C885180965; Thu, 23 Aug 2012 13:51:14 -0700 (PDT) From: Dylan Reid To: linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org Subject: [PATCH] ASoC: samsung dma - prepare dma in start/resume trigger path Date: Thu, 23 Aug 2012 13:51:09 -0700 Message-Id: <1345755069-9512-1-git-send-email-dgreid@chromium.org> X-Mailer: git-send-email 1.7.12.70.g851f7e6 X-Gm-Message-State: ALoCoQlD0cZqP19Ofz8N+bFusOK/W1ZE8S2JKn+6x1ZcG8Vz4iZD0EgLiTfUuUQxD1ymFOf3YUfxlLU9YFwESO5loQWsqBZwPwCRo7WuO4e2G1ELNIcmvbFu8PfZDybQM8IIzTafaIxh1m2k8wtNX3NKWBP2fxC+yCaexkW28a4EpdVIwAPdduFQfAdcK9h1pQN6M70eHP1uiXk7NGAK5AFVZVDXum4kxw== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.201 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, ben-linux@fluff.org, jassi.brar@samsung.com, padma.v@samsung.com, broonie@opensource.wolfsonmicro.com, alim.akhtar@samsung.com, olofj@chromium.org, Dylan Reid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On suspend all dma transactions are terminated (by the stop/suspend trigger calling ops->stop), they need to be set up again during resume. Move the prepare op to the start/resume/unpause trigger path so that dma and audio will restart on resume/unpause. Signed-off-by: Dylan Reid --- sound/soc/samsung/dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index f3ebc38..5772762 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -250,6 +250,7 @@ static int dma_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + dma_prepare(substream); prtd->state |= ST_RUNNING; prtd->params->ops->trigger(prtd->params->ch); break; @@ -352,7 +353,6 @@ static struct snd_pcm_ops dma_ops = { .ioctl = snd_pcm_lib_ioctl, .hw_params = dma_hw_params, .hw_free = dma_hw_free, - .prepare = dma_prepare, .trigger = dma_trigger, .pointer = dma_pointer, .mmap = dma_mmap,