From patchwork Thu May 21 21:53:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 6460221 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0CCF09F318 for ; Thu, 21 May 2015 21:55:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2FD7E20225 for ; Thu, 21 May 2015 21:55:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id EFB712053D for ; Thu, 21 May 2015 21:55:32 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 160C82659B6; Thu, 21 May 2015 23:55:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id E7ED1265987; Thu, 21 May 2015 23:53:35 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 092812659CE; Thu, 21 May 2015 23:53:35 +0200 (CEST) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by alsa0.perex.cz (Postfix) with ESMTP id 540E12659C4 for ; Thu, 21 May 2015 23:53:09 +0200 (CEST) Received: by wghq2 with SMTP id q2so648065wgh.1 for ; Thu, 21 May 2015 14:53:09 -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:in-reply-to :references; bh=jnHTwJo477MF5Ulu6Cq/1vxQSSXl8TrQTWPYCQdJYrg=; b=DXeiMOB4Ax+aVuBXhDW3FA3CfiToWf7W7DMjeqcQ3II0vII65lCcMg202VXrCfQLTC /LGPq5I1ivBnSZ2orzkRJS2xdQFybUrGQ2I/RELZeQ28roR0LX+peIwGIDBT5Na/iyBk IaOhRilyCV1QgEPv+P3IquvvJSz9sX51jkTv/UJS2uzhkvworxDH8B3kRM2c5gSLu+H5 KT4+tYki07L4AhPWWFGqXnY29x6Gamivy4uQSytMkjShlOC7SBqr29VbVjlSGrkOK4pW Fksj6WJMSIau5SVtIm5mtz6b9caW5RnOfboLnuSaaQTeM6w9+ouCbNk7wKrT/z2UC8KS BINA== X-Gm-Message-State: ALoCoQk0N8hVo5m8MKn198OXQav2VUEmW4S0MKDHqJDCpzHfSlq9Qhm+MccYvuObhfmlnjbgk3uI X-Received: by 10.180.218.195 with SMTP id pi3mr1373237wic.71.1432245189025; Thu, 21 May 2015 14:53:09 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-2-96-95-164.as13285.net. [2.96.95.164]) by mx.google.com with ESMTPSA id em17sm143586wid.11.2015.05.21.14.53.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 May 2015 14:53:08 -0700 (PDT) From: Srinivas Kandagatla To: Patrick Lai , Mark Brown Date: Thu, 21 May 2015 22:53:05 +0100 Message-Id: <1432245185-9119-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432245125-8939-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1432245125-8939-1-git-send-email-srinivas.kandagatla@linaro.org> Cc: devicetree@vger.kernel.org, Kenneth Westfield , Banajit Goswami , Pawel Moll , Ian Campbell , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Liam Girdwood , Rob Herring , Srinivas Kandagatla , Kumar Gala , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH v3 04/10] ASoC: qcom: add dma channel control offset to variant data X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds ability to pass dma channel control bits start offset, which differ in differnet qcom SOCs. On apq8016 dma channel control bits start after an offset of 1. Tested-by: Kenneth Westfield Acked-by: Kenneth Westfield Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/lpass-platform.c | 2 +- sound/soc/qcom/lpass.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index fc08891..8ab0ac1 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -91,7 +91,7 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, unsigned int channels = params_channels(params); unsigned int regval; int bitwidth; - int ret, rdma_port = pcm_data->i2s_port; + int ret, rdma_port = pcm_data->i2s_port + v->rdmactl_audif_start; bitwidth = snd_pcm_format_width(format); if (bitwidth < 0) { diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index 75e9370..023170a 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -61,6 +61,11 @@ struct lpass_variant { u32 rdma_reg_stride; u32 rdma_channels; + /** + * on SOCs like APQ8016 the channel control bits start + * at different offset to ipq806x + **/ + u32 rdmactl_audif_start; /* SOC specific intialization like clocks */ int (*init)(struct platform_device *pdev); int (*exit)(struct platform_device *pdev);