CEC: Allow no parameters with <System Audio Mode Request>.
automerge: 0361147
* commit '03611473bc1d13f8e55ac92e37a9716c2fd8e412':
CEC: Allow no parameters with <System Audio Mode Request>.
This commit is contained in:
@@ -79,7 +79,7 @@ public final class HdmiCecMessageValidator {
|
||||
addValidationInfo(Constants.MESSAGE_SET_STREAM_PATH,
|
||||
physicalAddressValidator, DEST_BROADCAST);
|
||||
addValidationInfo(Constants.MESSAGE_SYSTEM_AUDIO_MODE_REQUEST,
|
||||
physicalAddressValidator, DEST_DIRECT);
|
||||
new SystemAudioModeRequestValidator(), DEST_DIRECT);
|
||||
|
||||
// Messages have no parameter.
|
||||
FixedLengthValidator noneValidator = new FixedLengthValidator(0);
|
||||
@@ -303,6 +303,17 @@ public final class HdmiCecMessageValidator {
|
||||
}
|
||||
}
|
||||
|
||||
private class SystemAudioModeRequestValidator extends PhysicalAddressValidator {
|
||||
@Override
|
||||
public int isValid(byte[] params) {
|
||||
// TV can send <System Audio Mode Request> with no parameters to terminate system audio.
|
||||
if (params.length == 0) {
|
||||
return OK;
|
||||
}
|
||||
return super.isValid(params);
|
||||
}
|
||||
}
|
||||
|
||||
private class ReportPhysicalAddressValidator implements ParameterValidator {
|
||||
@Override
|
||||
public int isValid(byte[] params) {
|
||||
|
||||
Reference in New Issue
Block a user