Merge "CEC : Use system property to get the audio device name" am: c3808b00b6 am: ce6a7ddc0f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404647 Change-Id: Ifa4959b2f39e6916b478b02cecf0502a1bd1436c
This commit is contained in:
@@ -708,17 +708,17 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
|
||||
private byte[] getSupportedShortAudioDescriptorsFromConfig(
|
||||
List<DeviceConfig> deviceConfig, @AudioCodec int[] audioFormatCodes) {
|
||||
DeviceConfig deviceConfigToUse = null;
|
||||
String audioDeviceName = SystemProperties.get(
|
||||
Constants.PROPERTY_SYSTEM_AUDIO_MODE_AUDIO_PORT,
|
||||
"VX_AUDIO_DEVICE_IN_HDMI_ARC");
|
||||
for (DeviceConfig device : deviceConfig) {
|
||||
// TODO(amyjojo) use PROPERTY_SYSTEM_AUDIO_MODE_AUDIO_PORT to get the audio device name
|
||||
if (device.name.equals("VX_AUDIO_DEVICE_IN_HDMI_ARC")) {
|
||||
if (device.name.equals(audioDeviceName)) {
|
||||
deviceConfigToUse = device;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (deviceConfigToUse == null) {
|
||||
// TODO(amyjojo) use PROPERTY_SYSTEM_AUDIO_MODE_AUDIO_PORT to get the audio device name
|
||||
Slog.w(TAG, "sadConfig.xml does not have required device info for "
|
||||
+ "VX_AUDIO_DEVICE_IN_HDMI_ARC");
|
||||
Slog.w(TAG, "sadConfig.xml does not have required device info for " + audioDeviceName);
|
||||
return new byte[0];
|
||||
}
|
||||
HashMap<Integer, byte[]> map = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user