summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMikhail Naganov <mnaganov@google.com>2020-10-01 18:07:59 -0700
committerMikhail Naganov <mnaganov@google.com>2020-10-02 13:35:41 -0700
commit27aa8b3a53693d3a398f0d09dd46eabb8ed00acc (patch)
tree1db18bb37ffd5a1984682ddc02fab8cfe53fa13d /modules
parent6c1390c065f70fd708be613da607216f6f10a845 (diff)
Convert mask types from uint32_t to enum type
This applies to the following types: - audio_gain_mode_t; - audio_flags_mask_t; - audio_channel_representation_t; - audio_channel_mask_t; - audio_devices_t. Enum types are distinct thus proper overloading on the type is possible in C++. Also, assignments to enum types are less prone to errors. Bug: 169889714 Test: basic audio functionality Change-Id: I8f1e6fa2bbad8900fdae66f01ac70c75953fd62c
Diffstat (limited to 'modules')
-rw-r--r--modules/audio_remote_submix/audio_hw.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index 103f57dc..72e1fa55 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -675,7 +675,8 @@ static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
{
const struct submix_stream_out * const out = audio_stream_get_submix_stream_out(
const_cast<struct audio_stream *>(stream));
- uint32_t channel_mask = out->dev->routes[out->route_handle].config.output_channel_mask;
+ audio_channel_mask_t channel_mask =
+ out->dev->routes[out->route_handle].config.output_channel_mask;
SUBMIX_ALOGV("out_get_channels() returns %08x", channel_mask);
return channel_mask;
}