Merge changes from topic "apply-aosp-1209307-and-following"

am: 9b7d89970a

Change-Id: I5c8fb6ee0b7121690d76bbc70d373529d5df639a
gugelfrei
François Gaffie 5 years ago committed by android-build-merger
commit a6c9490e7f

@ -141,6 +141,15 @@ engineConfig::ParsingResult EngineBase::loadAudioPolicyEngineConfig()
result = {std::make_unique<engineConfig::Config>(config),
static_cast<size_t>(ret == NO_ERROR ? 0 : 1)};
}
// Append for internal use only strategies/volume groups (e.g. rerouting/patch)
result.parsedConfig->productStrategies.insert(
std::end(result.parsedConfig->productStrategies),
std::begin(gOrderedSystemStrategies), std::end(gOrderedSystemStrategies));
result.parsedConfig->volumeGroups.insert(
std::end(result.parsedConfig->volumeGroups),
std::begin(gSystemVolumeGroups), std::end(gSystemVolumeGroups));
ALOGE_IF(result.nbSkippedElement != 0, "skipped %zu elements", result.nbSkippedElement);
engineConfig::VolumeGroup defaultVolumeConfig;

@ -118,15 +118,22 @@ const engineConfig::ProductStrategies gOrderedStrategies = {
AUDIO_FLAG_BEACON, ""}}
}
},
},
{"STRATEGY_REROUTING",
}
};
/**
* For Internal use of respectively audio policy and audioflinger
* For compatibility reason why apm volume config file, volume group name is the stream type.
*/
const engineConfig::ProductStrategies gOrderedSystemStrategies = {
{"rerouting",
{
{"", AUDIO_STREAM_REROUTING, "AUDIO_STREAM_REROUTING",
{{AUDIO_CONTENT_TYPE_UNKNOWN, AUDIO_USAGE_UNKNOWN, AUDIO_SOURCE_DEFAULT, 0, ""}}
}
},
},
{"STRATEGY_PATCH",
{"patch",
{
{"", AUDIO_STREAM_PATCH, "AUDIO_STREAM_PATCH",
{{AUDIO_CONTENT_TYPE_UNKNOWN, AUDIO_USAGE_UNKNOWN, AUDIO_SOURCE_DEFAULT, 0, ""}}
@ -134,6 +141,28 @@ const engineConfig::ProductStrategies gOrderedStrategies = {
},
}
};
const engineConfig::VolumeGroups gSystemVolumeGroups = {
{"AUDIO_STREAM_REROUTING", 0, 1,
{
{"DEVICE_CATEGORY_SPEAKER", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_HEADSET", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_EARPIECE", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_EXT_MEDIA", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_HEARING_AID", {{0,0}, {100, 0}}},
}
},
{"AUDIO_STREAM_PATCH", 0, 1,
{
{"DEVICE_CATEGORY_SPEAKER", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_HEADSET", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_EARPIECE", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_EXT_MEDIA", {{0,0}, {100, 0}}},
{"DEVICE_CATEGORY_HEARING_AID", {{0,0}, {100, 0}}},
}
}
};
const engineConfig::Config gDefaultEngineConfig = {
1.0,

@ -147,10 +147,6 @@ limitations under the License.
<ProductStrategy name="notification">
<AttributesGroup streamType="AUDIO_STREAM_NOTIFICATION" volumeGroup="ring">
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_EVENT"/> </Attributes>
</AttributesGroup>
</ProductStrategy>
<ProductStrategy name="system">
@ -167,19 +163,5 @@ limitations under the License.
</AttributesGroup>
</ProductStrategy>
<!-- Routing Strategy rerouting may be removed as following media??? -->
<ProductStrategy name="rerouting">
<AttributesGroup streamType="AUDIO_STREAM_REROUTING" volumeGroup="rerouting">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
<!-- Patch stream needs full scale volume, define it otherwise switch to default... -->
<ProductStrategy name="patch">
<AttributesGroup streamType="AUDIO_STREAM_PATCH" volumeGroup="patch">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
</ProductStrategies>

@ -189,57 +189,5 @@
</volume>
</volumeGroup>
<volumeGroup>
<name>rerouting</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID">
<point>0,0</point>
<point>100,0</point>
</volume>
</volumeGroup>
<volumeGroup>
<name>patch</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID">
<point>0,0</point>
<point>100,0</point>
</volume>
</volumeGroup>
</volumeGroups>

@ -147,10 +147,6 @@ limitations under the License.
<ProductStrategy name="notification">
<AttributesGroup streamType="AUDIO_STREAM_NOTIFICATION" volumeGroup="ring">
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST"/> </Attributes>
<Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_EVENT"/> </Attributes>
</AttributesGroup>
</ProductStrategy>
<ProductStrategy name="system">
@ -167,18 +163,5 @@ limitations under the License.
</AttributesGroup>
</ProductStrategy>
<!-- Routing Strategy rerouting may be removed as following media??? -->
<ProductStrategy name="rerouting">
<AttributesGroup streamType="AUDIO_STREAM_REROUTING" volumeGroup="rerouting">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
<!-- Patch stream needs full scale volume, define it otherwise switch to default... -->
<ProductStrategy name="patch">
<AttributesGroup streamType="AUDIO_STREAM_PATCH" volumeGroup="patch">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
</ProductStrategies>

@ -189,57 +189,5 @@
</volume>
</volumeGroup>
<volumeGroup>
<name>rerouting</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID">
<point>0,0</point>
<point>100,0</point>
</volume>
</volumeGroup>
<volumeGroup>
<name>patch</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
<point>0,0</point>
<point>100,0</point>
</volume>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID">
<point>0,0</point>
<point>100,0</point>
</volume>
</volumeGroup>
</volumeGroups>

@ -97,20 +97,5 @@
</AttributesGroup>
</ProductStrategy>
<!-- Routing Strategy rerouting may be removed as following media??? -->
<ProductStrategy name="STRATEGY_REROUTING">
<AttributesGroup streamType="AUDIO_STREAM_REROUTING" volumeGroup="rerouting">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
<!-- Default product strategy has empty attributes -->
<ProductStrategy name="STRATEGY_PATCH">
<AttributesGroup streamType="AUDIO_STREAM_PATCH" volumeGroup="patch">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
</ProductStrategies>

@ -215,26 +215,6 @@ volume index from 0 to 100.
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID" ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
</volumeGroup>
<volumeGroup>
<name>rerouting</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID" ref="FULL_SCALE_VOLUME_CURVE"/>
</volumeGroup>
<volumeGroup>
<name>patch</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID" ref="FULL_SCALE_VOLUME_CURVE"/>
</volumeGroup>
</volumeGroups>

@ -97,20 +97,5 @@
</AttributesGroup>
</ProductStrategy>
<!-- Routing Strategy rerouting may be removed as following media??? -->
<ProductStrategy name="STRATEGY_REROUTING">
<AttributesGroup streamType="AUDIO_STREAM_REROUTING" volumeGroup="rerouting">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
<!-- Default product strategy has empty attributes -->
<ProductStrategy name="STRATEGY_PATCH">
<AttributesGroup streamType="AUDIO_STREAM_PATCH" volumeGroup="patch">
<Attributes></Attributes>
</AttributesGroup>
</ProductStrategy>
</ProductStrategies>

@ -217,26 +217,5 @@ volume index from 0 to 100.
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID" ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
</volumeGroup>
<volumeGroup>
<name>rerouting</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID" ref="FULL_SCALE_VOLUME_CURVE"/>
</volumeGroup>
<volumeGroup>
<name>patch</name>
<indexMin>0</indexMin>
<indexMax>1</indexMax>
<volume deviceCategory="DEVICE_CATEGORY_HEADSET" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_SPEAKER" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EARPIECE" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" ref="FULL_SCALE_VOLUME_CURVE"/>
<volume deviceCategory="DEVICE_CATEGORY_HEARING_AID" ref="FULL_SCALE_VOLUME_CURVE"/>
</volumeGroup>
</volumeGroups>

Loading…
Cancel
Save