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

Commit ed75437b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio: Add flags to makefiles"

parents d93a15c7 c09ae066
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -434,6 +434,12 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SND_MONITOR)), true)
    LOCAL_SRC_FILES += audio_extn/sndmonitor.c
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
    LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
    LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
    LOCAL_STATIC_LIBRARIES += libprofile_rt
endif

LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)

LOCAL_MODULE_RELATIVE_PATH := hw
+18 −4
Original line number Diff line number Diff line
@@ -449,6 +449,18 @@ static int out_set_compr_volume(struct audio_stream_out *stream, float left, flo
static int out_set_voip_volume(struct audio_stream_out *stream, float left, float right);
static int out_set_pcm_volume(struct audio_stream_out *stream, float left, float right);

#ifdef AUDIO_FEATURE_ENABLED_GCOV
extern void  __gcov_flush();
static void enable_gcov()
{
    __gcov_flush();
}
#else
static void enable_gcov()
{
}
#endif

static bool may_use_noirq_mode(struct audio_device *adev, audio_usecase_t uc_id,
                               int flags __unused)
{
@@ -2411,7 +2423,7 @@ static int stop_input_stream(struct stream_in *in)
    free(uc_info);

    adev->active_input = get_next_active_input(adev);

    enable_gcov();
    ALOGV("%s: exit: status(%d)", __func__, ret);
    return ret;
}
@@ -2587,7 +2599,7 @@ int start_input_stream(struct stream_in *in)
done_open:
    audio_extn_perf_lock_release(&adev->perf_lock_handle);
    ALOGD("%s: exit", __func__);

    enable_gcov();
    return ret;

error_open:
@@ -2601,7 +2613,7 @@ error_config:
     */
    usleep(50000);
    ALOGD("%s: exit: status(%d)", __func__, ret);

    enable_gcov();
    return ret;
}

@@ -3294,6 +3306,7 @@ int start_output_stream(struct stream_out *out)
    platform_set_swap_channels(adev, true);

    ATRACE_END();
    enable_gcov();
    return ret;
error_open:
    audio_extn_perf_lock_release(&adev->perf_lock_handle);
@@ -3305,6 +3318,7 @@ error_config:
     */
    usleep(50000);
    ATRACE_END();
    enable_gcov();
    return ret;
}

@@ -7540,7 +7554,7 @@ static int adev_close(hw_device_t *device)
        adev = NULL;
    }
    pthread_mutex_unlock(&adev_init_lock);

    enable_gcov();
    return 0;
}

+6 −0
Original line number Diff line number Diff line
@@ -12,4 +12,10 @@ LOCAL_SHARED_LIBRARIES := \
    liblog \
    libcutils

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_STATIC_LIBRARIES += libprofile_rt
endif

include $(BUILD_EXECUTABLE)
+6 −0
Original line number Diff line number Diff line
@@ -37,6 +37,12 @@ LOCAL_SHARED_LIBRARIES := libutils liblog
LOCAL_SRC_FILES         := src/aenc_svr.c
LOCAL_SRC_FILES         += src/omx_aac_aenc.cpp

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_STATIC_LIBRARIES += libprofile_rt
endif

LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+6 −0
Original line number Diff line number Diff line
@@ -39,6 +39,12 @@ LOCAL_SHARED_LIBRARIES := libutils liblog
LOCAL_SRC_FILES         := src/aenc_svr.c
LOCAL_SRC_FILES         += src/omx_amr_aenc.cpp

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_STATIC_LIBRARIES += libprofile_rt
endif

LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
Loading