From patchwork Sat May 16 12:32:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 48604 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A3CA21411 for ; Sat, 16 May 2015 12:36:15 +0000 (UTC) Received: by wixv7 with SMTP id v7sf6327194wix.0 for ; Sat, 16 May 2015 05:36:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=9GbDxHBmT+C/esfCKvVY1H9S3PZK1qlayjtK03XHthE=; b=EcYeNYWKJhuUjg1T564N3/XcbNDRSKpEr2HyXFawcAriPIeHjs0MkfBhNwA2mzMT0Z 5QSInOQIC8io07xLKyR9vhYYrOZ4oDJIAxWY5bNBXvNte5TZ91VF8vgLxdwJNanv3vpe nSI2Eer3IIyyy893Oly4mmPvLegV5DigZeo/mXiJ0bWWMeQzk+mQabR/Y7lw8siuJM7C TMlQxCQzPGfkSdWT7YxkpSQ7X3TBj4kuxqvo4syu3QzhAG1QvQYxcy/L1yG8w0I17y3s 1fBXOC7ptzuFgPGOePR3r37HSq7NAAmC0/0I7NNRAfD3mYm4S7q2ECmk/76qLKsiMLm3 nwHQ== X-Gm-Message-State: ALoCoQkb19DDzsC1e7iDdrPd5dfdlvRC1McAVEYPOMIsk+hNTv9xyvIVkCNEVs5bk7RvM5Z8qrcg X-Received: by 10.112.42.236 with SMTP id r12mr10775728lbl.2.1431779774926; Sat, 16 May 2015 05:36:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.162 with SMTP id g2ls636145lae.80.gmail; Sat, 16 May 2015 05:36:14 -0700 (PDT) X-Received: by 10.153.7.133 with SMTP id dc5mr10652691lad.17.1431779774539; Sat, 16 May 2015 05:36:14 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id dz10si2974451lac.34.2015.05.16.05.36.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 05:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lagr1 with SMTP id r1so77470378lag.0 for ; Sat, 16 May 2015 05:36:14 -0700 (PDT) X-Received: by 10.112.204.104 with SMTP id kx8mr10502740lbc.72.1431779774268; Sat, 16 May 2015 05:36:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2709690lbb; Sat, 16 May 2015 05:36:13 -0700 (PDT) X-Received: by 10.66.150.166 with SMTP id uj6mr18039843pab.23.1431779772481; Sat, 16 May 2015 05:36:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kc8si7072460pbc.130.2015.05.16.05.35.42; Sat, 16 May 2015 05:36:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755164AbbEPMdI (ORCPT + 28 others); Sat, 16 May 2015 08:33:08 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:36764 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755140AbbEPMdB (ORCPT ); Sat, 16 May 2015 08:33:01 -0400 Received: by wizk4 with SMTP id k4so22873901wiz.1 for ; Sat, 16 May 2015 05:33:00 -0700 (PDT) X-Received: by 10.194.236.66 with SMTP id us2mr27735114wjc.54.1431779580117; Sat, 16 May 2015 05:33:00 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-78-144-121-184.as13285.net. [78.144.121.184]) by mx.google.com with ESMTPSA id 9sm7151678wjr.11.2015.05.16.05.32.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 16 May 2015 05:32:59 -0700 (PDT) From: Srinivas Kandagatla To: Patrick Lai , Mark Brown Cc: Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , Banajit Goswami , Kenneth Westfield , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 07/13] ASoC: qcom: add dma channel control offset to variant data Date: Sat, 16 May 2015 13:32:56 +0100 Message-Id: <1431779576-2137-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431779462-1732-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1431779462-1732-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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);