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: 61744 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp154866lbl; Thu, 11 Feb 2016 04:17:55 -0800 (PST) X-Received: by 10.66.187.145 with SMTP id fs17mr66515438pac.81.1455193075462; Thu, 11 Feb 2016 04:17:55 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 82si12376386pfn.23.2016.02.11.04.17.55; Thu, 11 Feb 2016 04:17:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752751AbcBKMRu (ORCPT + 7 others); Thu, 11 Feb 2016 07:17:50 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:34028 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbcBKMRs (ORCPT ); Thu, 11 Feb 2016 07:17:48 -0500 Received: by mail-wm0-f42.google.com with SMTP id 128so18603584wmz.1 for ; Thu, 11 Feb 2016 04:17:48 -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=BvQJTFORHtgHahZyVipFL1LX9lxvGwRj/5klPCYBsqNJdaukAn/MzVslrNQsSYrFUS Iffxvwwh7ag5zEgwjQvIXQup62MOD5b2plUK1D4+SWG+1AEUcoC6VDIScn8pLnnbscGC kPzRKDrXzeyyRturPxqTV18sOhkutYsnLKgnuruvIP+8A7lyRiGwicqToZVHq0yz2Vp5 NjW1NCN6/zDs+n+KjEcYcBjGGqQD179eybqjDfp6KHGd9e9XwkvuoyHRbKSRPpQOHVKs KjkxI1/s7g7PfTPc+U28hxgAB1oQEIGYjYaY9nhrvjLcWZ9rNHo1zvLcKEgjG74kQYBK dzOg== X-Gm-Message-State: AG10YOStdj52jlRS5KVwbqKJf3fNVmhXAFJqlV1YrBbgF3ZiiauBAhmHLD7AHTATHmf5W6qu 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 Cc: Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, kwestfie@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v3 05/14] ASoC: qcom: ipq806x: add error in dma allocation. 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 Acked-by: Kenneth Westfield --- sound/soc/qcom/lpass-ipq806x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)