diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-09-26 15:42:18 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@gmail.com> | 2014-09-29 17:26:56 +0200 |
commit | 3c2ebdd0308ef2c1c6e1f2ae67063d9de0e83c54 (patch) | |
tree | b61584a8e1a09677803e413e3db563c5532235ce /android/hal-audio.c | |
parent | 316fd52b78647a0a9ebd750c75fa41b1264899c4 (diff) | |
download | bluez-3c2ebdd0308ef2c1c6e1f2ae67063d9de0e83c54.tar.gz |
android/hal-audio: Use hal-utils helpers for unaligned access
Diffstat (limited to 'android/hal-audio.c')
-rw-r--r-- | android/hal-audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/android/hal-audio.c b/android/hal-audio.c index 1bbc0736b..e70351ea8 100644 --- a/android/hal-audio.c +++ b/android/hal-audio.c @@ -35,7 +35,7 @@ #include "hal-log.h" #include "hal-msg.h" #include "hal-audio.h" -#include "src/shared/util.h" +#include "hal-utils.h" #define FIXED_A2DP_PLAYBACK_LATENCY_MS 25 @@ -588,10 +588,10 @@ static void downmix_to_mono(struct a2dp_stream_out *out, const uint8_t *buffer, frames = bytes / (2 * sizeof(int16_t)); for (i = 0; i < frames; i++) { - int16_t l = le16_to_cpu(get_unaligned(&input[i * 2])); - int16_t r = le16_to_cpu(get_unaligned(&input[i * 2 + 1])); + int16_t l = get_le16(&input[i * 2]); + int16_t r = get_le16(&input[i * 2 + 1]); - put_unaligned(cpu_to_le16((l + r) / 2), &output[i]); + put_le16((l + r) / 2, &output[i]); } } |