From patchwork Mon Feb 1 17:28:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 8181991 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3B9CE9F1C0 for ; Mon, 1 Feb 2016 17:32:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 670CC203AD for ; Mon, 1 Feb 2016 17:32:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8216020256 for ; Mon, 1 Feb 2016 17:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754485AbcBAR2m (ORCPT ); Mon, 1 Feb 2016 12:28:42 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33089 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754412AbcBAR2k (ORCPT ); Mon, 1 Feb 2016 12:28:40 -0500 Received: by mail-wm0-f53.google.com with SMTP id l66so81080206wml.0 for ; Mon, 01 Feb 2016 09:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ywPUaTKVsm8qWzpmzlFGMHguqZV/QJO+ftw8iUcpPZk=; b=MFtipwZskoPePLNG2xlVi73935m/tAzlcHdX51TseP7UhFUB/rqhMBvpk9a5U3KaUi HUOL+OHl6RDKSvVXtyp0dIPDGIO6bHLgTJ2CCOwwBsBBDbjap1Qv+57kWNDhHW0mehzB 4gGWooMPccjUfoXA99UoiXroRhbF1A2zRfT2o= 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=ywPUaTKVsm8qWzpmzlFGMHguqZV/QJO+ftw8iUcpPZk=; b=XyavIi9OoCTlplag5Y7TIshYp9Ig90/BGkrw4XmepzqD6DBMQxvWkPv15TfUCFrhgA UoHdvebyBIm+B9QiNmU304hE7z3Hs9PF5JX8dBfiShm18suwvFMBzViALSWbkxF+bGKX NEuEeniecvFakC1thFjOKUsob7xXcQqwauArHE6RD+Mi1e7mdfLHdThSsxj6EgSqJ4TT IxmK/ZTjVbwdKNrqxDyweMS/pbqSRIcvlDx91Y91rI5kqvpxnh7HKJ+M7QnacrYk0/zB JzdHHN5DO6DIzsBYqJBtKQ5DmmlTjahGtNrf0Cdbo8SZ8f4dCjjXHUgUKVMPwItghqwE XjPQ== X-Gm-Message-State: AG10YOSzcY2HmuBKcg8Ent0hKWqEWtp88tv+UvSfNJlStogZcrZfZBSJZSvMz65mON5ZX/vH X-Received: by 10.194.103.198 with SMTP id fy6mr28364572wjb.48.1454347719143; Mon, 01 Feb 2016 09:28:39 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id e198sm12565160wmd.0.2016.02.01.09.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 09:28:38 -0800 (PST) From: Srinivas Kandagatla To: Patrick Lai , alsa-devel@alsa-project.org Cc: Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation Date: Mon, 1 Feb 2016 17:28:34 +0000 Message-Id: <1454347714-10508-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454347622-9970-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1454347622-9970-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=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 updates the internal dma allocation callbacks to take the stream direction so that it can allocate channels suitable for that stream direction. Before the capture support this was not necessary. Signed-off-by: Srinivas Kandagatla Acked-by: Kenneth Westfield --- sound/soc/qcom/lpass-apq8016.c | 3 ++- sound/soc/qcom/lpass-ipq806x.c | 2 +- sound/soc/qcom/lpass.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c index 94efc01..2d43842 100644 --- a/sound/soc/qcom/lpass-apq8016.c +++ b/sound/soc/qcom/lpass-apq8016.c @@ -133,7 +133,8 @@ static struct snd_soc_dai_driver apq8016_lpass_cpu_dai_driver[] = { }, }; -static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata) +static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata, + int direction) { struct lpass_variant *v = drvdata->variant; int chan = find_first_zero_bit(&drvdata->rdma_ch_bit_map, diff --git a/sound/soc/qcom/lpass-ipq806x.c b/sound/soc/qcom/lpass-ipq806x.c index 7a41679..119048c 100644 --- a/sound/soc/qcom/lpass-ipq806x.c +++ b/sound/soc/qcom/lpass-ipq806x.c @@ -63,7 +63,7 @@ static struct snd_soc_dai_driver ipq806x_lpass_cpu_dai_driver = { .ops = &asoc_qcom_lpass_cpu_dai_ops, }; -static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata) +static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata, int dir) { return IPQ806X_LPAIF_RDMA_CHAN_MI2S; } diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index 7c3367f..30449f3 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -83,7 +83,7 @@ struct lpass_variant { /* SOC specific intialization like clocks */ int (*init)(struct platform_device *pdev); int (*exit)(struct platform_device *pdev); - int (*alloc_dma_channel)(struct lpass_data *data); + int (*alloc_dma_channel)(struct lpass_data *data, int direction); int (*free_dma_channel)(struct lpass_data *data, int ch); /* SOC specific dais */