/*! \addtogroup analog table scan * @{ */ /******************************************************************************/ /** * * \file mid_tablescan.h * * \brief middle-ware of analog TV table scan. * * * \note Copyright (c) 2012 Sunplus Technology Co., Ltd. \n * All rights reserved. * * \author * Ray Wu, create * Hsunying, 2012/04/31 modify, remove unused variables * Hsunying, 2012/04/31 modify, the structures and enums * ******************************************************************************/ #ifndef _MID_ATV_TABLESCAN_H_ #define _MID_ATV_TABLESCAN_H_ /******************************************************************************* * Header include ******************************************************************************/ #include "types.h" /******************************************************************************* * Marco ******************************************************************************/ /******************************************************************************* * Structure ******************************************************************************/ /******************************************************************************* * Constant ******************************************************************************/ /******************************************************************************* * enumeration ******************************************************************************/ typedef enum { MID_TABLE_SCAN_VIDEO_FORMAT_AUTO = 0x00, MID_TABLE_SCAN_VIDEO_FORMAT_NTSC358 = (1 << 0), MID_TABLE_SCAN_VIDEO_FORMAT_NTSC443 = (1 << 1), MID_TABLE_SCAN_VIDEO_FORMAT_PAL = (1 << 2), MID_TABLE_SCAN_VIDEO_FORMAT_PALM = (1 << 3), MID_TABLE_SCAN_VIDEO_FORMAT_PALCN = (1 << 4), MID_TABLE_SCAN_VIDEO_FORMAT_PAL60 = (1 << 5), MID_TABLE_SCAN_VIDEO_FORMAT_SECAM = (1 << 6), MID_TABLE_SCAN_VIDEO_FORMAT_SECAML = (1 << 7), }Mid_TableScan_VideoFormat_t; typedef enum { MID_TABLE_SCAN_AUDIO_STD_A2BG = 0, MID_TABLE_SCAN_AUDIO_STD_NICAMBG, MID_TABLE_SCAN_AUDIO_STD_NICAML, MID_TABLE_SCAN_AUDIO_STD_NICAMI, MID_TABLE_SCAN_AUDIO_STD_A2DK1, MID_TABLE_SCAN_AUDIO_STD_A2DK2, MID_TABLE_SCAN_AUDIO_STD_A2DK3, MID_TABLE_SCAN_AUDIO_STD_NICAMDK, MID_TABLE_SCAN_AUDIO_STD_A2MN, MID_TABLE_SCAN_AUDIO_STD_EIAJ, MID_TABLE_SCAN_AUDIO_STD_BTSC, MID_TABLE_SCAN_AUDIO_STD_NICAML1, MID_TABLE_SCAN_AUDIO_STD_ERR, } Mid_TableScan_SaveScanAudioStd_t; /** * \brief Callback type */ typedef enum _mid_TableScanCallbackType_e { MID_TABLE_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_TABLE_SCAN_CALLBK_TYPE_LOCKED_CH, ///> TP lock ok or failed? (*pParam) is a value of DRV_Status_t MID_TABLE_SCAN_CALLBK_TYPE_EXCEED_TRUNER, MID_TABLE_SCAN_CALLBK_TYPE_RESERVED, }Mid_TableScan_ScanCallbkType_e; /******************************************************************************* * Structure ******************************************************************************/ typedef struct _mid_tablescan_inputinfo_t { Mid_TableScan_VideoFormat_t eVideoFormat_Supported; } Mid_TableScan_ScanInputInfo_t; typedef struct _mid_tablescan_outputinfo_t { UINT32 dCurrentFreq; Mid_TableScan_VideoFormat_t eVideoFormat_Result; Mid_TableScan_SaveScanAudioStd_t eAudioFormat_Result; } Mid_TableScan_ScanOutputInfo_t; /** * brief Scan parameter structure */ typedef struct { // external parameters UINT32 dFreq; } Mid_TableScan_Param_t; /******************************************************************************* * APIs ******************************************************************************/ /** * \brief a callback function to obtain the next Ch scan parameter * * return 0 means successful getting the next CH scan parameter * other return values means no next CH scan parameter, and the scan processer will auto terminate */ typedef int (*MidTableScanCallback)(Mid_TableScan_ScanCallbkType_e eCallbkType, void* pParam); /************************************************************************************* * Definition of SCAN module interfaces *************************************************************************************/ /** \addtogroup DTV_scan DTV Scan * \brief Interfaces of DTV scan middle-ware. * @{ */ /*******************************************************************************************/ /** * \fn DRV_Status_t MID_ScanStart(UINT32 u32ScanCapabilities, iMidScanCallback pfGetScanParamCallbk) * * \param u32ScanCapabilities : The scan capabilities combined by MID_SCAN_CAPS_xxxxx * \param pfGetScanParamCallbk : a callback function to obtain the next TP scan parameter * callback function return 0 by ap layer means successful getting the next TP scan parameter * and other return values means no next TP scan parameter, and the scan processer will auto terminate. * * \return MID_SUCCESS if successful, warning or error code if function failed * * \note Description : To trigger a thread for scan the programs of digital signal. * * \note Restrictions: * ********************************************************************************************/ BOOLEAN MID_TableScanStart(Mid_TableScan_ScanInputInfo_t *InitParam, MidTableScanCallback pfGetScanParamCallbk); /*******************************************************************************************/ /** * \fn DRV_Status_t MID_ScanStop(void) * * \param none. * * \return DRV_SUCCESS if successful, warning or error code if function failed * * \note Description : To stop the scan processer while scanning. * * \note Restrictions:Once the module has been stop, calling this API a second time will * do nothing and will simply return a warning. ********************************************************************************************/ BOOLEAN MID_TableScanStop(void); BOOLEAN MID_TableScanPause(void); BOOLEAN MID_TableScanResume(void); #endif // #ifndef _MID_ATV_TABLESCAN_H_