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: 60948 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp170281lbb; Mon, 1 Feb 2016 09:28:54 -0800 (PST) X-Received: by 10.98.93.84 with SMTP id r81mr40377240pfb.64.1454347733018; Mon, 01 Feb 2016 09:28:53 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v72si47423395pfa.164.2016.02.01.09.28.52; Mon, 01 Feb 2016 09:28:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754565AbcBAR2u (ORCPT + 30 others); Mon, 1 Feb 2016 12:28:50 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36033 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753824AbcBAR2q (ORCPT ); Mon, 1 Feb 2016 12:28:46 -0500 Received: by mail-wm0-f44.google.com with SMTP id p63so81531798wmp.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=GH14sAFa2ShK4sP97GAJjmKVDy0dKD4iOYgic3vBZtqE+C4PJ8tNZm2Fh17X0VkZqT Y+KFo7fCwepV06D/4xu27lH2BHthWkt1C+iUhL5dALTm38dF8GdZvanxMiJnYzLBDK2C V07ZG771sEvbly6fJ7s0O2FyxTnEFRROgdr1U44M0hjO7EAtEpCOWBgfktrROBraFaO0 Bh9ozNjaKdtygDwDxBOwMShYKEIGmMMD1CcTN6Fw/YaTRZgKfXo5ppOIpBIRXv8y3OrK w4JYBT5eMx9TtE3kLqOspzkm2lNlCsuq5Jig+kUWE33dpniV7nbuHEVhehmmpqp/7MPC AMtQ== X-Gm-Message-State: AG10YOTUT/AtaQcK42XeIznlEqnpnBUEAR41cfUqduOkTZTApugpFOiX9CsjXFCmPk/80cSn 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 1.9.1 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)