Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323350 > unrolled thread

[PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation

Started bySrinivas Kandagatla <srinivas.kandagatla@linaro.org>
First post2016-02-01 18:30 +0100
Last post2016-02-03 01:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-02-01 18:30 +0100
    Re: [alsa-devel] [PATCH RFC 04/15] ASoC: qcom: pass direction to dma  allocation Kenneth Westfield <kwestfie@codeaurora.org> - 2016-02-03 01:40 +0100

#1323350 — [PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation

FromSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date2016-02-01 18:30 +0100
Subject[PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation
Message-ID<qXqsA-6bL-43@gated-at.bofh.it>
This patch updates the internal dma allocation callbacks to take the
stream direction so that it can allocate channels suitable for that
stream direction. Before the capture support this was not necessary.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/lpass-apq8016.c | 3 ++-
 sound/soc/qcom/lpass-ipq806x.c | 2 +-
 sound/soc/qcom/lpass.h         | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c
index 94efc01..2d43842 100644
--- a/sound/soc/qcom/lpass-apq8016.c
+++ b/sound/soc/qcom/lpass-apq8016.c
@@ -133,7 +133,8 @@ static struct snd_soc_dai_driver apq8016_lpass_cpu_dai_driver[] = {
 	},
 };
 
-static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata)
+static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata,
+					   int direction)
 {
 	struct lpass_variant *v = drvdata->variant;
 	int chan = find_first_zero_bit(&drvdata->rdma_ch_bit_map,
diff --git a/sound/soc/qcom/lpass-ipq806x.c b/sound/soc/qcom/lpass-ipq806x.c
index 7a41679..119048c 100644
--- a/sound/soc/qcom/lpass-ipq806x.c
+++ b/sound/soc/qcom/lpass-ipq806x.c
@@ -63,7 +63,7 @@ static struct snd_soc_dai_driver ipq806x_lpass_cpu_dai_driver = {
 	.ops    = &asoc_qcom_lpass_cpu_dai_ops,
 };
 
-static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata)
+static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata, int dir)
 {
 	return IPQ806X_LPAIF_RDMA_CHAN_MI2S;
 }
diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h
index 7c3367f..30449f3 100644
--- a/sound/soc/qcom/lpass.h
+++ b/sound/soc/qcom/lpass.h
@@ -83,7 +83,7 @@ struct lpass_variant {
 	/* SOC specific intialization like clocks */
 	int (*init)(struct platform_device *pdev);
 	int (*exit)(struct platform_device *pdev);
-	int (*alloc_dma_channel)(struct lpass_data *data);
+	int (*alloc_dma_channel)(struct lpass_data *data, int direction);
 	int (*free_dma_channel)(struct lpass_data *data, int ch);
 
 	/* SOC specific dais */
-- 
1.9.1

[toc] | [next] | [standalone]


#1324778 — Re: [alsa-devel] [PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation

FromKenneth Westfield <kwestfie@codeaurora.org>
Date2016-02-03 01:40 +0100
SubjectRe: [alsa-devel] [PATCH RFC 04/15] ASoC: qcom: pass direction to dma allocation
Message-ID<qXTEf-2Um-37@gated-at.bofh.it>
In reply to#1323350
On Mon, Feb 01, 2016 at 09:28:34AM -0800, Srinivas Kandagatla wrote:
> This patch updates the internal dma allocation callbacks to take the
> stream direction so that it can allocate channels suitable for that
> stream direction. Before the capture support this was not necessary.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/lpass-apq8016.c | 3 ++-
>  sound/soc/qcom/lpass-ipq806x.c | 2 +-
>  sound/soc/qcom/lpass.h         | 2 +-
>  3 files changed, 4 insertions(+), 3 deletions(-)

Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>

-- 
Kenneth Westfield
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, 
a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web