From 35d25b13108c713c170baf7665f9b7c6a544bdb4 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Tue, 11 Jun 2024 11:42:06 -0700 Subject: [PATCH] sink/source: Add pipeline_id accessor API Expose the new pipeline_id field in sof_audio_stream_params to a cleaner sink/source API for use by module code. Longer term this may want to be indirected by newer backends. Signed-off-by: Andy Ross --- src/include/module/audio/sink_api.h | 5 +++++ src/include/module/audio/source_api.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/include/module/audio/sink_api.h b/src/include/module/audio/sink_api.h index d5fd0118b3bf..98129b229f17 100644 --- a/src/include/module/audio/sink_api.h +++ b/src/include/module/audio/sink_api.h @@ -248,4 +248,9 @@ static inline uint32_t sink_get_id(struct sof_sink *sink) return sink->audio_stream_params->id; } +static inline uint32_t sink_get_pipeline_id(struct sof_sink *sink) +{ + return sink->audio_stream_params->pipeline_id; +} + #endif /* __MODULE_AUDIO_SINK_API_H__ */ diff --git a/src/include/module/audio/source_api.h b/src/include/module/audio/source_api.h index e4b522bdb7f0..0925fb251bd2 100644 --- a/src/include/module/audio/source_api.h +++ b/src/include/module/audio/source_api.h @@ -226,4 +226,9 @@ static inline uint32_t source_get_id(struct sof_source *source) return source->audio_stream_params->id; } +static inline uint32_t source_get_pipeline_id(struct sof_source *source) +{ + return source->audio_stream_params->pipeline_id; +} + #endif /* __MODULE_AUDIO_SOURCE_API_H__ */