samp_apm.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:11k
源码类别:

DVD

开发平台:

Others

  1. /*******************************************************************************
  2. * Copyright(c) Philips Consumer Electronics B.V. 2001
  3. * The attached material and the information contained therein is proprietary
  4. * to Philips and is issued only under strict confidentiality arrangements.
  5. * It shall not be used, reproduced, copied in whole or in part, adapted,
  6. * modified, or disseminated without a written license of Philips.           
  7. * It must be returned to Philips upon its first request.
  8. *
  9. *  Project:        SA-MP ( Super Audio Media Player )
  10. *  File %name:     samp_apm.h %
  11. *  %version:       16 %
  12. *  %date_modified: Wed Oct 30 12:16:25 2002 %
  13. *  %derived_by:    potm %
  14. *  Creation date:  Fri Jun 15 09:42:43 2001
  15. *  First author:   klerxm
  16. *
  17. *  Advanced Systems and Applications Lab - Eindhoven
  18. *
  19. *  Continuus %full_filespec: samp_apm.h~16:incl:1 %
  20. *
  21. *  Description:    Exported header file of the Audio Presentation Manager
  22. *
  23. * Change history:
  24. *
  25. * Rev  Date       Who      Comments
  26. * ---- ---------- -------- -----------------------------------------------------
  27. *   1  2001-06-07 klerxm   Initial version
  28. *   2  2001-06-15 klerxm   Template update
  29. *   3  2001-08-30 potm     First real version
  30. *   4  2001-08-30 potm     Added function descriptions
  31. *   5  2001-08-30 potm     - Moved definition of max delays to apm_local.h
  32. *                          - Changed some comments
  33. *   6  2001-09-24 potm     Added #ifdef for C++
  34. *   7  2001-10-09 potm     Added input configuration 2/0
  35. *   8  2001-10-23 potm     - Added lfe parameter to APM_SetInputChannels
  36. *                          - Added APM_OUT_BPS to APM_OutputModeDef
  37. *   9  2001-11-13 potm     Added APM_SetBassFilters and related typedefs
  38. *  10  2002-01-04 potm     Added APM_SetPIO
  39. *  11  2002-02-12 potm     Attenuation now set for all channels at once (PR297)
  40. *  12  2002-02-13 novosadt APM_InputModeDef replaced by SACD_InputModeDef (CR321)
  41. *  13  2002-02-21 potm     - Made spelling of CENTER consistent (replaced CENTRE)
  42. *                          - Moved APM_SetInputChannels to apm.h
  43. *                          - Removed APM_InputChannelDef (CR260)
  44. *  14  2002-06-07 klerxm   Added 'extern "C"'
  45. *  15  2002-10-30 potm     Added LSS0_noLFE speaker configuration (CR412)
  46. *  16  2003-02-18 potm     Added APM_OUT_SYNC to APM_OutputModeDef (CR405)
  47. *
  48. *******************************************************************************/
  49. #ifndef _SAMP_APM_H
  50. #define _SAMP_APM_H
  51. /*******************************************************************************
  52. *                                Include Files
  53. *******************************************************************************/
  54. #include "Playcoresampsamp_gen.h"
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. /*******************************************************************************
  59. *                              Macro Definitions
  60. *******************************************************************************/
  61. #define PCM_LE_RI 0x0001
  62. #define PCM_CE_LF 0x0004
  63. #define PCM_LS_RS 0x0005
  64. #define PCM_WCLK  0x0002
  65. #define PCM_DCLK  0x0003
  66. /*******************************************************************************
  67. *                              Type Definitions
  68. *******************************************************************************/
  69. typedef enum
  70. { SAMP(APM_FS_44)
  71. , SAMP(APM_FS_48)
  72. } SAMP(APM_FsDef);
  73. typedef enum
  74. { SAMP(APM_OUT_DSD)
  75. , SAMP(APM_OUT_SRC)
  76. , SAMP(APM_OUT_PCM)
  77. , SAMP(APM_OUT_BPS)
  78. , SAMP(APM_OUT_SYNC)
  79. } SAMP(APM_OutputModeDef);
  80. typedef enum
  81. { SAMP(APM_MIX_6CH_3_2)
  82. , SAMP(APM_MIX_6CH_2_2)
  83. , SAMP(APM_MIX_6CH_3_0)
  84. , SAMP(APM_MIX_6CH_2_0)
  85. } SAMP(APM_6ch_MixDef);
  86. typedef enum
  87. { SAMP(APM_MIX_2CH_DOWNMIX)
  88. , SAMP(APM_MIX_2CH_CENTER)
  89. } SAMP(APM_2ch_MixDef);
  90. typedef enum
  91. { SAMP(APM_LLL1)
  92. , SAMP(APM_SSS1)
  93. , SAMP(APM_LSS0)
  94. , SAMP(APM_LSS0_noLFE)
  95. } SAMP(APM_SpeakerDef);
  96. typedef enum
  97. { SAMP(APM_FM_MAX_SNR)
  98. , SAMP(APM_FM_MIN_TDD)
  99. , SAMP(APM_FM_INT)
  100. } SAMP(APM_FilterModeDef);
  101. typedef enum
  102. { SAMP(APM_6CH_LEFT)
  103. , SAMP(APM_6CH_RIGHT)
  104. , SAMP(APM_6CH_CENTER)
  105. , SAMP(APM_6CH_LFE)
  106. , SAMP(APM_6CH_LEFT_SURROUND)
  107. , SAMP(APM_6CH_RIGHT_SURROUND)
  108. , SAMP(APM_2CH_LEFT)
  109. , SAMP(APM_2CH_RIGHT)
  110. } SAMP(APM_ChannelDef);
  111. typedef enum
  112. { SAMP(APM_BASS_FREQ_120)
  113. , SAMP(APM_BASS_FREQ_100)
  114. , SAMP(APM_BASS_FREQ_80)
  115. , SAMP(APM_BASS_FREQ_60)
  116. } SAMP(APM_BassFrequencyDef);
  117. typedef enum
  118. { SAMP(APM_BASS_SLOPE_24)
  119. , SAMP(APM_BASS_SLOPE_18)
  120. , SAMP(APM_BASS_SLOPE_12)
  121. } SAMP(APM_BassSlopeDef);
  122. /*******************************************************************************
  123. *                            Functions Prototypes
  124. *******************************************************************************/
  125. /*******************************************************************************
  126. * Name       : APM_SetInputMode
  127. * Input      : InputStream        Input stream type and frequency
  128. * Output     : -
  129. * Returns    : ERR_OK             Operation successful
  130. *              ERR_UNKNOWN        Invalid input type
  131. * Description: Sets the stream type and frequency
  132. * Remarks    : -
  133. *******************************************************************************/
  134. SAMP(ErrCode) SAMP(APM_SetInputMode)(SAMP(SACD_InputModeDef) InputStream);
  135. /*******************************************************************************
  136. * Name       : APM_SetOutputMode
  137. * Input      : out_mode_6ch       6-channel output mode
  138. *              out_mode_2ch       2-channel output mode
  139. * Output     : -
  140. * Returns    : ERR_OK
  141. * Description: Sets the 6-channel and 2-channel output modes (DSD or PCM)
  142. * Remarks    : -
  143. *******************************************************************************/
  144. SAMP(ErrCode) SAMP(APM_SetOutputMode)(SAMP(APM_OutputModeDef) out_mode_6ch, SAMP(APM_OutputModeDef) out_mode_2ch);
  145. /*******************************************************************************
  146. * Name       : APM_Set6chDownmix
  147. * Input      : Downmix        6-channel downmix
  148. * Output     : -
  149. * Returns    : ERR_OK
  150. * Description: Sets the 6-channel downmix (3/2, 2/2, 3/0, 2/0)
  151. * Remarks    : -
  152. *******************************************************************************/
  153. SAMP(ErrCode) SAMP(APM_Set6chDownmix)(SAMP(APM_6ch_MixDef) Downmix);
  154. /*******************************************************************************
  155. * Name       : APM_Set2chDownmix
  156. * Input      : Downmix        2-channel downmix
  157. * Output     : -
  158. * Returns    : ERR_OK
  159. * Description: Sets the 2-channel downmix (stereo downmix or center on stereo)
  160. * Remarks    : -
  161. *******************************************************************************/
  162. SAMP(ErrCode) SAMP(APM_Set2chDownmix)(SAMP(APM_2ch_MixDef) Downmix);
  163. /*******************************************************************************
  164. * Name       : APM_SetSpeakers
  165. * Input      : Speakers         Speaker configuration
  166. * Output     : -
  167. * Returns    : ERR_OK
  168. * Description: Sets the speaker configuration (LLL1, SSS1, LSS0)
  169. * Remarks    : -
  170. *******************************************************************************/
  171. SAMP(ErrCode) SAMP(APM_SetSpeakers)(SAMP(APM_SpeakerDef) Speakers);
  172. /*******************************************************************************
  173. * Name       : APM_SetAttenuation
  174. * Input      : Attenuation        Attenuation for channels in tenths of dBs
  175. * Output     : -
  176. * Returns    : ERR_OK             Operation successful
  177. *              ERR_INVALID_PARAM  Attenuation to large
  178. * Description: Sets the attenuation for all channels (0..900)
  179. *                channel 0 = Left front
  180. *                channel 1 = Right front
  181. *                channel 2 = Center
  182. *                channel 3 = Lfe
  183. *                channel 4 = Left surround
  184. *                channel 5 = Right surround
  185. *                channel 6 = Left (2ch output)
  186. *                channel 7 = Right (2ch output)
  187. * Remarks    : -
  188. *******************************************************************************/
  189. SAMP(ErrCode) SAMP(APM_SetAttenuation)(SAMP(UInt16) Attenuation[8]);
  190. /*******************************************************************************
  191. * Name       : APM_SetDelay
  192. * Input      : Delay[6]             Delay times in microseconds
  193. * Output     : -
  194. * Returns    : ERR_OK               Operation successful
  195. *              ERR_INVALID_PARAM    Total delay too large
  196. * Description: Sets the delay for the 6 multichannel outputs.
  197. * Remarks    : The maximal total delay is 69000usec @ 44Fs and 64000usec @ 48Fs 
  198. *******************************************************************************/
  199. SAMP(ErrCode) SAMP(APM_SetDelay)(SAMP(UInt32) Delay[6]);
  200. /*******************************************************************************
  201. * Name       : APM_SetFilterMode
  202. * Input      : FilterMode         Selected filter mode
  203. * Output     : -
  204. * Returns    : ERR_OK             Operation successful
  205. *              ERR_UNKNOWN        Invalid input type
  206. * Description: Sets the filter mode (MAX_SNR, MIN_TDD, INT)
  207. * Remarks    : -
  208. *******************************************************************************/
  209. SAMP(ErrCode) SAMP(APM_SetFilterMode)(SAMP(APM_FilterModeDef) FilterMode);
  210. /*******************************************************************************
  211. * Name       : APM_SetPcmUpsampling
  212. * Input      : Upsampling         The upsampling factor to be used
  213. * Output     : -
  214. * Returns    : ERR_OK             Operation successful
  215. *              ERR_INVALID_PARAM  Invalid upsampling factor specified
  216. * Description: Sets the upsampling factor for PCM output (2 or 4)
  217. * Remarks    : -
  218. *******************************************************************************/
  219. SAMP(ErrCode) SAMP(APM_SetPcmUpsampling)(SAMP(UInt8) Upsampling);
  220. /*******************************************************************************
  221. * Name       : APM_SetBassFilters
  222. * Input      : BassFrequency      Bass frequency 
  223. *              BassSlope          Bass slope
  224. * Output     : -
  225. * Returns    : ERR_OK             Operation successful
  226. *              ERR_UNKNOWN        Unexpected internal error
  227. * Description: Sets DSD bass filters
  228. * Remarks    : -
  229. *******************************************************************************/
  230. SAMP(ErrCode) SAMP(APM_SetBassFilters)(SAMP(APM_BassFrequencyDef) BassFrequency, SAMP(APM_BassSlopeDef) BassSlope);
  231. /*******************************************************************************
  232. * Name       : APM_SetPIO
  233. * Input      : pio_bits           PIO pin settings
  234. * Output     : -
  235. * Returns    : ERR_OK             Operation successful
  236. *              ERR_UNKNOWN        Unexpected internal error
  237. * Description: The lower 12 bits of pio_bits indicate for each output pin
  238. *              whether it is set to 0 or to 1 in case it is selected to be
  239. *              a PIO pin.
  240. * Remarks    : -
  241. *******************************************************************************/
  242. SAMP(ErrCode) SAMP(APM_SetPIO)(SAMP(BitSet16) pio_bits);
  243. #ifdef __cplusplus
  244. }
  245. #endif
  246. #endif /* _SAMP_APM_H */
  247. /*******************************************************************************
  248. *                                End of File
  249. *******************************************************************************/