config.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* SPDX-License-Identifier: LGPL-2.1 OR BSD-3-Clause */
  2. /*
  3. * Copyright (c) 2019, Chips&Media
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright notice,
  12. * this list of conditions and the following disclaimer in the documentation
  13. * and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  16. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  17. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  19. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  21. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  22. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  24. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #ifndef __CONFIG_H__
  27. #define __CONFIG_H__
  28. #if defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN32) || defined(__MINGW32__)
  29. # define PLATFORM_WIN32
  30. #elif defined(linux) || defined(__linux) || defined(ANDROID)
  31. # define PLATFORM_LINUX
  32. #elif defined(unix) || defined(__unix)
  33. # define PLATFORM_QNX
  34. #else
  35. # define PLATFORM_NON_OS
  36. #endif
  37. #if defined(_MSC_VER)
  38. # include <windows.h>
  39. # define inline _inline
  40. #elif defined(__GNUC__)
  41. #elif defined(__ARMCC__)
  42. #else
  43. # error "Unknown compiler."
  44. #endif
  45. #define API_VERSION_MAJOR 5
  46. #define API_VERSION_MINOR 5
  47. #define API_VERSION_PATCH 60
  48. #define API_VERSION ((API_VERSION_MAJOR<<16) | (API_VERSION_MINOR<<8) | API_VERSION_PATCH)
  49. #if defined(PLATFORM_NON_OS) || defined (ANDROID) || defined(MFHMFT_EXPORTS) || defined(PLATFORM_QNX) || defined(CNM_SIM_PLATFORM)
  50. //#define SUPPORT_FFMPEG_DEMUX
  51. #else
  52. //#define SUPPORT_FFMPEG_DEMUX
  53. #endif
  54. //------------------------------------------------------------------------------
  55. // COMMON
  56. //------------------------------------------------------------------------------
  57. //#if defined(linux) || defined(__linux) || defined(ANDROID) || defined(CNM_FPGA_HAPS_INTERFACE)
  58. #define SUPPORT_MULTI_INST_INTR
  59. //#endif
  60. #ifndef PTHREAD_MUTEX_ROBUST_NP
  61. #define PTHREAD_MUTEX_ROBUST_NP 1
  62. #endif
  63. // do not define BIT_CODE_FILE_PATH in case of multiple product support. because wave410 and coda980 has different firmware binary format.
  64. #define CORE_0_BIT_CODE_FILE_PATH "coda960.out" // for coda960
  65. #define CORE_1_BIT_CODE_FILE_PATH "coda980.out" // for coda980
  66. #define CORE_2_BIT_CODE_FILE_PATH "picasso.bin" // for wave510
  67. #define CORE_4_BIT_CODE_FILE_PATH "millet.bin" // for wave520
  68. #define CORE_5_BIT_CODE_FILE_PATH "kepler.bin" // for wave515
  69. #define CORE_6_BIT_CODE_FILE_PATH "chagall.bin" // for wave521
  70. #define CORE_7_BIT_CODE_FILE_PATH "vincent.bin" // for wave517
  71. //------------------------------------------------------------------------------
  72. // OMX
  73. //------------------------------------------------------------------------------
  74. //------------------------------------------------------------------------------
  75. // WAVE521C
  76. //------------------------------------------------------------------------------
  77. //#define SUPPORT_LOOK_AHEAD_RC
  78. //------------------------------------------------------------------------------
  79. // WAVE511
  80. //------------------------------------------------------------------------------
  81. //------------------------------------------------------------------------------
  82. // WAVE517
  83. //------------------------------------------------------------------------------
  84. //#define SUPPORT_SW_UART
  85. //#define SUPPORT_SW_UART_V2 // WAVE511 or WAVE521C
  86. #endif /* __CONFIG_H__ */