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: 8181931 Return-Path: X-Original-To: patchwork-alsa-devel@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 0231F9F1C0 for ; Mon, 1 Feb 2016 17:31:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18CF2203AC for ; Mon, 1 Feb 2016 17:31:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D8C37203AB for ; Mon, 1 Feb 2016 17:31:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 17A372651DB; Mon, 1 Feb 2016 18:31:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, NO_DNS_FOR_FROM,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 08C112605E4; Mon, 1 Feb 2016 18:29:46 +0100 (CET) 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 2C229261691; Mon, 1 Feb 2016 18:29:44 +0100 (CET) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by alsa0.perex.cz (Postfix) with ESMTP id 61895265065 for ; Mon, 1 Feb 2016 18:28:39 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id p63so81527297wmp.1 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=WlJwSGrqKSE1vUK0v/MbZF5xr1qnYjIYiRhtRFf7BIFU6aOPRyAuTNlSCh4W9e249W Q7GS3RuhBr3qkiHzSJ+ewghrDOKl4pImWrPZ/UsXE4nogfxXx2t61hggw0FwJAhTPgbe HDILx2kYGtry0fkSycuD1dm7aP/ooWBnMNk5uwi5ultqSJ62jqU6BGA4bkTb6amsKBV5 gCgZbZloms/DTWJLpr37WmMqciqLtJYsot4pjx++NWfLmngpvWnew6MIKe2Xek5v4/IU M711HxmscE/4Wz4+R0gFtOecB7avPqSWDzs+lJV9uFO0//4I+iMZ/URnZrzsXadwzpkS 51Jw== X-Gm-Message-State: AG10YORORLn0JDRDU2gQIMbV87ewzw4zahbrhF9KOpjsZWFVZdPWt1kWo24Sji4dNwc/1WLR 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 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> Cc: Banajit Goswami , Liam Girdwood , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown , Srinivas Kandagatla Subject: [alsa-devel] [PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation 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 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 */