Loading services/audiopolicy/engineconfigurable/config/example/automotive/audio_policy_engine_volumes.xml +32 −0 Original line number Diff line number Diff line Loading @@ -193,20 +193,52 @@ <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> Loading services/audiopolicy/engineconfigurable/config/example/caremu/audio_policy_engine_volumes.xml +32 −0 Original line number Diff line number Diff line Loading @@ -193,20 +193,52 @@ <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> Loading services/audiopolicy/engineconfigurable/config/example/common/audio_policy_engine_criterion_types.xml.in +6 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,12 @@ <value literal="0" numerical="1"/> </values> </criterion_type> <criterion_type name="InputDevicesAddressesType" type="inclusive"/> <criterion_type name="InputDevicesAddressesType" type="inclusive"> <values> <!-- legacy remote submix --> <value literal="0" numerical="1"/> </values> </criterion_type> <criterion_type name="AndroidModeType" type="exclusive"/> <criterion_type name="BooleanType" type="exclusive"> <values> Loading services/audiopolicy/engineconfigurable/src/InputSource.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier) return BAD_VALUE; } mIdentifier = identifier; ALOGD("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier); ALOGV("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier); return NO_ERROR; } Loading @@ -46,15 +46,18 @@ status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier) template <> status_t Element<audio_source_t>::set(audio_devices_t devices) { if (devices != AUDIO_DEVICE_NONE) { devices |= AUDIO_DEVICE_BIT_IN; if (devices == AUDIO_DEVICE_NONE) { // Reset mApplicableDevices = devices; return NO_ERROR; } devices |= AUDIO_DEVICE_BIT_IN; if (!audio_is_input_device(devices)) { ALOGE("%s: trying to set an invalid device 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); return BAD_VALUE; } ALOGD("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); ALOGV("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); mApplicableDevices = devices; return NO_ERROR; } Loading services/audiopolicy/engineconfigurable/src/InputSource.h +5 −4 Original line number Diff line number Diff line Loading @@ -73,10 +73,11 @@ private: Element(const Element &object); Element &operator=(const Element &object); std::string mName; /**< Unique literal Identifier of a policy base element*/ audio_source_t mIdentifier; /**< Unique numerical Identifier of a policy base element*/ audio_devices_t mApplicableDevices; /**< Applicable input device for this input source. */ const std::string mName; /**< Unique literal Identifier of a policy base element*/ /** Unique numerical Identifier of a policy base element */ audio_source_t mIdentifier = AUDIO_SOURCE_DEFAULT; /** Applicable input device for this input source. */ audio_devices_t mApplicableDevices = AUDIO_DEVICE_NONE; }; typedef Element<audio_source_t> InputSource; Loading Loading
services/audiopolicy/engineconfigurable/config/example/automotive/audio_policy_engine_volumes.xml +32 −0 Original line number Diff line number Diff line Loading @@ -193,20 +193,52 @@ <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> Loading
services/audiopolicy/engineconfigurable/config/example/caremu/audio_policy_engine_volumes.xml +32 −0 Original line number Diff line number Diff line Loading @@ -193,20 +193,52 @@ <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> Loading
services/audiopolicy/engineconfigurable/config/example/common/audio_policy_engine_criterion_types.xml.in +6 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,12 @@ <value literal="0" numerical="1"/> </values> </criterion_type> <criterion_type name="InputDevicesAddressesType" type="inclusive"/> <criterion_type name="InputDevicesAddressesType" type="inclusive"> <values> <!-- legacy remote submix --> <value literal="0" numerical="1"/> </values> </criterion_type> <criterion_type name="AndroidModeType" type="exclusive"/> <criterion_type name="BooleanType" type="exclusive"> <values> Loading
services/audiopolicy/engineconfigurable/src/InputSource.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier) return BAD_VALUE; } mIdentifier = identifier; ALOGD("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier); ALOGV("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier); return NO_ERROR; } Loading @@ -46,15 +46,18 @@ status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier) template <> status_t Element<audio_source_t>::set(audio_devices_t devices) { if (devices != AUDIO_DEVICE_NONE) { devices |= AUDIO_DEVICE_BIT_IN; if (devices == AUDIO_DEVICE_NONE) { // Reset mApplicableDevices = devices; return NO_ERROR; } devices |= AUDIO_DEVICE_BIT_IN; if (!audio_is_input_device(devices)) { ALOGE("%s: trying to set an invalid device 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); return BAD_VALUE; } ALOGD("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); ALOGV("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); mApplicableDevices = devices; return NO_ERROR; } Loading
services/audiopolicy/engineconfigurable/src/InputSource.h +5 −4 Original line number Diff line number Diff line Loading @@ -73,10 +73,11 @@ private: Element(const Element &object); Element &operator=(const Element &object); std::string mName; /**< Unique literal Identifier of a policy base element*/ audio_source_t mIdentifier; /**< Unique numerical Identifier of a policy base element*/ audio_devices_t mApplicableDevices; /**< Applicable input device for this input source. */ const std::string mName; /**< Unique literal Identifier of a policy base element*/ /** Unique numerical Identifier of a policy base element */ audio_source_t mIdentifier = AUDIO_SOURCE_DEFAULT; /** Applicable input device for this input source. */ audio_devices_t mApplicableDevices = AUDIO_DEVICE_NONE; }; typedef Element<audio_source_t> InputSource; Loading