policy-hal: squash multiple changes/fixes to custom policy
This commit is a squash of below changes. Only relevant
changes have been ported and the other required changes
are in base policy manager.
audiopolicy: support extended feature in audiopolicymanager.
Change-Id: I1925339b591cd29f11a71c287a2e53c0627e9e62
audiopolicy: additional change for extended feature
Change-Id: I9bad6a294ddd7aee72f6f6a314666b892b730c8e
audiopolicy: Do not route audio to HDMI if HDMI not connected
Change-Id: I1c76ba3c3a1438463461ea7c41799633bd977283
audiopolicy: Fix for device selection during concurrent audio playback
Change-Id: Ibf3c1bfd05b68d70c6cb9e8b9b95e989f27c2e75
Change-Id: I00470a057cdeefff7bba3bffd333fb556f3d97e6
diff --git a/policy_hal/AudioPolicyManager.h b/policy_hal/AudioPolicyManager.h
index b5a4461..55bb05c 100644
--- a/policy_hal/AudioPolicyManager.h
+++ b/policy_hal/AudioPolicyManager.h
@@ -36,7 +36,7 @@
#define AUDIO_FORMAT_AAC_ADTS 0x1E000000UL
#endif
-#ifndef AFE_PROXY_ENABLED
+#ifndef AUDIO_EXTN_AFE_PROXY_ENABLED
#define AUDIO_DEVICE_OUT_PROXY 0x1000000
#endif
// ----------------------------------------------------------------------------
@@ -55,7 +55,6 @@
const char *device_name);
virtual void setPhoneState(audio_mode_t state);
-
virtual bool isOffloadSupported(const audio_offload_info_t& offloadInfo);
virtual status_t getInputForAttr(const audio_attributes_t *attr,
@@ -74,7 +73,6 @@
// indicates to the audio policy manager that the input stops being used.
virtual status_t stopInput(audio_io_handle_t input,
audio_session_t session);
- virtual audio_devices_t getDeviceForStrategy(routing_strategy strategy, bool fromCache);
protected:
status_t checkAndSetVolume(audio_stream_type_t stream,
@@ -101,9 +99,9 @@
status_t stopSource(sp<SwAudioOutputDescriptor> outputDesc,
audio_stream_type_t stream,
bool forceDeviceUpdate);
- // event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON 313
- // returns 0 if no mute/unmute event happened, the largest latency of the device where 314
- // the mute/unmute happened 315
+ // event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON
+ // returns 0 if no mute/unmute event happened, the largest latency of the device where
+ // the mute/unmute happened
uint32_t handleEventForBeacon(int){return 0;}
uint32_t setBeaconMute(bool){return 0;}
#ifdef VOICE_CONCURRENCY
@@ -119,14 +117,9 @@
//parameter indicates if HDMI plug in/out detected
bool mHdmiAudioEvent;
private:
- static float volIndexToAmpl(audio_devices_t device, const StreamDescriptor& streamDesc,
- int indexInUi);
// updates device caching and output for streams that can influence the
// routing of notifications
void handleNotificationRoutingForStream(audio_stream_type_t stream);
- static bool isVirtualInputDevice(audio_devices_t device);
- static bool deviceDistinguishesOnAddress(audio_devices_t device);
- uint32_t nextUniqueId();
// internal method to return the output handle for the given device and format
audio_io_handle_t getOutputForDevice(
audio_devices_t device,
@@ -156,8 +149,6 @@
// Used for record + playback concurrency
bool mIsInputRequestOnProgress;
#endif
-
-
};
};