From 48915acb392773c1fcb86e2711eab468410a0baa Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 20 Feb 2012 12:08:57 -0800 Subject: [PATCH] struct effect_descriptor_s const correctness Also struct audio_stream in audio_stream_frame_size Change-Id: Ie0de708e38a1850c186a8b4eb5f491adc44b3275 --- include/hardware/audio.h | 2 +- include/hardware/audio_policy.h | 4 ++-- modules/audio/audio_policy.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hardware/audio.h b/include/hardware/audio.h index 01d79b2..0a917e2 100644 --- a/include/hardware/audio.h +++ b/include/hardware/audio.h @@ -291,7 +291,7 @@ typedef struct audio_stream_in audio_stream_in_t; /** * return the frame size (number of bytes per sample). */ -static inline size_t audio_stream_frame_size(struct audio_stream *s) +static inline size_t audio_stream_frame_size(const struct audio_stream *s) { size_t chan_samp_sz; diff --git a/include/hardware/audio_policy.h b/include/hardware/audio_policy.h index 8924dd1..53c8ae3 100644 --- a/include/hardware/audio_policy.h +++ b/include/hardware/audio_policy.h @@ -215,10 +215,10 @@ struct audio_policy { /* Audio effect management */ audio_io_handle_t (*get_output_for_effect)(struct audio_policy *pol, - struct effect_descriptor_s *desc); + const struct effect_descriptor_s *desc); int (*register_effect)(struct audio_policy *pol, - struct effect_descriptor_s *desc, + const struct effect_descriptor_s *desc, audio_io_handle_t output, uint32_t strategy, int session, diff --git a/modules/audio/audio_policy.c b/modules/audio/audio_policy.c index a44ea77..2dd3dbe 100644 --- a/modules/audio/audio_policy.c +++ b/modules/audio/audio_policy.c @@ -193,13 +193,13 @@ static audio_devices_t ap_get_devices_for_stream(const struct audio_policy *pol, } static audio_io_handle_t ap_get_output_for_effect(struct audio_policy *pol, - struct effect_descriptor_s *desc) + const struct effect_descriptor_s *desc) { return 0; } static int ap_register_effect(struct audio_policy *pol, - struct effect_descriptor_s *desc, + const struct effect_descriptor_s *desc, audio_io_handle_t output, uint32_t strategy, int session, -- 2.11.0