[Sound-open-firmware] [PATCH] Add chan_size setting for host/link DMA IN/OUT on CNL.
From: Yan Wang yan.wang@linux.intel.com
"chan_size" is used for calculation of DMA register offset. It must be set otherwise only the first channel is available.
Signed-off-by: Yan Wang yan.wang@linux.intel.com --- src/platform/cannonlake/dma.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/platform/cannonlake/dma.c b/src/platform/cannonlake/dma.c index 59e0fc7..b77f1d2 100644 --- a/src/platform/cannonlake/dma.c +++ b/src/platform/cannonlake/dma.c @@ -136,6 +136,7 @@ static struct dma dma[] = { .base = GTW_HOST_IN_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_HOST_DMA_IN_LVL3(0, 0), + .chan_size = GTW_HOST_IN_STREAM_SIZE, }, .ops = &hda_host_dma_ops, }, @@ -145,6 +146,7 @@ static struct dma dma[] = { .base = GTW_HOST_OUT_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_HOST_DMA_OUT_LVL3(0, 0), + .chan_size = GTW_HOST_OUT_STREAM_SIZE, }, .ops = &hda_host_dma_ops, }, @@ -154,6 +156,7 @@ static struct dma dma[] = { .base = GTW_LINK_IN_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_LINK_DMA_IN_LVL4(0, 0), + .chan_size = GTW_LINK_IN_STREAM_SIZE, }, .ops = &hda_link_dma_ops, }, @@ -163,6 +166,7 @@ static struct dma dma[] = { .base = GTW_LINK_OUT_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_LINK_DMA_OUT_LVL4(0, 0), + .chan_size = GTW_LINK_OUT_STREAM_SIZE, }, .ops = &hda_link_dma_ops, },};
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of yan.wang@linux.intel.com Sent: Thursday, March 22, 2018 1:46 PM To: sound-open-firmware@alsa-project.org Cc: Yan Wang yan.wang@linux.intel.com Subject: [Sound-open-firmware] [PATCH] Add chan_size setting for host/link DMA IN/OUT on CNL.
From: Yan Wang yan.wang@linux.intel.com
"chan_size" is used for calculation of DMA register offset. It must be set otherwise only the first channel is available.
Signed-off-by: Yan Wang yan.wang@linux.intel.com
Acked-by: Keyon Jie yang.jie@linux.intel.com
Good finding.
Thanks, ~Keyon
src/platform/cannonlake/dma.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/platform/cannonlake/dma.c b/src/platform/cannonlake/dma.c index 59e0fc7..b77f1d2 100644 --- a/src/platform/cannonlake/dma.c +++ b/src/platform/cannonlake/dma.c @@ -136,6 +136,7 @@ static struct dma dma[] = { .base = GTW_HOST_IN_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_HOST_DMA_IN_LVL3(0, 0),
}, .ops = &hda_host_dma_ops,.chan_size = GTW_HOST_IN_STREAM_SIZE,
}, @@ -145,6 +146,7 @@ static struct dma dma[] = { .base = GTW_HOST_OUT_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_HOST_DMA_OUT_LVL3(0, 0),
}, .ops = &hda_host_dma_ops,.chan_size = GTW_HOST_OUT_STREAM_SIZE,
}, @@ -154,6 +156,7 @@ static struct dma dma[] = { .base = GTW_LINK_IN_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_LINK_DMA_IN_LVL4(0, 0),
}, .ops = &hda_link_dma_ops,.chan_size = GTW_LINK_IN_STREAM_SIZE,
}, @@ -163,6 +166,7 @@ static struct dma dma[] = { .base = GTW_LINK_OUT_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_LINK_DMA_OUT_LVL4(0, 0),
}, .ops = &hda_link_dma_ops,.chan_size = GTW_LINK_OUT_STREAM_SIZE,
},};
2.14.3
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On 3/22/2018 14:41, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of yan.wang@linux.intel.com Sent: Thursday, March 22, 2018 1:46 PM To: sound-open-firmware@alsa-project.org Cc: Yan Wang yan.wang@linux.intel.com Subject: [Sound-open-firmware] [PATCH] Add chan_size setting for host/link DMA
The patch subject can prefix with "cnl: dma: "
IN/OUT on CNL.
From: Yan Wang yan.wang@linux.intel.com
"chan_size" is used for calculation of DMA register offset. It must be set otherwise only the first channel is available.
Signed-off-by: Yan Wang yan.wang@linux.intel.com
Acked-by: Keyon Jie yang.jie@linux.intel.com
Good finding.
Nice catch. This patch LGTM. Test on CNL. It will solve the DMA trace failed by arecord bug.
Thanks Xiuli
Thanks, ~Keyon
src/platform/cannonlake/dma.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/platform/cannonlake/dma.c b/src/platform/cannonlake/dma.c index 59e0fc7..b77f1d2 100644 --- a/src/platform/cannonlake/dma.c +++ b/src/platform/cannonlake/dma.c @@ -136,6 +136,7 @@ static struct dma dma[] = { .base = GTW_HOST_IN_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_HOST_DMA_IN_LVL3(0, 0),
}, .ops = &hda_host_dma_ops,.chan_size = GTW_HOST_IN_STREAM_SIZE,
}, @@ -145,6 +146,7 @@ static struct dma dma[] = { .base = GTW_HOST_OUT_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_HOST_DMA_OUT_LVL3(0, 0),
}, .ops = &hda_host_dma_ops,.chan_size = GTW_HOST_OUT_STREAM_SIZE,
}, @@ -154,6 +156,7 @@ static struct dma dma[] = { .base = GTW_LINK_IN_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_LINK_DMA_IN_LVL4(0, 0),
}, .ops = &hda_link_dma_ops,.chan_size = GTW_LINK_IN_STREAM_SIZE,
}, @@ -163,6 +166,7 @@ static struct dma dma[] = { .base = GTW_LINK_OUT_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_LINK_DMA_OUT_LVL4(0, 0),
}, .ops = &hda_link_dma_ops,.chan_size = GTW_LINK_OUT_STREAM_SIZE,
},};
2.14.3
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On Thu, 2018-03-22 at 15:28 +0800, Pan, Xiuli wrote:
On 3/22/2018 14:41, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound- open- firmware-bounces@alsa-project.org] On Behalf Of yan.wang@linux.in tel.com Sent: Thursday, March 22, 2018 1:46 PM To: sound-open-firmware@alsa-project.org Cc: Yan Wang yan.wang@linux.intel.com Subject: [Sound-open-firmware] [PATCH] Add chan_size setting for host/link DMA
The patch subject can prefix with "cnl: dma: "
I will change it. Thanks for your comments.
Yan Wang
IN/OUT on CNL.
From: Yan Wang yan.wang@linux.intel.com
"chan_size" is used for calculation of DMA register offset. It must be set otherwise only the first channel is available.
Signed-off-by: Yan Wang yan.wang@linux.intel.com
Acked-by: Keyon Jie yang.jie@linux.intel.com
Good finding.
Nice catch. This patch LGTM. Test on CNL. It will solve the DMA trace failed by arecord bug.
Thanks Xiuli
Thanks, ~Keyon
src/platform/cannonlake/dma.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/platform/cannonlake/dma.c b/src/platform/cannonlake/dma.c index 59e0fc7..b77f1d2 100644 --- a/src/platform/cannonlake/dma.c +++ b/src/platform/cannonlake/dma.c @@ -136,6 +136,7 @@ static struct dma dma[] = { .base = GTW_HOST_IN_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_HOST_DMA_IN_LVL3(0, 0),
}, .ops = &hda_host_dma_ops,.chan_size = GTW_HOST_IN_STREAM_SIZE,
}, @@ -145,6 +146,7 @@ static struct dma dma[] = { .base = GTW_HOST_OUT_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_HOST_DMA_OUT_LVL3(0, 0),
}, .ops = &hda_host_dma_ops,.chan_size = GTW_HOST_OUT_STREAM_SIZE,
}, @@ -154,6 +156,7 @@ static struct dma dma[] = { .base = GTW_LINK_IN_STREAM_BASE(0), .channels = 9, .irq = IRQ_EXT_LINK_DMA_IN_LVL4(0, 0),
}, .ops = &hda_link_dma_ops,.chan_size = GTW_LINK_IN_STREAM_SIZE,
}, @@ -163,6 +166,7 @@ static struct dma dma[] = { .base = GTW_LINK_OUT_STREAM_BASE(0), .channels = 7, .irq = IRQ_EXT_LINK_DMA_OUT_LVL4(0, 0),
}, .ops = &hda_link_dma_ops,.chan_size = GTW_LINK_OUT_STREAM_SIZE,
},};
2.14.3
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmw are
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmwar e
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
participants (4)
-
Jie, Yang
-
Pan, Xiuli
-
yan.wang@linux.intel.com
-
yanwang