Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OpenVino noise suppression model in the SOF plugin #8847

Merged
merged 10 commits into from
Feb 16, 2024
6 changes: 3 additions & 3 deletions src/include/sof/audio/audio_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static inline int audio_stream_set_params(struct audio_stream *buffer,
if (!params)
return -EINVAL;

buffer->runtime_stream_params.frame_fmt = params->frame_fmt;
buffer->runtime_stream_params.frame_fmt = (enum sof_ipc_frame)params->frame_fmt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch by G++, these should be fixed at source though, but sadly I dont think all C compilers allow this

diff --git a/src/include/ipc/stream.h b/src/include/ipc/stream.h
index c397f34a1..6466b2cbc 100644
--- a/src/include/ipc/stream.h
+++ b/src/include/ipc/stream.h
@@ -75,7 +75,7 @@ struct sof_ipc_stream_params {
        struct sof_ipc_hdr hdr;
        struct sof_ipc_host_buffer buffer;
        uint32_t direction;     /**< enum sof_ipc_stream_direction */
-       uint32_t frame_fmt;     /**< enum sof_ipc_frame */
+       enum sof_ipc_frame frame_fmt:32;        /**< enum sof_ipc_frame */
        uint32_t buffer_fmt;    /**< enum sof_ipc_buffer_format */
        uint32_t rate;
        uint16_t stream_tag;

buffer->runtime_stream_params.rate = params->rate;
buffer->runtime_stream_params.channels = params->channels;

Expand Down Expand Up @@ -990,8 +990,8 @@ static inline void audio_stream_fmt_conversion(enum ipc4_bit_depth depth,
* IPC4_DEPTH_24BIT (24) <---> SOF_IPC_FRAME_S24_4LE (1)
* IPC4_DEPTH_32BIT (32) <---> SOF_IPC_FRAME_S32_LE (2)
*/
*frame_fmt = (depth >> 3) - 2;
*valid_fmt = (valid >> 3) - 2;
*frame_fmt = (enum sof_ipc_frame)((depth >> 3) - 2);
*valid_fmt = (enum sof_ipc_frame)((valid >> 3) - 2);

#ifdef CONFIG_FORMAT_U8
if (depth == 8)
Expand Down