From 8bcfd6fa208e53e34e10d2f756e8b88e9ada4f96 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Tue, 11 Jan 2022 09:44:11 -0800 Subject: [PATCH] module_interface: Introduce 2 new structures Introduce 2 new structures to represent the input and output stream buffers. These will be passed as inputs to the process API. Signed-off-by: Ranjani Sridharan --- .../sof/audio/codec_adapter/codec/generic.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/include/sof/audio/codec_adapter/codec/generic.h b/src/include/sof/audio/codec_adapter/codec/generic.h index 7afad1765..c3c0bc97d 100644 --- a/src/include/sof/audio/codec_adapter/codec/generic.h +++ b/src/include/sof/audio/codec_adapter/codec/generic.h @@ -92,6 +92,28 @@ enum module_processing_mode { MODULE_PROCESSING_BYPASS, }; +/** + * \struct input_stream_buffer + * \brief Input stream buffer + */ +struct input_stream_buffer { + void *data; /* data stream buffer */ + uint32_t size; /* size of data in the buffer */ + uint32_t consumed; /* number of bytes consumed by the module */ + + /* Indicates end of stream condition has occurred on the input stream */ + bool end_of_stream; +}; + +/** + * \struct output_stream_buffer + * \brief Output stream buffer + */ +struct output_stream_buffer { + void *data; /* data stream buffer */ + uint32_t size; /* size of data in the buffer */ +}; + /*****************************************************************************/ /* Module generic data types */ /*****************************************************************************/