Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0750690 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Configure platform msm8960

Configure HAL build for msm8960.
Fix typo in HAL error message on channel count.
Add default value for max number of channels.

Bug 24758771

Change-Id: I6942fbc01012c272abb0fbed312e92958ebceb87
parent 7246fb64
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7,6 +7,9 @@ include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm

AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
ifneq ($(filter msm8960,$(TARGET_BOARD_PLATFORM)),)
  LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2"
endif
ifneq ($(filter msm8974 msm8226 msm8084 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
  # B-family platform uses msm8974 code base
  AUDIO_PLATFORM = msm8974
+5 −1
Original line number Diff line number Diff line
@@ -65,9 +65,13 @@
#define MIN_CHANNEL_COUNT                1
#define DEFAULT_CHANNEL_COUNT            2

#ifndef MAX_TARGET_SPECIFIC_CHANNEL_CNT
#define MAX_CHANNEL_COUNT 1
#else
#define MAX_CHANNEL_COUNT atoi(XSTR(MAX_TARGET_SPECIFIC_CHANNEL_CNT))
#define XSTR(x) STR(x)
#define STR(x) #x
#endif

static unsigned int configured_low_latency_capture_period_size =
        LOW_LATENCY_CAPTURE_PERIOD_SIZE;
@@ -1239,7 +1243,7 @@ static int check_input_parameters(uint32_t sample_rate,
    }

    if ((channel_count < MIN_CHANNEL_COUNT) || (channel_count > MAX_CHANNEL_COUNT)) {
        ALOGE("%s: unsupported channel count (%d) passed  Min / Max (%d\%d)", __func__,
        ALOGE("%s: unsupported channel count (%d) passed  Min / Max (%d / %d)", __func__,
               channel_count, MIN_CHANNEL_COUNT, MAX_CHANNEL_COUNT);
        return -EINVAL;
    }