⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mxlsituner.h

📁 完整的基于Conxant平台的USB电视棒的WIN驱动程序。
💻 H
字号:
/*+++ *******************************************************************\
*
*  Copyright and Disclaimer:
*
*     ---------------------------------------------------------------
*     This software is provided "AS IS" without warranty of any kind,
*     either expressed or implied, including but not limited to the
*     implied warranties of noninfringement, merchantability and/or
*     fitness for a particular purpose.
*     ---------------------------------------------------------------
*
*     Copyright (c) 2006 Conexant Systems, Inc.
*     All rights reserved.
*
\******************************************************************* ---*/
#ifndef _MXL_SI_TUNER_H_
#define _MXL_SI_TUNER_H_

#include "ITuner.h"

/***********************************************************************/
// The following definitions can be increased based on the available
// decoders and the IF combination. The appropriate new table should be
// created to suppport new tv mode and get_DTV_tv_mode() function need to be
// updated correctly with new definition
/***********************************************************************/

#define     CNXT_DTV6_4_57_MHz       1
#define     CNXT_DTV7_4_57_MHz       2
#define     CNXT_DTV8_4_57_MHz       3
#define     LG_DTV6_6_0_MHz          4
#define     ATI_DTV6_6_38_MHz        5
#define     OREN_DTV6_3_6_MHz        6
#define     OREN_DTV6_5_38_MHz       7
#define     TOYOTA_DTV6_3_88_MHz     8
#define     TOYOTA_DTV6_7_94_MHz     9
#define     DTV6_QAM_6_0_MHz         10
#define     DIBCOM_DTV7_5_2_MHz      11
#define     DIBCOM_DTV8_5_2_MHz      12
#define     DIBCOM_DTV78_5_2_MHz     13
#define     ZARLINK_DTV7_4_56_MHz    14
#define     ZARLINK_DTV8_4_56_MHz    15
#define     ZARLINK_DTV78_4_56_MHz   16
#define     CHINA_DTV8_TEMP          17

#define     UNDEFINE_FIRMWARE       0
#define     NTSC_FIRMWARE           1
#define     PAL_FIRMWARE            2
#define     FM_INPUT1_FIRMWARE      3
#define     FM_INPUT2_FIRMWARE      4


/* MxLSiTuner class

   This class contains all the functionality required for tuning NTSC/ PAL mode signals
*/
// Classes

class I2cIF;
class ResetIF;

class MxLSiTuner : public ITuner
{
public:
    MxLSiTuner(I2cIF* p_i2c, ResetIF* p_RstIf, DWORD country_code, BYTE tuner_address = 0xC2, void *tuner_private = NULL);

    virtual ~MxLSiTuner();

    virtual BOOLEAN setFrequency(ULONG frequency, DWORD standard);
    virtual BOOLEAN setFrequency(PULONG p_frequency, DWORD standard, DWORD tuning_flags);

    //GetSignalOffset() return values:
    // 0 if signal is locked
    // -1 if no signal detected
    // other value needed to add to signal if signal is detected off the central frequency
    virtual LONG getSignalOffset();
    virtual BOOLEAN setMode(ULONG mode);

    //Accessors to tuner information
    virtual DWORD getSupportedModes();
    virtual DWORD getSupportedStandards(ULONG mode);
    virtual DWORD getMinFrequency(ULONG mode);
    virtual DWORD getMaxFrequency(ULONG mode);
    virtual DWORD getNumInputs(ULONG mode);
    BOOLEAN setStandard(DWORD standard);
    BOOLEAN setCountry(DWORD country);
    BOOLEAN Initialize();
    BOOLEAN isFirmwareLoaded();

    // set fm input number
    void setFMInputNumber(BYTE input);

    // Get device version information.
    int getTunerVersion( unsigned char* hw_majorversion,unsigned char* hw_minorversion,
                         unsigned char* fw_majorversion, unsigned char* fw_minorversion);

    // Get video standard for country
    BOOLEAN getVideoStdsForCountry(DWORD country_code,
                                   KS_AnalogVideoStandard* p_video_standard);

    // reset the current tv mode settings
    void resetCurrentTVmode();

    // get Curretn TV mode which a static variable
    BYTE getCurrrentTVmode();

    // set DTV frequency only for Digital frequency
    BOOLEAN setDTVfrequency(ULONG uc_tv_mode,ULONG ul_frequency, ULONG ul_channel_bandwidth);

    // get DTV tuner lock status by reading adc envelope register
    BOOLEAN getDTVtunerLockStatus(unsigned short *p_adc_envelope);

    // restore DTV mode
    BOOLEAN restoreDTVmode();

    // power down
    BOOLEAN powerDown();

private:
    virtual VOID adjustAGC_overrides(void* p_tuner, void* callback_context,
        void (*GenSiCallback)(void *p_DIF, DWORD command, void* callback_context));
    void   *_p_tuner_control;
    I2cIF  *_p_i2c;
    BYTE   _i2c_address;
    DWORD  _country_code;
    ULONG  _mode;
    DWORD  _standard;
    DWORD  _firmware_type;
    ULONG  _frequency;
    BYTE   _init;           // 0 -- boot mode
                            // 1 -- standby -> resume mode Or Hibernate -> resume mode
    void   *_p_tuner_private;
};
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -