1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.hardware.hdmi; 18 19 import android.hardware.hdmi.HdmiDeviceInfo; 20 import android.hardware.hdmi.HdmiPortInfo; 21 import android.hardware.hdmi.IHdmiCecSettingChangeListener; 22 import android.hardware.hdmi.IHdmiCecVolumeControlFeatureListener; 23 import android.hardware.hdmi.IHdmiControlCallback; 24 import android.hardware.hdmi.IHdmiControlStatusChangeListener; 25 import android.hardware.hdmi.IHdmiDeviceEventListener; 26 import android.hardware.hdmi.IHdmiHotplugEventListener; 27 import android.hardware.hdmi.IHdmiInputChangeListener; 28 import android.hardware.hdmi.IHdmiMhlVendorCommandListener; 29 import android.hardware.hdmi.IHdmiRecordListener; 30 import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener; 31 import android.hardware.hdmi.IHdmiVendorCommandListener; 32 33 import java.util.List; 34 35 /** 36 * Binder interface that clients running in the application process 37 * will use to perform HDMI-CEC features by communicating with other devices 38 * on the bus. 39 * 40 * @hide 41 */ 42 interface IHdmiControlService { getSupportedTypes()43 int[] getSupportedTypes(); getActiveSource()44 HdmiDeviceInfo getActiveSource(); oneTouchPlay(IHdmiControlCallback callback)45 void oneTouchPlay(IHdmiControlCallback callback); toggleAndFollowTvPower()46 void toggleAndFollowTvPower(); shouldHandleTvPowerKey()47 boolean shouldHandleTvPowerKey(); queryDisplayStatus(IHdmiControlCallback callback)48 void queryDisplayStatus(IHdmiControlCallback callback); addHdmiControlStatusChangeListener(IHdmiControlStatusChangeListener listener)49 void addHdmiControlStatusChangeListener(IHdmiControlStatusChangeListener listener); removeHdmiControlStatusChangeListener(IHdmiControlStatusChangeListener listener)50 void removeHdmiControlStatusChangeListener(IHdmiControlStatusChangeListener listener); addHdmiCecVolumeControlFeatureListener(IHdmiCecVolumeControlFeatureListener listener)51 void addHdmiCecVolumeControlFeatureListener(IHdmiCecVolumeControlFeatureListener listener); removeHdmiCecVolumeControlFeatureListener(IHdmiCecVolumeControlFeatureListener listener)52 void removeHdmiCecVolumeControlFeatureListener(IHdmiCecVolumeControlFeatureListener listener); addHotplugEventListener(IHdmiHotplugEventListener listener)53 void addHotplugEventListener(IHdmiHotplugEventListener listener); removeHotplugEventListener(IHdmiHotplugEventListener listener)54 void removeHotplugEventListener(IHdmiHotplugEventListener listener); addDeviceEventListener(IHdmiDeviceEventListener listener)55 void addDeviceEventListener(IHdmiDeviceEventListener listener); deviceSelect(int deviceId, IHdmiControlCallback callback)56 void deviceSelect(int deviceId, IHdmiControlCallback callback); portSelect(int portId, IHdmiControlCallback callback)57 void portSelect(int portId, IHdmiControlCallback callback); sendKeyEvent(int deviceType, int keyCode, boolean isPressed)58 void sendKeyEvent(int deviceType, int keyCode, boolean isPressed); sendVolumeKeyEvent(int deviceType, int keyCode, boolean isPressed)59 void sendVolumeKeyEvent(int deviceType, int keyCode, boolean isPressed); getPortInfo()60 List<HdmiPortInfo> getPortInfo(); canChangeSystemAudioMode()61 boolean canChangeSystemAudioMode(); getSystemAudioMode()62 boolean getSystemAudioMode(); getPhysicalAddress()63 int getPhysicalAddress(); setSystemAudioMode(boolean enabled, IHdmiControlCallback callback)64 void setSystemAudioMode(boolean enabled, IHdmiControlCallback callback); addSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener)65 void addSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener); removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener)66 void removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener); setArcMode(boolean enabled)67 void setArcMode(boolean enabled); setProhibitMode(boolean enabled)68 void setProhibitMode(boolean enabled); setSystemAudioVolume(int oldIndex, int newIndex, int maxIndex)69 void setSystemAudioVolume(int oldIndex, int newIndex, int maxIndex); setSystemAudioMute(boolean mute)70 void setSystemAudioMute(boolean mute); setInputChangeListener(IHdmiInputChangeListener listener)71 void setInputChangeListener(IHdmiInputChangeListener listener); getInputDevices()72 List<HdmiDeviceInfo> getInputDevices(); getDeviceList()73 List<HdmiDeviceInfo> getDeviceList(); powerOffRemoteDevice(int logicalAddress, int powerStatus)74 void powerOffRemoteDevice(int logicalAddress, int powerStatus); powerOnRemoteDevice(int logicalAddress, int powerStatus)75 void powerOnRemoteDevice(int logicalAddress, int powerStatus); askRemoteDeviceToBecomeActiveSource(int physicalAddress)76 void askRemoteDeviceToBecomeActiveSource(int physicalAddress); sendVendorCommand(int deviceType, int targetAddress, in byte[] params, boolean hasVendorId)77 void sendVendorCommand(int deviceType, int targetAddress, in byte[] params, 78 boolean hasVendorId); addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType)79 void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType); sendStandby(int deviceType, int deviceId)80 void sendStandby(int deviceType, int deviceId); setHdmiRecordListener(IHdmiRecordListener callback)81 void setHdmiRecordListener(IHdmiRecordListener callback); startOneTouchRecord(int recorderAddress, in byte[] recordSource)82 void startOneTouchRecord(int recorderAddress, in byte[] recordSource); stopOneTouchRecord(int recorderAddress)83 void stopOneTouchRecord(int recorderAddress); startTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource)84 void startTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource); clearTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource)85 void clearTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource); sendMhlVendorCommand(int portId, int offset, int length, in byte[] data)86 void sendMhlVendorCommand(int portId, int offset, int length, in byte[] data); addHdmiMhlVendorCommandListener(IHdmiMhlVendorCommandListener listener)87 void addHdmiMhlVendorCommandListener(IHdmiMhlVendorCommandListener listener); setStandbyMode(boolean isStandbyModeOn)88 void setStandbyMode(boolean isStandbyModeOn); reportAudioStatus(int deviceType, int volume, int maxVolume, boolean isMute)89 void reportAudioStatus(int deviceType, int volume, int maxVolume, boolean isMute); setSystemAudioModeOnForAudioOnlySource()90 void setSystemAudioModeOnForAudioOnlySource(); addCecSettingChangeListener(String name, IHdmiCecSettingChangeListener listener)91 void addCecSettingChangeListener(String name, IHdmiCecSettingChangeListener listener); removeCecSettingChangeListener(String name, IHdmiCecSettingChangeListener listener)92 void removeCecSettingChangeListener(String name, IHdmiCecSettingChangeListener listener); getUserCecSettings()93 List<String> getUserCecSettings(); getAllowedCecSettingStringValues(String name)94 List<String> getAllowedCecSettingStringValues(String name); getAllowedCecSettingIntValues(String name)95 int[] getAllowedCecSettingIntValues(String name); getCecSettingStringValue(String name)96 String getCecSettingStringValue(String name); setCecSettingStringValue(String name, String value)97 void setCecSettingStringValue(String name, String value); getCecSettingIntValue(String name)98 int getCecSettingIntValue(String name); setCecSettingIntValue(String name, int value)99 void setCecSettingIntValue(String name, int value); 100 } 101