From patchwork Mon Feb 1 17:28:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 8181981 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 DB8A99F1C0 for ; Mon, 1 Feb 2016 17:32:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2440E203AD for ; Mon, 1 Feb 2016 17:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4255020256 for ; Mon, 1 Feb 2016 17:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752487AbcBAR2s (ORCPT ); Mon, 1 Feb 2016 12:28:48 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:34473 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754523AbcBAR2q (ORCPT ); Mon, 1 Feb 2016 12:28:46 -0500 Received: by mail-wm0-f48.google.com with SMTP id 128so81925963wmz.1 for ; Mon, 01 Feb 2016 09:28:46 -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=lsHHEvDxVXW+DF6VRJOrzEHp/2cpHeGtMAD2yreAXxc=; b=SzTsP4lPkGSmsSFLLNlwW4hF+7XbSpbFwj5JhVp4PB2CfuBRgtPA+sSP/gRIA3MAf+ 3RfqMKBuw98fZPb0JxuyopUs8glpVyXcHT9EdCL5CJ9BqwrslBzhBfW+tfEhXdU2xTa0 r+0cGUFuoLG56x+RJpBbU1JH+O+tj/NnYDScs= 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=lsHHEvDxVXW+DF6VRJOrzEHp/2cpHeGtMAD2yreAXxc=; b=ZIL4ySukqFGSpnsY+9IgvyWf114TfZWpmhOtBHgsTMHWD3TUZ2e9uZRK2YnyceX0WR UoehY7lp4XgSqDypxt+GmZx4tK6yVenK0yD27uNy2HYlcxu22HThPRFhe0vsQcM+GK5s ikgt0SmkCaaVdKcGz+mepMOp6VJatXZa/KM41lHFLs1Oo2VWOC6l9Ahbmx3K6DvhZJs3 GwfPOyb9kAS4sgXr8wtv9s9uovZGesIjvjIGCnfkFeE4QoxQSvMqnyKfSC6Cl9/63GtM Wfclyt1mDlzdC5tRCRZutQDSXCTOmRZsTgyiOkqSus1Cdfvp1t5ucbnDwKmYz/QXYRkJ Cx8g== X-Gm-Message-State: AG10YOTMCIAXwUAAVoX7D26QdEoL01wyVrhaSuHP8BBhqpSychmWb7kFXnO5j6A0o/sb702A X-Received: by 10.194.22.132 with SMTP id d4mr24043344wjf.174.1454347725876; Mon, 01 Feb 2016 09:28:45 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id c26sm12500251wmi.24.2016.02.01.09.28.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 09:28:45 -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 05/15] ASoC: qcom: ipq806x: add error in dma allocation. Date: Mon, 1 Feb 2016 17:28:43 +0000 Message-Id: <1454347723-10550-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=ham 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 ipq806x is only ever tested for playback so return error in dma allocation if the stream direction is capture. Signed-off-by: Srinivas Kandagatla --- 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..8bdcdcb 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 not supported */ + return -EINVAL; } static int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan)