audio policy: move volume table to XML file
This patch allows to store in XML file volume tables.
The compatibility is maintained for legacy conf file.
Configurable Engine is only compatible with new XML conf.
This patch removes from configurable engine Structure / Settings the volume
table but keep the configurabllity of switching volume profiles from
one another according to criteria like phone state...
(ex: DTMF stream type is following Voice Profile in call)
Change-Id: I78c91bc3378b6c47202abe7b5c1c1e011ff62eed
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
diff --git a/services/audiopolicy/engineconfigurable/src/Engine.h b/services/audiopolicy/engineconfigurable/src/Engine.h
index 8a15e5e..bc5e035 100755
--- a/services/audiopolicy/engineconfigurable/src/Engine.h
+++ b/services/audiopolicy/engineconfigurable/src/Engine.h
@@ -88,20 +88,6 @@
{
return mPolicyEngine->setDeviceConnectionState(devDesc, state);
}
- virtual status_t initStreamVolume(audio_stream_type_t stream,
- int indexMin, int indexMax)
- {
- return mPolicyEngine->initStreamVolume(stream, indexMin, indexMax);
- }
-
- virtual void initializeVolumeCurves(bool /*isSpeakerDrcEnabled*/) {}
-
- virtual float volIndexToDb(device_category deviceCategory,
- audio_stream_type_t stream,
- int indexInUi)
- {
- return mPolicyEngine->volIndexToDb(deviceCategory, stream, indexInUi);
- }
private:
Engine *mPolicyEngine;
@@ -141,11 +127,7 @@
stream);
}
virtual bool setVolumeProfileForStream(const audio_stream_type_t &stream,
- device_category deviceCategory,
- const VolumeCurvePoints &points)
- {
- return mPolicyEngine->setVolumeProfileForStream(stream, deviceCategory, points);
- }
+ const audio_stream_type_t &volumeProfile);
virtual bool setStrategyForUsage(const audio_usage_t &usage, routing_strategy strategy)
{
@@ -181,9 +163,6 @@
audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage) const;
status_t setDeviceConnectionState(const sp<DeviceDescriptor> devDesc,
audio_policy_dev_state_t state);
- float volIndexToDb(device_category category, audio_stream_type_t stream, int indexInUi);
- status_t initStreamVolume(audio_stream_type_t stream, int indexMin, int indexMax);
-
StrategyCollection mStrategyCollection; /**< Strategies indexed by their enum id. */
StreamCollection mStreamCollection; /**< Streams indexed by their enum id. */
UsageCollection mUsageCollection; /**< Usages indexed by their enum id. */