summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJungshik Jang <jayjang@google.com>2014-07-11 09:50:45 +0900
committerRom Lemarchand <romlem@google.com>2014-07-11 03:37:42 +0000
commitf7e5aeadb71cf786bea6a9ee8c86069e939e8267 (patch)
tree7ff4a23df1d4eb4b5b31331335ed755221fddd5e
parenta78fc23491f3490bec4e4ac72c4bdc8c6d554fe3 (diff)
downloadsystem_core-f7e5aeadb71cf786bea6a9ee8c86069e939e8267.zip
system_core-f7e5aeadb71cf786bea6a9ee8c86069e939e8267.tar.gz
system_core-f7e5aeadb71cf786bea6a9ee8c86069e939e8267.tar.bz2
Fix size of "values" fields of audio_gain_config.
It should be sizeof(audio_channel_mask_t) * 8 not sizeof(audio_channel_mask_t) alone. Change-Id: I3523dd4d44a0900ba1845b3675a22451f1fc2f3c
-rw-r--r--include/system/audio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/system/audio.h b/include/system/audio.h
index 8530efa..5967b24 100644
--- a/include/system/audio.h
+++ b/include/system/audio.h
@@ -645,10 +645,10 @@ struct audio_gain_config {
audio_gain_mode_t mode; /* mode requested for this command */
audio_channel_mask_t channel_mask; /* channels which gain value follows.
N/A in joint mode */
- int values[sizeof(audio_channel_mask_t)]; /* gain values in millibels for each
- channel ordered from LSb to MSb in channel mask.
- The number of values is 1 in joint mode or
- popcount(channel_mask) */
+ int values[sizeof(audio_channel_mask_t) * 8]; /* gain values in millibels
+ for each channel ordered from LSb to MSb in
+ channel mask. The number of values is 1 in joint
+ mode or popcount(channel_mask) */
unsigned int ramp_duration_ms; /* ramp duration in ms */
};