From patchwork Wed Nov 6 10:16:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 3146181 Return-Path: X-Original-To: patchwork-linux-arm@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 C44AD9F432 for ; Wed, 6 Nov 2013 10:21:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A25D8200ED for ; Wed, 6 Nov 2013 10:21:16 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C3AF2038E for ; Wed, 6 Nov 2013 10:21:15 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0CU-0003Ad-TK; Wed, 06 Nov 2013 10:19:04 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0Bt-0002Q9-OH; Wed, 06 Nov 2013 10:18:25 +0000 Received: from mail-ie0-f181.google.com ([209.85.223.181]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0As-0002EX-KQ for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2013 10:17:25 +0000 Received: by mail-ie0-f181.google.com with SMTP id ar20so17481578iec.12 for ; Wed, 06 Nov 2013 02:17:01 -0800 (PST) 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:in-reply-to :references; bh=jztQRdGI+wCUmxgaDye9xc2YKDHafJGnSsOv4Dm4RPo=; b=IL6JIcVAmskV3FUOH8r2w0Z8oEnQxuUs0vQ9mel+SNHne/bjCYCzw7g5ibPElPDdpm yw8mQh85OD34sFjDcvT4WhUFdURACp5xUxwxka2SmaruS0yffhQKeYknntZQjDolAalK LUJS8WeaudR+CadLEHjyOSDCOkzw+WYUzSjiNizNG/qJvxQkdD98+r3e2Vprf8XrEk+Z +5wrH6zyleTSi+HhgkOAv35t7BA771LVgc3iTaXWlBYpeLJZBEIUGsfdM0FqCoAqwZGu +Y4+bOCVnP8NsQpbyYCaXCZTcAOKlI3uXkv7f6I6M9tnOBdwy7QWWXq7jl3nrpEvm8Vw YKKQ== X-Gm-Message-State: ALoCoQmnSH4exTLuCF4nOWnFCwgvfyejCB4W2weFcY352IYAixl8w6vC+Ct4X8z85Y7xdI13L17Z X-Received: by 10.50.55.65 with SMTP id q1mr19442359igp.4.1383733021537; Wed, 06 Nov 2013 02:17:01 -0800 (PST) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginm.net. [92.233.57.238]) by mx.google.com with ESMTPSA id ka1sm13308397igb.7.2013.11.06.02.16.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 02:17:01 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/13] ASoC: generic-dmaengine-pcm: Clear slave_config memory Date: Wed, 6 Nov 2013 10:16:20 +0000 Message-Id: <1383732985-18928-9-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1383732985-18928-1-git-send-email-lee.jones@linaro.org> References: <1383732985-18928-1-git-send-email-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131106_051722_767603_7890ADC0 X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -2.6 (--) Cc: linus.walleij@linaro.org, Mark Brown , Lee Jones , alsa-devel@alsa-project.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 We currently assume that the DMA Slave Config will be fully populated by the platform, however some DMA Engines make decisions based on zero (default) flags such as DMA_SLAVE_BUSWIDTH_UNDEFINED and as this is a static declaration we need to memset it to clear the data area. Cc: alsa-devel@alsa-project.org Cc: Mark Brown Signed-off-by: Lee Jones Acked-by: Lars-Peter Clausen --- sound/soc/soc-generic-dmaengine-pcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index ee07903..6ad4c7a 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -90,6 +90,8 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream, struct dma_slave_config slave_config; int ret; + memset(&slave_config, 0, sizeof(slave_config)); + if (!pcm->config) prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; else