From 551b6a3b5cbf314b4021da64fada0c9119b2535f Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Tue, 19 Jun 2012 12:29:39 -0700 Subject: [PATCH] Use audio_channel_mask_t consistently Change-Id: I0a274ab9f30a9380bc00eae69988224721fea177 --- audio/audio_hw_hal.cpp | 8 ++++---- audio/audio_policy_hal.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/audio/audio_hw_hal.cpp b/audio/audio_hw_hal.cpp index ab4d63a..68fa076 100644 --- a/audio/audio_hw_hal.cpp +++ b/audio/audio_hw_hal.cpp @@ -77,11 +77,11 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) return out->legacy_out->bufferSize(); } -static uint32_t out_get_channels(const struct audio_stream *stream) +static audio_channel_mask_t out_get_channels(const struct audio_stream *stream) { const struct legacy_stream_out *out = reinterpret_cast(stream); - return out->legacy_out->channels(); + return (audio_channel_mask_t) out->legacy_out->channels(); } static audio_format_t out_get_format(const struct audio_stream *stream) @@ -206,11 +206,11 @@ static size_t in_get_buffer_size(const struct audio_stream *stream) return in->legacy_in->bufferSize(); } -static uint32_t in_get_channels(const struct audio_stream *stream) +static audio_channel_mask_t in_get_channels(const struct audio_stream *stream) { const struct legacy_stream_in *in = reinterpret_cast(stream); - return in->legacy_in->channels(); + return (audio_channel_mask_t) in->legacy_in->channels(); } static audio_format_t in_get_format(const struct audio_stream *stream) diff --git a/audio/audio_policy_hal.cpp b/audio/audio_policy_hal.cpp index 37e6a6a..e855c03 100644 --- a/audio/audio_policy_hal.cpp +++ b/audio/audio_policy_hal.cpp @@ -137,14 +137,14 @@ static audio_io_handle_t ap_get_output(struct audio_policy *pol, audio_stream_type_t stream, uint32_t sampling_rate, audio_format_t format, - uint32_t channels, + audio_channel_mask_t channelMask, audio_output_flags_t flags) { struct legacy_audio_policy *lap = to_lap(pol); ALOGV("%s: tid %d", __func__, gettid()); return lap->apm->getOutput((AudioSystem::stream_type)stream, - sampling_rate, (int) format, channels, + sampling_rate, (int) format, channelMask, (AudioSystem::output_flags)flags); } @@ -174,11 +174,11 @@ static void ap_release_output(struct audio_policy *pol, static audio_io_handle_t ap_get_input(struct audio_policy *pol, audio_source_t inputSource, uint32_t sampling_rate, audio_format_t format, - uint32_t channels, + audio_channel_mask_t channelMask, audio_in_acoustics_t acoustics) { struct legacy_audio_policy *lap = to_lap(pol); - return lap->apm->getInput((int) inputSource, sampling_rate, (int) format, channels, + return lap->apm->getInput((int) inputSource, sampling_rate, (int) format, channelMask, (AudioSystem::audio_in_acoustics)acoustics); }