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: 6421721 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 D4B32C0432 for ; Sat, 16 May 2015 12:37:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 070BF2058C for ; Sat, 16 May 2015 12:37:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C836720145 for ; Sat, 16 May 2015 12:37:03 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D18E326661F; Sat, 16 May 2015 14:37:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 0A97C261A5A; Sat, 16 May 2015 14:33:54 +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 3E69E261A5A; Sat, 16 May 2015 14:33:53 +0200 (CEST) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by alsa0.perex.cz (Postfix) with ESMTP id 53DE12608AB for ; Sat, 16 May 2015 14:33:00 +0200 (CEST) Received: by wicnf17 with SMTP id nf17so20730980wic.1 for ; Sat, 16 May 2015 05:33:00 -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=35AH8CkhO+vVdssbWoy5wdDpNQy5MqGxpqHAMfErF/E=; b=nNZag+dWn+0PLwVzfRAXfj2KpmR44I/Pi2LoI5T2VlJgRUWLQcPiGiSL6RYCBov2Fu xA/CWgw8FcdxLj1m2lo1cjt6eLSZd4YMITP4PcfzfJ6UqieXVm9Q56GukDjMy1qEa7XP aHiMOIlc9Ju6TmXYjSi+ET8A4IJr/gj2Zu8NPDwnzSSH92X+I1F+s+jfLKUoxT8gnjw0 NI9R480n5hUBGg8jboEqp+WSx1MaS3y0gXmUKSD4RsEa64g4vIF5MUzKChbsi3Lhic9E 5ZZoXp1FT5bjeiBMIg+xiXhNW79y0Dcc0V6dn5QA+jYUeQxvAyEykUqOB8bf90wSZzBm bmbQ== X-Gm-Message-State: ALoCoQnQ7Gq8Ao4XMRvVvo4yNG31obWXVq9F1QWI/3kGbthiXNE/blXn1mE+AKr1QAnx6H5xZ4JM 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 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> 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 v2 07/13] 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 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);