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: 8181961 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 D0F3BBEEE5 for ; Mon, 1 Feb 2016 17:31:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1900C203B1 for ; Mon, 1 Feb 2016 17:31:54 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3E1AF20256 for ; Mon, 1 Feb 2016 17:31:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2DC212652C5; Mon, 1 Feb 2016 18:31:51 +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 6B4822650F2; Mon, 1 Feb 2016 18:29:47 +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 3D685261691; Mon, 1 Feb 2016 18:29:45 +0100 (CET) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by alsa0.perex.cz (Postfix) with ESMTP id 1D34826051B for ; Mon, 1 Feb 2016 18:28:46 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id l66so82218489wml.0 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=K4jvo1uA0Ht770Xy6XoaBJhWVXQuc3flD3glbIJekMDjjkngeJopnWW8A0KDAgw3ls 54S1Eq4R+CXgA54T8mawItlxwioK6KrluehvNKE89hE8936Vw54Db3QFgBmlpsE+XNpG f/oDNKE/RSXXGC+nmR0hdgdo30Vi5kcda/4VPdwY9S6Wbex5KYkcxfRg+dQzhlR8jHNw nODvGNDJ/6bV4aAJALf6cTJLLfaGXbNT4iaarr9VuNmNHA4770Vu3NZBH6AnJffSOvaL lA3+BGKma7AF0J5mdZv8HqbPQNSzir8CzeYD9cwsudup3/TTRxNBmhuxbPIhhCyZXhv+ h6hQ== X-Gm-Message-State: AG10YOQHokvbVvI37ocEpZJDa9SjI7VWUG4gfYYbm0jRzgWnegWFs4FpBsQDo0ed3Jf3asIP 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 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> 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 05/15] 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 --- 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)