diff options
author | Jungshik Jang <jayjang@google.com> | 2014-05-15 14:29:01 +0900 |
---|---|---|
committer | Jungshik Jang <jayjang@google.com> | 2014-05-15 20:21:43 +0900 |
commit | be9cd8eb3fe64a572f9c7dfc41f04defd46a752d (patch) | |
tree | e0ed6a91c036f9da95265c4490648a0a7a46882a /services | |
parent | fc2cf830b040fe2e1ab54d7ca2921b3e7bd32220 (diff) | |
download | frameworks_base-be9cd8eb3fe64a572f9c7dfc41f04defd46a752d.zip frameworks_base-be9cd8eb3fe64a572f9c7dfc41f04defd46a752d.tar.gz frameworks_base-be9cd8eb3fe64a572f9c7dfc41f04defd46a752d.tar.bz2 |
Add ARC commands
ARC, Audio Return Channel is newly introduced in HDMI CEC 1.4.
Here is a list of new command
<Initiate ARC>
<Report ARC Initiated>
<Report ARC Terminated>
<Request ARC Initiation>
<Request ARC Termination>
<Terminate ARC>
Along with it replaced <Get OSD Name> with <Give OSD Name>
which is renamed in CEC 1.4.
Change-Id: If4a7aedef839c8413a8e3b5f66f3df0c7234104b
Diffstat (limited to 'services')
4 files changed, 11 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java index fc6183c..6d2b83b 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java @@ -58,14 +58,14 @@ public class HdmiCecMessageBuilder { } /** - * Build <Get Osd Name> command. + * Build <Give Osd Name> command. * * @param src source address of command * @param dest destination address of command * @return newly created {@link HdmiCecMessage} */ - static HdmiCecMessage buildGetOsdNameCommand(int src, int dest) { - return buildCommand(src, dest, HdmiCec.MESSAGE_GET_OSD_NAME); + static HdmiCecMessage buildGiveOsdNameCommand(int src, int dest) { + return buildCommand(src, dest, HdmiCec.MESSAGE_GIVE_OSD_NAME); } /** diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java index c122645..ed48c12 100644 --- a/services/core/java/com/android/server/hdmi/HdmiControlService.java +++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java @@ -127,8 +127,8 @@ public final class HdmiControlService extends SystemService { case HdmiCec.MESSAGE_GET_MENU_LANGUAGE: handleGetMenuLanguage(message); return true; - case HdmiCec.MESSAGE_GET_OSD_NAME: - handleGetOsdName(message); + case HdmiCec.MESSAGE_GIVE_OSD_NAME: + handleGiveOsdName(message); return true; case HdmiCec.MESSAGE_GIVE_PHYSICAL_ADDRESS: handleGivePhysicalAddress(message); @@ -170,7 +170,7 @@ public final class HdmiControlService extends SystemService { sendCecCommand(cecMessage); } - private void handleGetOsdName(HdmiCecMessage message) { + private void handleGiveOsdName(HdmiCecMessage message) { // TODO: read device name from settings or property. String name = HdmiCec.getDefaultDeviceName(message.getDestination()); HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildSetOsdNameCommand( diff --git a/services/core/java/com/android/server/hdmi/NewDeviceAction.java b/services/core/java/com/android/server/hdmi/NewDeviceAction.java index 98da280..e0bc718 100644 --- a/services/core/java/com/android/server/hdmi/NewDeviceAction.java +++ b/services/core/java/com/android/server/hdmi/NewDeviceAction.java @@ -71,7 +71,7 @@ final class NewDeviceAction extends FeatureAction { @Override public boolean start() { sendCommand( - HdmiCecMessageBuilder.buildGetOsdNameCommand(mSourceAddress, + HdmiCecMessageBuilder.buildGiveOsdNameCommand(mSourceAddress, mDeviceLogicalAddress)); mState = STATE_WAITING_FOR_SET_OSD_NAME; addTimer(mState, TIMEOUT_MS); diff --git a/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp b/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp index 6e03993..1d111a1 100644 --- a/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp +++ b/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp @@ -142,7 +142,7 @@ private: // Handles incoming <Request Active Source> message. If one of logical // devices is active, it should reply with <Active Source> message. void handleRequestActiveSource(); - void handleGetOsdName(const cec_message_t& msg); + void handleGiveOsdName(const cec_message_t& msg); void handleGiveDeviceVendorID(const cec_message_t& msg); void handleGetCECVersion(const cec_message_t& msg); void handleGetMenuLanguage(const cec_message_t& msg); @@ -555,8 +555,8 @@ void HdmiCecHandler::processIncomingMessage(const cec_message_t& msg) { sendReportPhysicalAddress(msg.destination); } else if (opcode == CEC_MESSAGE_REQUEST_ACTIVE_SOURCE) { handleRequestActiveSource(); - } else if (opcode == CEC_MESSAGE_GET_OSD_NAME) { - handleGetOsdName(msg); + } else if (opcode == CEC_MESSAGE_GIVE_OSD_NAME) { + handleGiveOsdName(msg); } else if (opcode == CEC_MESSAGE_GIVE_DEVICE_VENDOR_ID) { handleGiveDeviceVendorID(msg); } else if (opcode == CEC_MESSAGE_GET_CEC_VERSION) { @@ -631,7 +631,7 @@ void HdmiCecHandler::handleRequestActiveSource() { checkAndClearExceptionFromCallback(env, __FUNCTION__); } -void HdmiCecHandler::handleGetOsdName(const cec_message_t& msg) { +void HdmiCecHandler::handleGiveOsdName(const cec_message_t& msg) { if (!mOsdName.empty()) { sendSetOsdName(msg.destination, msg.initiator, mOsdName.c_str(), mOsdName.length()); } |