hdmi_infoframe_api.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (C) 2012 Avionic Design GmbH
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sub license,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice (including the
  12. * next paragraph) shall be included in all copies or substantial portions
  13. * of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
  18. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. * DEALINGS IN THE SOFTWARE.
  22. */
  23. #ifndef __LINUX_HDMI_H_
  24. #define __LINUX_HDMI_H_
  25. #ifdef __KERNEL__
  26. #include <linux/types.h>
  27. #include <linux/device.h>
  28. #include "drv_hdmi_external.h"
  29. #else
  30. #include <stdint.h>
  31. #include <stddef.h>
  32. #include <linux/types.h>
  33. #include <sys/types.h>
  34. #include <errno.h>
  35. #include <stdbool.h>
  36. #define u8 unsigned char
  37. struct device
  38. {
  39. };
  40. #endif
  41. int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
  42. ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
  43. size_t size);
  44. int hdmi_spd_infoframe_init(struct hdmi_spd_infoframe *frame,
  45. const char *vendor, const char *product, const char *sdi);
  46. ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, void *buffer,
  47. size_t size);
  48. int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame);
  49. ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame,
  50. void *buffer, size_t size);
  51. int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);
  52. ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
  53. void *buffer, size_t size);
  54. ssize_t
  55. hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size);
  56. int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void *buffer);
  57. void hdmi_infoframe_log(const char *level, struct device *dev,
  58. union hdmi_infoframe *frame);
  59. #endif /* _DRM_HDMI_H */