/exynos4/hal/libhdmi/libhdmiservice/ISecTVOut.cpp

https://bitbucket.org/cyanogenmod/android_hardware_samsung · C++ · 111 lines · 77 code · 12 blank · 22 comment · 0 complexity · 9ce067fd41e882c43b47462d29e59511 MD5 · raw file

  1. /*
  2. **
  3. ** Copyright 2008, The Android Open Source Project
  4. ** Copyright 2010, Samsung Electronics Co. LTD
  5. **
  6. ** Licensed under the Apache License, Version 2.0 (the "License");
  7. ** you may not use this file except in compliance with the License.
  8. ** You may obtain a copy of the License at
  9. **
  10. ** http://www.apache.org/licenses/LICENSE-2.0
  11. **
  12. ** Unless required by applicable law or agreed to in writing, software
  13. ** distributed under the License is distributed on an "AS IS" BASIS,
  14. ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. ** See the License for the specific language governing permissions and
  16. ** limitations under the License.
  17. */
  18. /*
  19. **
  20. ** @author Taikyung, Yu(taikyung.yu@samsung.com)
  21. ** @date 2011-07-06
  22. */
  23. #include <stdint.h>
  24. #include <sys/types.h>
  25. #include <binder/Parcel.h>
  26. #include <utils/Log.h>
  27. #include "ISecTVOut.h"
  28. namespace android {
  29. enum {
  30. SET_HDMI_STATUS = IBinder::FIRST_CALL_TRANSACTION,
  31. SET_HDMI_MODE,
  32. SET_HDMI_RESOLUTION,
  33. SET_HDMI_HDCP,
  34. SET_HDMI_ROTATE,
  35. SET_HDMI_HWCLAYER,
  36. BLIT_2_HDMI
  37. };
  38. void BpSecTVOut::setHdmiCableStatus(uint32_t status)
  39. {
  40. Parcel data, reply;
  41. data.writeInt32(status);
  42. remote()->transact(SET_HDMI_STATUS, data, &reply);
  43. }
  44. void BpSecTVOut::setHdmiMode(uint32_t mode)
  45. {
  46. Parcel data, reply;
  47. data.writeInt32(mode);
  48. remote()->transact(SET_HDMI_MODE, data, &reply);
  49. }
  50. void BpSecTVOut::setHdmiResolution(uint32_t resolution)
  51. {
  52. Parcel data, reply;
  53. data.writeInt32(resolution);
  54. remote()->transact(SET_HDMI_RESOLUTION, data, &reply);
  55. }
  56. void BpSecTVOut::setHdmiHdcp(uint32_t resolution)
  57. {
  58. Parcel data, reply;
  59. data.writeInt32(resolution);
  60. remote()->transact(SET_HDMI_HDCP, data, &reply);
  61. }
  62. void BpSecTVOut::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer)
  63. {
  64. Parcel data, reply;
  65. data.writeInt32(rotVal);
  66. data.writeInt32(hwcLayer);
  67. remote()->transact(SET_HDMI_ROTATE, data, &reply);
  68. }
  69. void BpSecTVOut::setHdmiHwcLayer(uint32_t hwcLayer)
  70. {
  71. Parcel data, reply;
  72. data.writeInt32(hwcLayer);
  73. remote()->transact(SET_HDMI_HWCLAYER, data, &reply);
  74. }
  75. void BpSecTVOut::blit2Hdmi(uint32_t w, uint32_t h,
  76. uint32_t colorFormat,
  77. uint32_t physYAddr,
  78. uint32_t physCbAddr,
  79. uint32_t physCrAddr,
  80. uint32_t dstX,
  81. uint32_t dstY,
  82. uint32_t hdmiLayer,
  83. uint32_t num_of_hwc_layer)
  84. {
  85. Parcel data, reply;
  86. data.writeInt32(w);
  87. data.writeInt32(h);
  88. data.writeInt32(colorFormat);
  89. data.writeInt32(physYAddr);
  90. data.writeInt32(physCbAddr);
  91. data.writeInt32(physCrAddr);
  92. data.writeInt32(dstX);
  93. data.writeInt32(dstY);
  94. data.writeInt32(hdmiLayer);
  95. data.writeInt32(num_of_hwc_layer);
  96. remote()->transact(BLIT_2_HDMI, data, &reply);
  97. }
  98. IMPLEMENT_META_INTERFACE(SecTVOut, "android.os.ISecTVOut");
  99. };