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

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

Merge "policy_hal: update custom audio policy implementation APIs against O-AOSP"

parents 05f20b18 fcb00d9d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,8 @@ LOCAL_C_INCLUDES := $(TOPDIR)frameworks/av/services \
                    $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
                    $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
                    $(TOPDIR)frameworks/av/services/audiopolicy \
                    $(TOPDIR)frameworks/av/services/audiopolicy \
                    $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
                    $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
                    $(call include-path-for, avextension)
                    $(call include-path-for, avextension) \
                    $(TOPDIR)system/core/base/include




LOCAL_SHARED_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \
+184 −262

File changed.

Preview size limit exceeded, changes collapsed.

+14 −20
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
 * Not a contribution.
 * Not a contribution.
 *
 *
 * Copyright (C) 2009 The Android Open Source Project
 * Copyright (C) 2009 The Android Open Source Project
@@ -67,15 +67,15 @@ public:
                                         audio_io_handle_t *input,
                                         audio_io_handle_t *input,
                                         audio_session_t session,
                                         audio_session_t session,
                                         uid_t uid,
                                         uid_t uid,
                                         uint32_t samplingRate,
                                         const audio_config_base_t *config,
                                         audio_format_t format,
                                         audio_channel_mask_t channelMask,
                                         audio_input_flags_t flags,
                                         audio_input_flags_t flags,
                                         audio_port_handle_t selectedDeviceId,
                                         audio_port_handle_t selectedDeviceId,
                                         input_type_t *inputType);
                                         input_type_t *inputType,
                                         audio_port_handle_t *portId);
        // indicates to the audio policy manager that the input starts being used.
        // indicates to the audio policy manager that the input starts being used.
        virtual status_t startInput(audio_io_handle_t input,
        virtual status_t startInput(audio_io_handle_t input,
                                    audio_session_t session);
                                    audio_session_t session,
                                    concurrency_type__mask_t *concurrency);
        // indicates to the audio policy manager that the input stops being used.
        // indicates to the audio policy manager that the input stops being used.
        virtual status_t stopInput(audio_io_handle_t input,
        virtual status_t stopInput(audio_io_handle_t input,
                                   audio_session_t session);
                                   audio_session_t session);
@@ -90,13 +90,6 @@ protected:
                                                   audio_devices_t device,
                                                   audio_devices_t device,
                                                   int delayMs = 0, bool force = false);
                                                   int delayMs = 0, bool force = false);


        // selects the most appropriate device on output for current state
        // must be called every time a condition that affects the device choice for a given output is
        // changed: connected device, phone state, force use, output start, output stop..
        // see getDeviceForStrategy() for the use of fromCache parameter
        audio_devices_t getNewOutputDevice(const sp<AudioOutputDescriptor>& outputDesc,
                                           bool fromCache);

        // avoid invalidation for active music stream on  previous outputs
        // avoid invalidation for active music stream on  previous outputs
        // which is supported on the new device.
        // which is supported on the new device.
        bool isInvalidationOfMusicStreamNeeded(routing_strategy strategy);
        bool isInvalidationOfMusicStreamNeeded(routing_strategy strategy);
@@ -109,12 +102,12 @@ protected:


        // if argument "device" is different from AUDIO_DEVICE_NONE,  startSource() will force
        // if argument "device" is different from AUDIO_DEVICE_NONE,  startSource() will force
        // the re-evaluation of the output device.
        // the re-evaluation of the output device.
        status_t startSource(sp<AudioOutputDescriptor> outputDesc,
        status_t startSource(const sp<AudioOutputDescriptor>& outputDesc,
                             audio_stream_type_t stream,
                             audio_stream_type_t stream,
                             audio_devices_t device,
                             audio_devices_t device,
                             const char *address,
                             const char *address,
                             uint32_t *delayMs);
                             uint32_t *delayMs);
         status_t stopSource(sp<AudioOutputDescriptor> outputDesc,
         status_t stopSource(const sp<AudioOutputDescriptor>& outputDesc,
                            audio_stream_type_t stream,
                            audio_stream_type_t stream,
                            bool forceDeviceUpdate);
                            bool forceDeviceUpdate);
        // event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON
        // event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON
@@ -143,6 +136,7 @@ private:
        audio_io_handle_t getOutputForDevice(
        audio_io_handle_t getOutputForDevice(
                audio_devices_t device,
                audio_devices_t device,
                audio_session_t session,
                audio_session_t session,
                uid_t client,
                audio_stream_type_t stream,
                audio_stream_type_t stream,
                uint32_t samplingRate,
                uint32_t samplingRate,
                audio_format_t format,
                audio_format_t format,
@@ -155,12 +149,10 @@ private:
                audio_session_t session,
                audio_session_t session,
                audio_stream_type_t *stream,
                audio_stream_type_t *stream,
                uid_t uid,
                uid_t uid,
                uint32_t samplingRate,
                const audio_config_t *config,
                audio_format_t format,
                audio_channel_mask_t channelMask,
                audio_output_flags_t flags,
                audio_output_flags_t flags,
                audio_port_handle_t selectedDeviceId,
                audio_port_handle_t selectedDeviceId,
                const audio_offload_info_t *offloadInfo);
                audio_port_handle_t *portId);
        // Used for voip + voice concurrency usecase
        // Used for voip + voice concurrency usecase
        int mPrevPhoneState;
        int mPrevPhoneState;
#ifdef VOICE_CONCURRENCY
#ifdef VOICE_CONCURRENCY
@@ -170,8 +162,10 @@ private:
        // Used for record + playback concurrency
        // Used for record + playback concurrency
        bool mIsInputRequestOnProgress;
        bool mIsInputRequestOnProgress;
#endif
#endif

#ifdef FM_POWER_OPT
        float mPrevFMVolumeDb;
        float mPrevFMVolumeDb;
        bool mFMIsActive;
        bool mFMIsActive;
#endif
};
};

};
};