detect_test: Mark source buffer as const in processing functions

Const keyword is added to explicitly indicate that nothing in given
source buffer can be changed in processing functions - read pointers also.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit is contained in:
Karol Trzcinski 2020-01-17 10:09:52 +01:00 committed by Liam Girdwood
parent 3e7d3f0181
commit fdb3483724
1 changed files with 3 additions and 2 deletions

View File

@ -88,7 +88,7 @@ struct comp_data {
struct kpb_client client_data;
void (*detect_func)(struct comp_dev *dev,
struct comp_buffer *source, uint32_t frames);
const struct comp_buffer *source, uint32_t frames);
};
static inline bool detector_is_sample_width_supported(enum sof_ipc_frame sf)
@ -164,7 +164,8 @@ static void detect_test_notify(struct comp_dev *dev)
}
static void default_detect_test(struct comp_dev *dev,
struct comp_buffer *source, uint32_t frames)
const struct comp_buffer *source,
uint32_t frames)
{
struct comp_data *cd = comp_get_drvdata(dev);
void *src;