* [PATCH v1] dmaengine: Add support for audio interleaved transfer
@ 2024-03-25 2:37 Sugar Zhang
2024-03-25 9:32 ` Heiko Stübner
2024-03-28 7:00 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Sugar Zhang @ 2024-03-25 2:37 UTC (permalink / raw)
To: heiko, vkoul; +Cc: linux-rockchip, Sugar Zhang, dmaengine, linux-kernel
This patch add support for interleaved transfer which used
for interleaved audio or 2d video data transfer.
for audio situation, we add 'nump' for number of period frames.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---
include/linux/dmaengine.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 752dbde..5263cde 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -144,6 +144,7 @@ struct data_chunk {
* Otherwise, destination is filled contiguously (icg ignored).
* Ignored if dst_inc is false.
* @numf: Number of frames in this template.
+ * @nump: Number of period frames in this template.
* @frame_size: Number of chunks in a frame i.e, size of sgl[].
* @sgl: Array of {chunk,icg} pairs that make up a frame.
*/
@@ -156,6 +157,7 @@ struct dma_interleaved_template {
bool src_sgl;
bool dst_sgl;
size_t numf;
+ size_t nump;
size_t frame_size;
struct data_chunk sgl[];
};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] dmaengine: Add support for audio interleaved transfer
2024-03-25 2:37 [PATCH v1] dmaengine: Add support for audio interleaved transfer Sugar Zhang
@ 2024-03-25 9:32 ` Heiko Stübner
2024-03-28 7:00 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stübner @ 2024-03-25 9:32 UTC (permalink / raw)
To: vkoul, Sugar Zhang; +Cc: linux-rockchip, Sugar Zhang, dmaengine, linux-kernel
Hi,
Am Montag, 25. März 2024, 03:37:49 CET schrieb Sugar Zhang:
> This patch add support for interleaved transfer which used
> for interleaved audio or 2d video data transfer.
>
> for audio situation, we add 'nump' for number of period frames.
>
> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
> ---
>
> include/linux/dmaengine.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 752dbde..5263cde 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -144,6 +144,7 @@ struct data_chunk {
> * Otherwise, destination is filled contiguously (icg ignored).
> * Ignored if dst_inc is false.
> * @numf: Number of frames in this template.
> + * @nump: Number of period frames in this template.
> * @frame_size: Number of chunks in a frame i.e, size of sgl[].
> * @sgl: Array of {chunk,icg} pairs that make up a frame.
> */
> @@ -156,6 +157,7 @@ struct dma_interleaved_template {
> bool src_sgl;
> bool dst_sgl;
> size_t numf;
> + size_t nump;
> size_t frame_size;
> struct data_chunk sgl[];
> };
hmm, this only ever adds this nump element. I think for adding things
to really generic structs, you definitly will need to provide an actual
user for it in a second patch.
Heiko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] dmaengine: Add support for audio interleaved transfer
2024-03-25 2:37 [PATCH v1] dmaengine: Add support for audio interleaved transfer Sugar Zhang
2024-03-25 9:32 ` Heiko Stübner
@ 2024-03-28 7:00 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2024-03-28 7:00 UTC (permalink / raw)
To: Sugar Zhang; +Cc: heiko, linux-rockchip, dmaengine, linux-kernel
On 25-03-24, 10:37, Sugar Zhang wrote:
> This patch add support for interleaved transfer which used
> for interleaved audio or 2d video data transfer.
>
> for audio situation, we add 'nump' for number of period frames.
User? also why not use the cyclic api?
>
> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
> ---
>
> include/linux/dmaengine.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 752dbde..5263cde 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -144,6 +144,7 @@ struct data_chunk {
> * Otherwise, destination is filled contiguously (icg ignored).
> * Ignored if dst_inc is false.
> * @numf: Number of frames in this template.
> + * @nump: Number of period frames in this template.
> * @frame_size: Number of chunks in a frame i.e, size of sgl[].
> * @sgl: Array of {chunk,icg} pairs that make up a frame.
> */
> @@ -156,6 +157,7 @@ struct dma_interleaved_template {
> bool src_sgl;
> bool dst_sgl;
> size_t numf;
> + size_t nump;
> size_t frame_size;
> struct data_chunk sgl[];
> };
> --
> 2.7.4
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-28 7:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 2:37 [PATCH v1] dmaengine: Add support for audio interleaved transfer Sugar Zhang
2024-03-25 9:32 ` Heiko Stübner
2024-03-28 7:00 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).