Effects: set hw volume if effect chain doesn't have volume control
If effect chain has non-offloaded effect, and is enabled for direct
output, when there's no volume control for all the effect modules
within this chain, volume should still be set to HAL.
Test: Play Music, Videos with effects
Bug: 149899134
CRs-Fixed: 2625597
Change-Id: I77bd0d456d5fa4e88afb283002a5eb1e2b704ca8
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index 4901451..2826297 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -596,6 +596,9 @@
void setThread(const sp<ThreadBase>& thread);
+ // true if any effect module within the chain has volume control
+ bool hasVolumeControlEnabled_l() const;
+
void setVolumeForOutput_l(uint32_t left, uint32_t right);
mutable Mutex mLock; // mutex protecting effect list