Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323351 > unrolled thread
| Started by | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> |
|---|---|
| First post | 2016-02-01 18:30 +0100 |
| Last post | 2016-02-03 09:50 +0100 |
| Articles | 3 — 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.
[PATCH RFC 10/15] ASoC: qcom: apq8016: add wrdma support Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-02-01 18:30 +0100
Re: [alsa-devel] [PATCH RFC 10/15] ASoC: qcom: apq8016: add wrdma support Kenneth Westfield <kwestfie@codeaurora.org> - 2016-02-03 01:40 +0100
Re: [alsa-devel] [PATCH RFC 10/15] ASoC: qcom: apq8016: add wrdma support Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-02-03 09:50 +0100
| From | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> |
|---|---|
| Date | 2016-02-01 18:30 +0100 |
| Subject | [PATCH RFC 10/15] ASoC: qcom: apq8016: add wrdma support |
| Message-ID | <qXqsA-6bL-45@gated-at.bofh.it> |
This patch adds wrdma support in lpass-apq8016 by providing the register
offsets and adding support in dma channel allocation callback.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/qcom/lpass-apq8016.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c
index df44f09..3eef0c3 100644
--- a/sound/soc/qcom/lpass-apq8016.c
+++ b/sound/soc/qcom/lpass-apq8016.c
@@ -137,11 +137,23 @@ 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->dma_ch_bit_map,
+ int chan = 0;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ chan = find_first_zero_bit(&drvdata->dma_ch_bit_map,
v->rdma_channels);
- if (chan >= v->rdma_channels)
- return -EBUSY;
+ if (chan >= v->rdma_channels)
+ return -EBUSY;
+ } else {
+ chan = find_next_zero_bit(&drvdata->dma_ch_bit_map,
+ v->wrdma_channel_start +
+ v->wrdma_channels,
+ v->wrdma_channel_start);
+
+ if (chan >= v->wrdma_channel_start + v->wrdma_channels)
+ return -EBUSY;
+ }
set_bit(chan, &drvdata->dma_ch_bit_map);
@@ -213,7 +225,11 @@ static struct lpass_variant apq8016_data = {
.rdma_reg_base = 0x8400,
.rdma_reg_stride = 0x1000,
.rdma_channels = 2,
- .rdmactl_audif_start = 1,
+ .dmactl_audif_start = 1,
+ .wrdma_reg_base = 0xB000,
+ .wrdma_reg_stride = 0x1000,
+ .wrdma_channel_start = 5,
+ .wrdma_channels = 2,
.dai_driver = apq8016_lpass_cpu_dai_driver,
.num_dai = ARRAY_SIZE(apq8016_lpass_cpu_dai_driver),
.init = apq8016_lpass_init,
--
1.9.1
[toc] | [next] | [standalone]
| From | Kenneth Westfield <kwestfie@codeaurora.org> |
|---|---|
| Date | 2016-02-03 01:40 +0100 |
| Subject | Re: [alsa-devel] [PATCH RFC 10/15] ASoC: qcom: apq8016: add wrdma support |
| Message-ID | <qXTEf-2Um-29@gated-at.bofh.it> |
| In reply to | #1323351 |
On Mon, Feb 01, 2016 at 09:29:20AM -0800, Srinivas Kandagatla wrote:
> diff --git a/sound/soc/qcom/lpass-apq8016.c
> b/sound/soc/qcom/lpass-apq8016.c
> index df44f09..3eef0c3 100644
> --- a/sound/soc/qcom/lpass-apq8016.c
> +++ b/sound/soc/qcom/lpass-apq8016.c
...
> @@ -213,7 +225,11 @@ static struct lpass_variant apq8016_data = {
> .rdma_reg_base = 0x8400,
> .rdma_reg_stride = 0x1000,
> .rdma_channels = 2,
> - .rdmactl_audif_start = 1,
> + .dmactl_audif_start = 1,
Changing rdma.. to dma.. should be done in patch 3 (ASoC: qcom: rename
rdmactl_audif_start to dmactrl_audif_start). The build should
fail otherwise if bisecting between this patch and patch 3.
--
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] | [next] | [standalone]
| From | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> |
|---|---|
| Date | 2016-02-03 09:50 +0100 |
| Subject | Re: [alsa-devel] [PATCH RFC 10/15] ASoC: qcom: apq8016: add wrdma support |
| Message-ID | <qY1iq-80l-33@gated-at.bofh.it> |
| In reply to | #1324775 |
On 03/02/16 00:37, Kenneth Westfield wrote:
> On Mon, Feb 01, 2016 at 09:29:20AM -0800, Srinivas Kandagatla wrote:
>> diff --git a/sound/soc/qcom/lpass-apq8016.c
>> b/sound/soc/qcom/lpass-apq8016.c
>> index df44f09..3eef0c3 100644
>> --- a/sound/soc/qcom/lpass-apq8016.c
>> +++ b/sound/soc/qcom/lpass-apq8016.c
>
> ...
>
>> @@ -213,7 +225,11 @@ static struct lpass_variant apq8016_data = {
>> .rdma_reg_base = 0x8400,
>> .rdma_reg_stride = 0x1000,
>> .rdma_channels = 2,
>> - .rdmactl_audif_start = 1,
>> + .dmactl_audif_start = 1,
>
> Changing rdma.. to dma.. should be done in patch 3 (ASoC: qcom: rename
> rdmactl_audif_start to dmactrl_audif_start). The build should
> fail otherwise if bisecting between this patch and patch 3.
Agreed, will sort this out in next version.
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web