From patchwork Thu Apr 30 17:17:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 6306401 Return-Path: X-Original-To: patchwork-alsa-devel@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 37980BEEE1 for ; Thu, 30 Apr 2015 17:23:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59C11201BB for ; Thu, 30 Apr 2015 17:23:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0FD8E2018E for ; Thu, 30 Apr 2015 17:23:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 355A2260612; Thu, 30 Apr 2015 19:23:23 +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 22DA52661CD; Thu, 30 Apr 2015 19:20:09 +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 9AB772661BF; Thu, 30 Apr 2015 19:20:07 +0200 (CEST) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by alsa0.perex.cz (Postfix) with ESMTP id CDFAF2606B4 for ; Thu, 30 Apr 2015 19:17:36 +0200 (CEST) Received: by wizk4 with SMTP id k4so27945264wiz.1 for ; Thu, 30 Apr 2015 10:17:36 -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=+o15cacAj0W1gLudSza57Tuvd6QnEoqLmmwUiu07p60=; b=bD7VzXaE8cyjks2IilKTk8tjgQTopsnfMBKjWdromyRa1ysIbOLWZTgPuaV6vkz6U2 3Uf676Vjdhym50UHt0fV+lpfteXpzCjEBd6XuXHoXmwtXVlRBXbKbDVIXJmaI7Wb9lkJ 039bkXyEpg5K6Tv/MyLdobUveEdfJotHAg8F8+ShH7v8LxW+1Q3gzOlg9kyyBCPubyTI isSlLbFsfF/jKXZIVJfz2sBmIqVKJR/88QoRFTkm/5h/S7XH8CVX3+evxlS4CzQh/H3J ixQLGxcsZi0MYCYvyq0rqPNSCSkOoOUJg0uwf6Vi+2Vdx2JESc8Rb0DxJMN4qF5VQ+fp OxZg== X-Gm-Message-State: ALoCoQlIJmuunrkEfYa2S95IJQgi3/RBw9jBv/VrpJ7nAGwHypGpQbsXw8pt66OT1o2hNR60Wop+ X-Received: by 10.194.248.132 with SMTP id ym4mr10894678wjc.74.1430414256483; Thu, 30 Apr 2015 10:17:36 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-2-98-219-188.as13285.net. [2.98.219.188]) by mx.google.com with ESMTPSA id qt2sm4176554wjc.7.2015.04.30.10.17.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Apr 2015 10:17:35 -0700 (PDT) From: Srinivas Kandagatla To: Patrick Lai , Mark Brown Date: Thu, 30 Apr 2015 18:17:32 +0100 Message-Id: <1430414252-11210-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430414148-10869-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1430414148-10869-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] [RFC PATCH 08/14] 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. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/lpass-platform.c | 2 +- sound/soc/qcom/lpass.h | 6 ++++++ 2 files changed, 7 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 301f784..e07ed52 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -61,6 +61,12 @@ 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; + /* OCR clock is not present in SOCs like APQ8016 */ bool no_osr_clk; /* SOC specific intialization like clocks */