123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- /******************************************************************************/
- /**
- *
- * \file mid_scan.h
- *
- * \brief middle-ware of analog TV scan.
- *
- *
- * \note Copyright (c) 2010 Sunplus Technology Co., Ltd. \n
- * All rights reserved.
- *
- * \author
- *
- ******************************************************************************/
- #ifndef _MID_ATV_SCAN_H_
- #define _MID_ATV_SCAN_H_
- /*******************************************************************************
- * Header include
- ******************************************************************************/
- #include "types.h"
- #include "drv_sif_interface.h"
- /*******************************************************************************
- * Marco
- ******************************************************************************/
- /*******************************************************************************
- * Structure
- ******************************************************************************/
- /*******************************************************************************
- * Constant
- ******************************************************************************/
- /*******************************************************************************
- * enumeration
- ******************************************************************************/
- //[Begin]hsunying, 2011/03/21
- typedef enum
- {
- ANA_SCAN_VIDEO_FORMAT_AUTO = 0x00,
- ANA_SCAN_VIDEO_FORMAT_NTSC358 = (1 << 0),
- ANA_SCAN_VIDEO_FORMAT_NTSC443 = (1 << 1),
- ANA_SCAN_VIDEO_FORMAT_PAL = (1 << 2),
- ANA_SCAN_VIDEO_FORMAT_PALM = (1 << 3),
- ANA_SCAN_VIDEO_FORMAT_PALCN = (1 << 4),
- ANA_SCAN_VIDEO_FORMAT_PAL60 = (1 << 5),
- ANA_SCAN_VIDEO_FORMAT_SECAM = (1 << 6),
- ANA_SCAN_VIDEO_FORMAT_SECAML = (1 << 7),
- } Ana_ScanVideoFormat_t;
- typedef enum
- {
- ANA_SCAN_AUDIO_STD_NULL = 0x00 ,
- ANA_SCAN_AUDIO_STD_M = (1 << 0),
- ANA_SCAN_AUDIO_STD_BG = (1 << 1),
- ANA_SCAN_AUDIO_STD_DK = (1 << 2),
- ANA_SCAN_AUDIO_STD_I = (1 << 3),
- ANA_SCAN_AUDIO_STD_L = (1 << 4),
- ANA_SCAN_AUDIO_STD_L1 = (1 << 5),
- } Ana_ScanAudioStd_t;
- typedef enum
- {
- ANA_SCAN_AUDIO_STD_A2BG =0,
- ANA_SCAN_AUDIO_STD_NICAMBG ,
- ANA_SCAN_AUDIO_STD_NICAML ,
- ANA_SCAN_AUDIO_STD_NICAMI ,
- ANA_SCAN_AUDIO_STD_A2DK1 ,
- ANA_SCAN_AUDIO_STD_A2DK2,
- ANA_SCAN_AUDIO_STD_A2DK3 ,
- ANA_SCAN_AUDIO_STD_NICAMDK ,
- ANA_SCAN_AUDIO_STD_A2MN ,
- ANA_SCAN_AUDIO_STD_EIAJ ,
- ANA_SCAN_AUDIO_STD_BTSC ,
- ANA_SCAN_AUDIO_STD_NICAML1,
- ANA_SCAN_AUDIO_STD_ERR ,
- } Ana_SaveScanAudioStd_t;
- //[End]
- //[Begin]hsunying, 2011/04/11
- typedef enum
- {
- ANA_SCAN_DIRECTION_POSITIVE,
- ANA_SCAN_DIRECTION_NEGTIVE,
- }Ana_ScanDirection_t;
- //[End]
- //[Begin]hsunying, 2011/06/07
- typedef enum
- {
- ANA_SCAN_MODE_AUTO,
- ANA_SCAN_MODE_MANUAL,
- }Ana_ScanMode_t;
- //[End]
- /**
- * \brief Callback type
- */
- typedef enum __MID_ScanCallbackType_e
- {
- MID_SCAN_CALLBK_TYPE_REQUEST_NEXT_CH = 0, ///> request ap layer give the next TP parameter : pParam is point to the structure MID_ScanParam_t
- MID_SCAN_CALLBK_TYPE_LOCKED_CH, ///> TP lock ok or failed? (*pParam) is a value of DRV_Status_t
- MID_SCAN_CALLBK_TYPE_EXCEED_TRUNER,
- MID_SCAN_CALLBK_TYPE_RESERVED,
- }MID_AnalogTVScanCallbkType_e;
- /*******************************************************************************
- * Structure
- ******************************************************************************/
- //[Begin]hsunying, 2011/03/21
- typedef struct _ana_scan_inputinfo_t
- {
- UINT8 bMaxChannelCount;
- UINT8 bBlueScreen;
- UINT32 dCurrentFreq;
- UINT32 dMinFreq;
- UINT32 dMaxFreq;
- UINT32 dLBoundaryFreq;
- Ana_ScanAudioStd_t eAudioStd_Supported;
- Ana_ScanVideoFormat_t eVideoFormat_Supported;
- Ana_ScanDirection_t eScanningDirection;
- Ana_ScanMode_t eScanMode;
- // ATS
- void (*ResetATS)(void);
- void (*GetATSData)(void*);
- } Ana_ScanInputInfo_t;
- typedef struct _al_atv_fullscan_outputinfo_t
- {
- UINT8 bCurrentChnNumber;
- UINT32 dCurrentFreq;
- Ana_SaveScanAudioStd_t eAudioStd_Result;
- Ana_ScanVideoFormat_t eVideoFormat_Result;
- UINT16 wVPS; // line 16
- UINT16 wFormat1; // magzine 8, page 30
- UINT16 wFormat2; // magzine 8, page 30
- } Ana_ScanOutputInfo_t;
- //[End]
- /**
- * \brief Scan parameter structure
- */
- typedef struct
- {
- // external parameters
- UINT32 dFreq;
- //Ana_ScanAudioStd_t eStd;
- } MID_ATVScanParam_t;
- typedef int (*ATVMidScanCallback)(MID_AnalogTVScanCallbkType_e eCallbkType, void* pParam);
- /*******************************************************************************
- * APIs
- ******************************************************************************/
- /******************************************************************************/
- /**
- * @brief If you want to search analog channles, please fill the related info and call this function first
- * @param Ana_ScanInputInfo_t *InitParam : Input all infomation about analog scanning.
- * ATVMidScanCallback pfGetScanParamCallbk : a callback function to obtain the next Ch scan parameter
- * @return FALSE if success
- * TRUE if Exception Error occurred.
- ******************************************************************************/
- BOOLEAN MID_AnalogTVScanStart(Ana_ScanInputInfo_t *InitParam, ATVMidScanCallback pfGetScanParamCallbk);
- /******************************************************************************/
- /**
- * @brief To stop the scan processer while scanning.
- * @return FALSE if success
- * TRUE if Exception Error occurred.
- ******************************************************************************/
- BOOLEAN MID_AnalogTVScanStop(void);
- /******************************************************************************/
- /**
- * @brief To suspend the scan processer while scanning.
- * @return TURE if success
- ******************************************************************************/
- BOOLEAN MID_AnalogTVScanPause(void);
- /******************************************************************************/
- /**
- * @brief To resume the scan processer after suspending.
- * @return TURE if success
- ******************************************************************************/
- BOOLEAN MID_AnalogTVScanResume(void);
- /******************************************************************************/
- /**
- * @brief To set the direction of scanning.
- * @param Ana_ScanDirection_t eDirection : the scanning direction.
- ******************************************************************************/
- void MID_AnalogTVScanSetDirection(Ana_ScanDirection_t eDirection);
- /******************************************************************************/
- /**
- * @brief To get current frequency.
- * @return UINT32 : current frequency.
- ******************************************************************************/
- UINT32 MID_AnalogTVScanGetCurrentFreq(void);
- /******************************************************************************/
- /**
- * @brief To scan boundary point freq.
- * @param BOOLEAN IsScanPoint: is scan this point.
- * @return void
- ******************************************************************************/
- void MID_AnalogTVScanSetBoundaryPointScanStatus(BOOLEAN IsScanBoundaryPoint);
- #endif // #ifndef _MID_ATV_SCAN_H
|