--- android/hal-sco.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/hal-sco.c b/android/hal-sco.c index 8cb7a7c..91a3baf 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -29,7 +29,7 @@ #include <hardware/hardware.h> #include <audio_utils/resampler.h> -#include "../src/shared/util.h" +#include "hal-utils.h" #include "sco-msg.h" #include "ipc-common.h" #include "hal-log.h" @@ -311,10 +311,10 @@ static void downmix_to_mono(struct sco_stream_out *out, const uint8_t *buffer, size_t i; for (i = 0; i < frame_num; 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) >> 1), &output[i]); + put_le16((l + r) / 2, &output[i]); } } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html