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: 6460241 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2034CC0020 for ; Thu, 21 May 2015 21:55:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46D222053F for ; Thu, 21 May 2015 21:55:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7504820270 for ; Thu, 21 May 2015 21:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161083AbbEUVxO (ORCPT ); Thu, 21 May 2015 17:53:14 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:38835 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161079AbbEUVxK (ORCPT ); Thu, 21 May 2015 17:53:10 -0400 Received: by wichy4 with SMTP id hy4so28502095wic.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=YplobPAJ+fmnA/WkN/A5UTo+CefIab7dt0Uh9YmOGItBrbg0XYFlM35RbL9d6V/1kO u3e2MfUxlMnc/EjuKhZQcMTiz3EVIEsDrpbuBVK1uOAdAykV/NpwJiKpc7h90w7kcXPj XtVDnczVX5tT8OrsAfXIph07+65TnJpPlcn4+1aPy9XQpiW/NmDMHKi4rXZkZaaga9Ki //0b7OyK1gYyyqZizloGDfxq9CHULiu/ReEyVk68XA4wCM67ijqkrrSmIGgdyV+l/BcA ZIeQUpiwd2CjcyoOFApnuGmYGLtDWDh5Hn2shtVZW0+b4KFWpt+uyA7o0kW2YLpqcxlc U/Hw== X-Gm-Message-State: ALoCoQnAaA803zlkdcc+tCD45RvxnI4JVHcopwQ/xKI1u6ObOs3rlibsCXC4TWUlp9BEXzjR+GnN 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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);