samp_apm.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:11k
- /*******************************************************************************
- * Copyright(c) Philips Consumer Electronics B.V. 2001
- * The attached material and the information contained therein is proprietary
- * to Philips and is issued only under strict confidentiality arrangements.
- * It shall not be used, reproduced, copied in whole or in part, adapted,
- * modified, or disseminated without a written license of Philips.
- * It must be returned to Philips upon its first request.
- *
- * Project: SA-MP ( Super Audio Media Player )
- * File %name: samp_apm.h %
- * %version: 16 %
- * %date_modified: Wed Oct 30 12:16:25 2002 %
- * %derived_by: potm %
- * Creation date: Fri Jun 15 09:42:43 2001
- * First author: klerxm
- *
- * Advanced Systems and Applications Lab - Eindhoven
- *
- * Continuus %full_filespec: samp_apm.h~16:incl:1 %
- *
- * Description: Exported header file of the Audio Presentation Manager
- *
- * Change history:
- *
- * Rev Date Who Comments
- * ---- ---------- -------- -----------------------------------------------------
- * 1 2001-06-07 klerxm Initial version
- * 2 2001-06-15 klerxm Template update
- * 3 2001-08-30 potm First real version
- * 4 2001-08-30 potm Added function descriptions
- * 5 2001-08-30 potm - Moved definition of max delays to apm_local.h
- * - Changed some comments
- * 6 2001-09-24 potm Added #ifdef for C++
- * 7 2001-10-09 potm Added input configuration 2/0
- * 8 2001-10-23 potm - Added lfe parameter to APM_SetInputChannels
- * - Added APM_OUT_BPS to APM_OutputModeDef
- * 9 2001-11-13 potm Added APM_SetBassFilters and related typedefs
- * 10 2002-01-04 potm Added APM_SetPIO
- * 11 2002-02-12 potm Attenuation now set for all channels at once (PR297)
- * 12 2002-02-13 novosadt APM_InputModeDef replaced by SACD_InputModeDef (CR321)
- * 13 2002-02-21 potm - Made spelling of CENTER consistent (replaced CENTRE)
- * - Moved APM_SetInputChannels to apm.h
- * - Removed APM_InputChannelDef (CR260)
- * 14 2002-06-07 klerxm Added 'extern "C"'
- * 15 2002-10-30 potm Added LSS0_noLFE speaker configuration (CR412)
- * 16 2003-02-18 potm Added APM_OUT_SYNC to APM_OutputModeDef (CR405)
- *
- *******************************************************************************/
- #ifndef _SAMP_APM_H
- #define _SAMP_APM_H
- /*******************************************************************************
- * Include Files
- *******************************************************************************/
- #include "Playcoresampsamp_gen.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*******************************************************************************
- * Macro Definitions
- *******************************************************************************/
- #define PCM_LE_RI 0x0001
- #define PCM_CE_LF 0x0004
- #define PCM_LS_RS 0x0005
- #define PCM_WCLK 0x0002
- #define PCM_DCLK 0x0003
- /*******************************************************************************
- * Type Definitions
- *******************************************************************************/
- typedef enum
- { SAMP(APM_FS_44)
- , SAMP(APM_FS_48)
- } SAMP(APM_FsDef);
- typedef enum
- { SAMP(APM_OUT_DSD)
- , SAMP(APM_OUT_SRC)
- , SAMP(APM_OUT_PCM)
- , SAMP(APM_OUT_BPS)
- , SAMP(APM_OUT_SYNC)
- } SAMP(APM_OutputModeDef);
- typedef enum
- { SAMP(APM_MIX_6CH_3_2)
- , SAMP(APM_MIX_6CH_2_2)
- , SAMP(APM_MIX_6CH_3_0)
- , SAMP(APM_MIX_6CH_2_0)
- } SAMP(APM_6ch_MixDef);
- typedef enum
- { SAMP(APM_MIX_2CH_DOWNMIX)
- , SAMP(APM_MIX_2CH_CENTER)
- } SAMP(APM_2ch_MixDef);
- typedef enum
- { SAMP(APM_LLL1)
- , SAMP(APM_SSS1)
- , SAMP(APM_LSS0)
- , SAMP(APM_LSS0_noLFE)
- } SAMP(APM_SpeakerDef);
- typedef enum
- { SAMP(APM_FM_MAX_SNR)
- , SAMP(APM_FM_MIN_TDD)
- , SAMP(APM_FM_INT)
- } SAMP(APM_FilterModeDef);
- typedef enum
- { SAMP(APM_6CH_LEFT)
- , SAMP(APM_6CH_RIGHT)
- , SAMP(APM_6CH_CENTER)
- , SAMP(APM_6CH_LFE)
- , SAMP(APM_6CH_LEFT_SURROUND)
- , SAMP(APM_6CH_RIGHT_SURROUND)
- , SAMP(APM_2CH_LEFT)
- , SAMP(APM_2CH_RIGHT)
- } SAMP(APM_ChannelDef);
- typedef enum
- { SAMP(APM_BASS_FREQ_120)
- , SAMP(APM_BASS_FREQ_100)
- , SAMP(APM_BASS_FREQ_80)
- , SAMP(APM_BASS_FREQ_60)
- } SAMP(APM_BassFrequencyDef);
- typedef enum
- { SAMP(APM_BASS_SLOPE_24)
- , SAMP(APM_BASS_SLOPE_18)
- , SAMP(APM_BASS_SLOPE_12)
- } SAMP(APM_BassSlopeDef);
- /*******************************************************************************
- * Functions Prototypes
- *******************************************************************************/
- /*******************************************************************************
- * Name : APM_SetInputMode
- * Input : InputStream Input stream type and frequency
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_UNKNOWN Invalid input type
- * Description: Sets the stream type and frequency
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetInputMode)(SAMP(SACD_InputModeDef) InputStream);
- /*******************************************************************************
- * Name : APM_SetOutputMode
- * Input : out_mode_6ch 6-channel output mode
- * out_mode_2ch 2-channel output mode
- * Output : -
- * Returns : ERR_OK
- * Description: Sets the 6-channel and 2-channel output modes (DSD or PCM)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetOutputMode)(SAMP(APM_OutputModeDef) out_mode_6ch, SAMP(APM_OutputModeDef) out_mode_2ch);
- /*******************************************************************************
- * Name : APM_Set6chDownmix
- * Input : Downmix 6-channel downmix
- * Output : -
- * Returns : ERR_OK
- * Description: Sets the 6-channel downmix (3/2, 2/2, 3/0, 2/0)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_Set6chDownmix)(SAMP(APM_6ch_MixDef) Downmix);
- /*******************************************************************************
- * Name : APM_Set2chDownmix
- * Input : Downmix 2-channel downmix
- * Output : -
- * Returns : ERR_OK
- * Description: Sets the 2-channel downmix (stereo downmix or center on stereo)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_Set2chDownmix)(SAMP(APM_2ch_MixDef) Downmix);
- /*******************************************************************************
- * Name : APM_SetSpeakers
- * Input : Speakers Speaker configuration
- * Output : -
- * Returns : ERR_OK
- * Description: Sets the speaker configuration (LLL1, SSS1, LSS0)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetSpeakers)(SAMP(APM_SpeakerDef) Speakers);
- /*******************************************************************************
- * Name : APM_SetAttenuation
- * Input : Attenuation Attenuation for channels in tenths of dBs
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_INVALID_PARAM Attenuation to large
- * Description: Sets the attenuation for all channels (0..900)
- * channel 0 = Left front
- * channel 1 = Right front
- * channel 2 = Center
- * channel 3 = Lfe
- * channel 4 = Left surround
- * channel 5 = Right surround
- * channel 6 = Left (2ch output)
- * channel 7 = Right (2ch output)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetAttenuation)(SAMP(UInt16) Attenuation[8]);
- /*******************************************************************************
- * Name : APM_SetDelay
- * Input : Delay[6] Delay times in microseconds
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_INVALID_PARAM Total delay too large
- * Description: Sets the delay for the 6 multichannel outputs.
- * Remarks : The maximal total delay is 69000usec @ 44Fs and 64000usec @ 48Fs
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetDelay)(SAMP(UInt32) Delay[6]);
- /*******************************************************************************
- * Name : APM_SetFilterMode
- * Input : FilterMode Selected filter mode
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_UNKNOWN Invalid input type
- * Description: Sets the filter mode (MAX_SNR, MIN_TDD, INT)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetFilterMode)(SAMP(APM_FilterModeDef) FilterMode);
- /*******************************************************************************
- * Name : APM_SetPcmUpsampling
- * Input : Upsampling The upsampling factor to be used
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_INVALID_PARAM Invalid upsampling factor specified
- * Description: Sets the upsampling factor for PCM output (2 or 4)
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetPcmUpsampling)(SAMP(UInt8) Upsampling);
- /*******************************************************************************
- * Name : APM_SetBassFilters
- * Input : BassFrequency Bass frequency
- * BassSlope Bass slope
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_UNKNOWN Unexpected internal error
- * Description: Sets DSD bass filters
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetBassFilters)(SAMP(APM_BassFrequencyDef) BassFrequency, SAMP(APM_BassSlopeDef) BassSlope);
- /*******************************************************************************
- * Name : APM_SetPIO
- * Input : pio_bits PIO pin settings
- * Output : -
- * Returns : ERR_OK Operation successful
- * ERR_UNKNOWN Unexpected internal error
- * Description: The lower 12 bits of pio_bits indicate for each output pin
- * whether it is set to 0 or to 1 in case it is selected to be
- * a PIO pin.
- * Remarks : -
- *******************************************************************************/
- SAMP(ErrCode) SAMP(APM_SetPIO)(SAMP(BitSet16) pio_bits);
- #ifdef __cplusplus
- }
- #endif
- #endif /* _SAMP_APM_H */
- /*******************************************************************************
- * End of File
- *******************************************************************************/