From patchwork Thu Feb 11 12:17:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 8278661 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 17354BEEE5 for ; Thu, 11 Feb 2016 12:20:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E36820251 for ; Thu, 11 Feb 2016 12:20:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7522520398 for ; Thu, 11 Feb 2016 12:20:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9EED9265D05; Thu, 11 Feb 2016 13:20:23 +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 313E726599F; Thu, 11 Feb 2016 13:18:19 +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 8F7C42659A2; Thu, 11 Feb 2016 13:18:18 +0100 (CET) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by alsa0.perex.cz (Postfix) with ESMTP id B5DB92606F5 for ; Thu, 11 Feb 2016 13:17:47 +0100 (CET) Received: by mail-wm0-f54.google.com with SMTP id g62so18706428wme.0 for ; Thu, 11 Feb 2016 04:17:47 -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=AZ7XtfODTJncS2dY/2FM+SDxabm1q2B3g8TDUSWiZlQ=; b=VLQ4u6idTy1YTgZRzGQhbcJw4Xi0BA858zmRkWRJU3pKyyLTRfyGC4CYqrZ07GHCPG ZizU2zn1UiA8rcQGz9yhSYa87/ZzJef5H8r1GusU77NmFqwk2GaGVTZ8VpOlhGTR7PfV 7vqfMQgw/cZy2kXBEOvSm3aolT4h6b+bI3vAc= 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=AZ7XtfODTJncS2dY/2FM+SDxabm1q2B3g8TDUSWiZlQ=; b=AcjJEZmuEvo6unQ+GzfdU7xjv7D+wY9Vkf3wo3leDcw7lrmwTG/JcNSu26wtiZf6Xf 3Z0ye0a3M+5gMJ+GbGpdKn3gDuW8gr4DKVKpmm9TDB1zUZJosGrsISpO4BGrlCatq0q4 hplqXtJYJX3YSt7zwYyueGUWVROFBqEsJQQk/+6Vx0TGFrNjZZ4dqp4r/E5n7gqP6y8J 5iN+x04BE/T+EX0a9jLDTXs8+JvjRRYyHrwPjzIbJ2deakR5YtotQ4U5ouIEnE31Ewc7 4Kxysm2jLM6k2nBUFOrcR08o+VrTrQS14j5TIvq5Zmo0Dq9u/1Ah0Z3ZnoUEAHlqJf/r WagQ== X-Gm-Message-State: AG10YOTlnDepbhRMPkkyNz4khs4HYvlLuhCYGE2CfLyP5kTgrj+ZXGmQZeGDPZu34wyBRCgM X-Received: by 10.28.99.136 with SMTP id x130mr18293328wmb.12.1455193067533; Thu, 11 Feb 2016 04:17:47 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id jc7sm7350642wjb.33.2016.02.11.04.17.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 04:17:47 -0800 (PST) From: Srinivas Kandagatla To: Patrick Lai , alsa-devel@alsa-project.org, Mark Brown Date: Thu, 11 Feb 2016 12:17:45 +0000 Message-Id: <1455193065-1704-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455193007-1481-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1455193007-1481-1-git-send-email-srinivas.kandagatla@linaro.org> Cc: kwestfie@codeaurora.org, Banajit Goswami , Liam Girdwood , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Takashi Iwai , Srinivas Kandagatla Subject: [alsa-devel] [PATCH v3 05/14] ASoC: qcom: ipq806x: add error in 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 ipq806x is only ever tested for playback so return error in dma allocation if the stream direction is capture. Signed-off-by: Srinivas Kandagatla Acked-by: Kenneth Westfield --- sound/soc/qcom/lpass-ipq806x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/qcom/lpass-ipq806x.c b/sound/soc/qcom/lpass-ipq806x.c index 119048c..29a3529 100644 --- a/sound/soc/qcom/lpass-ipq806x.c +++ b/sound/soc/qcom/lpass-ipq806x.c @@ -65,7 +65,10 @@ static struct snd_soc_dai_driver ipq806x_lpass_cpu_dai_driver = { static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata, int dir) { - return IPQ806X_LPAIF_RDMA_CHAN_MI2S; + if (dir == SNDRV_PCM_STREAM_PLAYBACK) + return IPQ806X_LPAIF_RDMA_CHAN_MI2S; + else /* Capture currently not implemented */ + return -EINVAL; } static int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan)