policy_hal: add bitrate restriction for wma/wma_pro/wma_lossless
HW decoded wma is wrong when bit rate of wma files is over specific
threshold, and noise can be heard when playing high bitrate wma files.
Check the bitrate of wma files when checking offload support, when
bit rate is too high, wma cannot be offloaded.
Change-Id: Ib477b9a9fc583caabfd738c620de345105a08988
CRs-Fixed: 1053169
diff --git a/policy_hal/AudioPolicyManager.h b/policy_hal/AudioPolicyManager.h
index dfda1c9..deef57d 100644
--- a/policy_hal/AudioPolicyManager.h
+++ b/policy_hal/AudioPolicyManager.h
@@ -39,6 +39,10 @@
#ifndef AUDIO_EXTN_AFE_PROXY_ENABLED
#define AUDIO_DEVICE_OUT_PROXY 0x1000000
#endif
+
+#define MAX_BITRATE_WMA 384000
+#define MAX_BITRATE_WMA_PRO 1536000
+#define MAX_BITRATE_WMA_LOSSLESS 1152000
// ----------------------------------------------------------------------------
class AudioPolicyManagerCustom: public AudioPolicyManager