policy: Avoid unnecessary set_parameter calls
APM calls a set_parameter on primary output with key fm_volume
whenever a checkAndSetVolume is called. This is done irrespective
of whether the volume values are same of different.
A side effect of doing so is that the FastMixer associated with
the MixerThread will be put into HOT_IDLE unnecessarily which in turn
can cause glitches/breaks in audio.
CRs-Fixed: 948361
Change-Id: I7fd8b7340e6c78ee6d00b41ccf679582338c011a
diff --git a/policy_hal/AudioPolicyManager.h b/policy_hal/AudioPolicyManager.h
index 55d59ac..59124b8 100644
--- a/policy_hal/AudioPolicyManager.h
+++ b/policy_hal/AudioPolicyManager.h
@@ -154,6 +154,7 @@
// Used for record + playback concurrency
bool mIsInputRequestOnProgress;
#endif
+ float mPrevFMVolumeDb;
};
};