-
Notifications
You must be signed in to change notification settings - Fork 325
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 get buffer ID to sink/src api #8433
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ extern struct tr_ctx buffer_tr; | |
#define trace_buf_get_id(buf_ptr) ((buf_ptr)->pipeline_id) | ||
|
||
/** \brief Retrieves subid (comp id) from the buffer */ | ||
#define trace_buf_get_subid(buf_ptr) ((buf_ptr)->id) | ||
#define buf_get_id(buf_ptr) ((buf_ptr)->stream.runtime_stream_params.id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the ID really a runtime parameter? Isn't it persistent? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is set once, not modified later. Anyway - in rutime |
||
|
||
#if defined(__ZEPHYR__) && defined(CONFIG_ZEPHYR_LOG) | ||
|
||
|
@@ -58,36 +58,36 @@ extern struct tr_ctx buffer_tr; | |
#endif | ||
|
||
#define buf_err(buf_ptr, __e, ...) LOG_ERR(__BUF_FMT __e, trace_buf_get_id(buf_ptr), \ | ||
trace_buf_get_subid(buf_ptr), ##__VA_ARGS__) | ||
buf_get_id(buf_ptr), ##__VA_ARGS__) | ||
|
||
#define buf_warn(buf_ptr, __e, ...) LOG_WRN(__BUF_FMT __e, trace_buf_get_id(buf_ptr), \ | ||
trace_buf_get_subid(buf_ptr), ##__VA_ARGS__) | ||
buf_get_id(buf_ptr), ##__VA_ARGS__) | ||
|
||
#define buf_info(buf_ptr, __e, ...) LOG_INF(__BUF_FMT __e, trace_buf_get_id(buf_ptr), \ | ||
trace_buf_get_subid(buf_ptr), ##__VA_ARGS__) | ||
buf_get_id(buf_ptr), ##__VA_ARGS__) | ||
|
||
#define buf_dbg(buf_ptr, __e, ...) LOG_DBG(__BUF_FMT __e, trace_buf_get_id(buf_ptr), \ | ||
trace_buf_get_subid(buf_ptr), ##__VA_ARGS__) | ||
buf_get_id(buf_ptr), ##__VA_ARGS__) | ||
|
||
#else | ||
/** \brief Trace error message from buffer */ | ||
#define buf_err(buf_ptr, __e, ...) \ | ||
trace_dev_err(trace_buf_get_tr_ctx, trace_buf_get_id, \ | ||
trace_buf_get_subid, \ | ||
buf_get_id, \ | ||
(__sparse_force const struct comp_buffer *)buf_ptr, \ | ||
__e, ##__VA_ARGS__) | ||
|
||
/** \brief Trace warning message from buffer */ | ||
#define buf_warn(buf_ptr, __e, ...) \ | ||
trace_dev_warn(trace_buf_get_tr_ctx, trace_buf_get_id, \ | ||
trace_buf_get_subid, \ | ||
buf_get_id, \ | ||
(__sparse_force const struct comp_buffer *)buf_ptr, \ | ||
__e, ##__VA_ARGS__) | ||
|
||
/** \brief Trace info message from buffer */ | ||
#define buf_info(buf_ptr, __e, ...) \ | ||
trace_dev_info(trace_buf_get_tr_ctx, trace_buf_get_id, \ | ||
trace_buf_get_subid, \ | ||
buf_get_id, \ | ||
(__sparse_force const struct comp_buffer *)buf_ptr, \ | ||
__e, ##__VA_ARGS__) | ||
|
||
|
@@ -97,7 +97,7 @@ extern struct tr_ctx buffer_tr; | |
#else | ||
#define buf_dbg(buf_ptr, __e, ...) \ | ||
trace_dev_dbg(trace_buf_get_tr_ctx, trace_buf_get_id, \ | ||
trace_buf_get_subid, \ | ||
buf_get_id, \ | ||
(__sparse_force const struct comp_buffer *)buf_ptr, \ | ||
__e, ##__VA_ARGS__) | ||
#endif | ||
|
@@ -139,7 +139,6 @@ struct comp_buffer { | |
struct audio_stream stream; | ||
|
||
/* configuration */ | ||
uint32_t id; | ||
uint32_t pipeline_id; | ||
uint32_t caps; | ||
uint32_t core; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be static inline. There is PR in flow for splitting header directories and we will be able to catch this in the correct folder i.e. for baseFW or module usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static inline and put it tou sink_api.h and source_api.h accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. We agreed lately the full sink/src encapsulation is too expensive and all "small" functions should be inline (#8100)
It has been implemented for sink/src as a part of #8365. Till 8365 is merged I prefer to follow the obsolete way to avoid merge conflicts