HDMI接口协议java,HdmiConfig.java

该Java程序定义了一个名为`HdmiConfig`的类,用于存储可能需要按产品配置的HDMI常量。主要常量包括命令响应超时时间、发起者重复时间、设备发现和地址分配阶段的重试次数、以及是否隐藏连接到旧式HDMI切换器的设备等。这些配置影响了设备之间的CEC通信和交互。
摘要由CSDN通过智能技术生成

/*

* Copyright (C) 2014 The Android Open Source Project

*

* Licensed under the Apache License, Version 2.0 (the "License");

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

* http://www.apache.org/licenses/LICENSE-2.0

*

* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

* See the License for the specific language governing permissions and

* limitations under the License.

*/

package com.android.server.hdmi;

/**

* Class that holds together the constants that may require per-product configuration.

*/

final class HdmiConfig {

// Default timeout for the incoming command to arrive in response to a request.

static final int TIMEOUT_MS = 2000;

// IRT(Initiator Repetition Time) in millisecond as recommended in the standard.

// Outgoing UCP commands, when in 'Press and Hold' mode, should be this much apart

// from the adjacent one so as not to place unnecessarily heavy load on the CEC line.

static final int IRT_MS = 300;

// Number of retries for polling each device in device discovery phase after TV powers on

// or HDMI control is enabled.

static final int DEVICE_POLLING_RETRY = 1;

// Number of retries for polling each device in periodic check (hotplug detection).

static final int HOTPLUG_DETECTION_RETRY = 1;

// Number of retries for polling each device in address allocation mechanism.

static final int ADDRESS_ALLOCATION_RETRY = 3;

// Number of retries for sendCommand in actions related to new device discovery.

// Number 5 comes from 10 seconds for Chromecast preparation time.

static final int TIMEOUT_RETRY = 5;

// CEC spec said that it should try retransmission at least once.

// The actual number of send request for a single command will be at most

// RETRANSMISSION_COUNT + 1. Note that it affects only to normal commands

// and polling message for logical address allocation and device discovery

// action. They will have their own retransmission count.

static final int RETRANSMISSION_COUNT = 1;

// Do not export the CEC devices connected to a legacy HDMI switch. The usage of legacy

// (non-CEC) switches is deprecated. They stop the correct operation of many mandatory

// CEC features. If set to true, do not pass the list of CEC devices behind the legacy

// switch since they won't be under control from TV.

static final boolean HIDE_DEVICES_BEHIND_LEGACY_SWITCH = true;

private HdmiConfig() { /* cannot be instantiated */ }

}

Java程序

|

61行

|

2.66 KB

/*

* Copyright (C) 2014 The Android Open Source Project

*

* Licensed under the Apache License, Version 2.0 (the "License");

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

* http://www.apache.org/licenses/LICENSE-2.0

*

* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

* See the License for the specific language governing permissions and

* limitations under the License.

*/

package com.android.server.hdmi;

/**

* Class that holds together the constants that may require per-product configuration.

*/

final class HdmiConfig {

// Default timeout for the incoming command to arrive in response to a request.

static final int TIMEOUT_MS = 2000;

// IRT(Initiator Repetition Time) in millisecond as recommended in the standard.

// Outgoing UCP commands, when in 'Press and Hold' mode, should be this much apart

// from the adjacent one so as not to place unnecessarily heavy load on the CEC line.

static final int IRT_MS = 300;

// Number of retries for polling each device in device discovery phase after TV powers on

// or HDMI control is enabled.

static final int DEVICE_POLLING_RETRY = 1;

// Number of retries for polling each device in periodic check (hotplug detection).

static final int HOTPLUG_DETECTION_RETRY = 1;

// Number of retries for polling each device in address allocation mechanism.

static final int ADDRESS_ALLOCATION_RETRY = 3;

// Number of retries for sendCommand in actions related to new device discovery.

// Number 5 comes from 10 seconds for Chromecast preparation time.

static final int TIMEOUT_RETRY = 5;

// CEC spec said that it should try retransmission at least once.

// The actual number of send request for a single command will be at most

// RETRANSMISSION_COUNT + 1. Note that it affects only to normal commands

// and polling message for logical address allocation and device discovery

// action. They will have their own retransmission count.

static final int RETRANSMISSION_COUNT = 1;

// Do not export the CEC devices connected to a legacy HDMI switch. The usage of legacy

// (non-CEC) switches is deprecated. They stop the correct operation of many mandatory

// CEC features. If set to true, do not pass the list of CEC devices behind the legacy

// switch since they won't be under control from TV.

static final boolean HIDE_DEVICES_BEHIND_LEGACY_SWITCH = true;

private HdmiConfig() { /* cannot be instantiated */ }

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值