Loading services/audiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -58,15 +58,6 @@ DeviceDescriptor::DeviceDescriptor(const AudioDeviceTypeAddr &deviceTypeAddr, mDeclaredAddress(DeviceDescriptorBase::address()) { mCurrentEncodedFormat = AUDIO_FORMAT_DEFAULT; /* If framework runs against a pre 5.0 Audio HAL, encoded formats are absent from the config. * FIXME: APM should know the version of the HAL and don't add the formats for V5.0. * For now, the workaround to remove AC3 and IEC61937 support on HDMI is to declare * something like 'encodedFormats="AUDIO_FORMAT_PCM_16_BIT"' on the HDMI devicePort. */ if (mDeviceTypeAddr.mType == AUDIO_DEVICE_OUT_HDMI && mEncodedFormats.empty()) { mEncodedFormats.push_back(AUDIO_FORMAT_AC3); mEncodedFormats.push_back(AUDIO_FORMAT_IEC61937); } } void DeviceDescriptor::attach(const sp<HwModule>& module) Loading services/audiopolicy/tests/audiopolicymanager_tests.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1153,7 +1153,8 @@ TEST_P(AudioPolicyManagerTestDeviceConnection, SetDeviceConnectionState) { if (type == AUDIO_DEVICE_OUT_HDMI) { // Set device connection state failed due to no device descriptor found // For HDMI case, it is easier to simulate device descriptor not found error // by using a undeclared encoded format. // by using an encoded format which isn't listed in the 'encodedFormats' // attribute for this devicePort. ASSERT_EQ(INVALID_OPERATION, mManager->setDeviceConnectionState( type, AUDIO_POLICY_DEVICE_STATE_AVAILABLE, address.c_str(), name.c_str(), AUDIO_FORMAT_MAT_2_1)); Loading services/audiopolicy/tests/resources/test_audio_policy_configuration.xml +2 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ </devicePort> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> </devicePort> <devicePort tagName="Hdmi" type="AUDIO_DEVICE_OUT_HDMI" role="sink"> <devicePort tagName="Hdmi" type="AUDIO_DEVICE_OUT_HDMI" role="sink" encodedFormats="AUDIO_FORMAT_AC3"> </devicePort> <devicePort tagName="Hdmi-In Mic" type="AUDIO_DEVICE_IN_HDMI" role="source"> </devicePort> Loading Loading
services/audiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -58,15 +58,6 @@ DeviceDescriptor::DeviceDescriptor(const AudioDeviceTypeAddr &deviceTypeAddr, mDeclaredAddress(DeviceDescriptorBase::address()) { mCurrentEncodedFormat = AUDIO_FORMAT_DEFAULT; /* If framework runs against a pre 5.0 Audio HAL, encoded formats are absent from the config. * FIXME: APM should know the version of the HAL and don't add the formats for V5.0. * For now, the workaround to remove AC3 and IEC61937 support on HDMI is to declare * something like 'encodedFormats="AUDIO_FORMAT_PCM_16_BIT"' on the HDMI devicePort. */ if (mDeviceTypeAddr.mType == AUDIO_DEVICE_OUT_HDMI && mEncodedFormats.empty()) { mEncodedFormats.push_back(AUDIO_FORMAT_AC3); mEncodedFormats.push_back(AUDIO_FORMAT_IEC61937); } } void DeviceDescriptor::attach(const sp<HwModule>& module) Loading
services/audiopolicy/tests/audiopolicymanager_tests.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1153,7 +1153,8 @@ TEST_P(AudioPolicyManagerTestDeviceConnection, SetDeviceConnectionState) { if (type == AUDIO_DEVICE_OUT_HDMI) { // Set device connection state failed due to no device descriptor found // For HDMI case, it is easier to simulate device descriptor not found error // by using a undeclared encoded format. // by using an encoded format which isn't listed in the 'encodedFormats' // attribute for this devicePort. ASSERT_EQ(INVALID_OPERATION, mManager->setDeviceConnectionState( type, AUDIO_POLICY_DEVICE_STATE_AVAILABLE, address.c_str(), name.c_str(), AUDIO_FORMAT_MAT_2_1)); Loading
services/audiopolicy/tests/resources/test_audio_policy_configuration.xml +2 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ </devicePort> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> </devicePort> <devicePort tagName="Hdmi" type="AUDIO_DEVICE_OUT_HDMI" role="sink"> <devicePort tagName="Hdmi" type="AUDIO_DEVICE_OUT_HDMI" role="sink" encodedFormats="AUDIO_FORMAT_AC3"> </devicePort> <devicePort tagName="Hdmi-In Mic" type="AUDIO_DEVICE_IN_HDMI" role="source"> </devicePort> Loading