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: 48879 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 94D2E214BA for ; Thu, 21 May 2015 21:54:08 +0000 (UTC) Received: by wivs14 with SMTP id s14sf7903804wiv.1 for ; Thu, 21 May 2015 14:54:07 -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=TVnV1mgoenJOjSVfamOHkGoKUMF81ghuDo33jrbqzLg=; b=bidmQKj4sti83XlCdaH05Qmn1y1KfthmCVDP1tzv14CdRe26fJJJUjvmxqAeI+JkDY cVHEezT3XN/T68+shIyDwDH/mxs3e+7kSYiNhSML2qs9hTz9TPFSO6vZ/6dXzeUO9Iak WIxKPAYHw0QiQPWMkc/IS5tnCJKL26yQuMnCu4b3B/NL1GaWMsogKcTmcvcRlkHdySi4 bSurVbC/8QTAgpdrQ4m2241fDDiDg/7Bar6EAxFuHjIpCm2mb1Ew2w1uBPO5HAYqmjQB GBkdUwVTv8B/WJ9kEGTrT23V+8+iMbzG32Do6OtZDuDQKbrATIG6/fYSww2AmqXMYn2i WgCg== X-Gm-Message-State: ALoCoQlmZltIg30pvAo2kLBhfs9lLXtmRaIhwFUmpI+e2d7IM41J6+cbYaOXphgZCbUkzK4E3ViO X-Received: by 10.112.42.236 with SMTP id r12mr4624498lbl.2.1432245247863; Thu, 21 May 2015 14:54:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.230 with SMTP id y6ls459731lae.20.gmail; Thu, 21 May 2015 14:54:07 -0700 (PDT) X-Received: by 10.152.42.211 with SMTP id q19mr4020906lal.78.1432245247689; Thu, 21 May 2015 14:54:07 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id p1si87381lag.52.2015.05.21.14.54.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 14:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbzk7 with SMTP id zk7so444920lbb.0 for ; Thu, 21 May 2015 14:54:07 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr3918600lae.19.1432245247560; Thu, 21 May 2015 14:54:07 -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 hn6csp893082lbb; Thu, 21 May 2015 14:54:06 -0700 (PDT) X-Received: by 10.70.91.232 with SMTP id ch8mr9614996pdb.58.1432245245761; Thu, 21 May 2015 14:54:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si207868pdi.38.2015.05.21.14.54.04; Thu, 21 May 2015 14:54:05 -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 S1161102AbbEUVxQ (ORCPT + 28 others); Thu, 21 May 2015 17:53:16 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:36479 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161076AbbEUVxK (ORCPT ); Thu, 21 May 2015 17:53:10 -0400 Received: by wizk4 with SMTP id k4so29151159wiz.1 for ; Thu, 21 May 2015 14:53:09 -0700 (PDT) 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 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 v3 04/10] ASoC: qcom: add dma channel control offset to variant data 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> 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.217.179 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 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);