| 1 | /**************************************************************************** |
|---|
| 2 | * |
|---|
| 3 | * Copyright (c) 2001 Trident Microsystems, Inc. |
|---|
| 4 | * All rights reserved |
|---|
| 5 | * |
|---|
| 6 | * The content of this file or document is CONFIDENTIAL and PROPRIETARY |
|---|
| 7 | * to Trident Microsystems, Inc. It is subject to the terms of a License |
|---|
| 8 | * Agreement between Licensee and Trident Microsystems, Inc. |
|---|
| 9 | * restricting among other things, the use, reproduction, distribution |
|---|
| 10 | * and transfer. Each of the embodiments, including this information and |
|---|
| 11 | * any derivative work shall retain this copyright notice |
|---|
| 12 | * |
|---|
| 13 | * FileName: S5H1409.h |
|---|
| 14 | * |
|---|
| 15 | * modification history |
|---|
| 16 | * Created by Alex |
|---|
| 17 | * Date: 2006-2-28 |
|---|
| 18 | *******************************************************************************/ |
|---|
| 19 | |
|---|
| 20 | #ifndef _S5H1409CORE_H_ |
|---|
| 21 | #define _S5H1409CORE_H_ |
|---|
| 22 | |
|---|
| 23 | #include "IicComm.h" |
|---|
| 24 | #if (NIMTN_TYPE == NIMTN_DTT7611) |
|---|
| 25 | #include "TunerDTT7611.h" |
|---|
| 26 | #elif(NIMTN_TYPE == NIMTN_U7A06) |
|---|
| 27 | #include "TunerU7A06.h" |
|---|
| 28 | #elif(NIMTN_TYPE == NIMTN_DTVS205) |
|---|
| 29 | #include "TunerDTVS205FH201A.h" |
|---|
| 30 | #else |
|---|
| 31 | #warn NIMTN_TYPE Was not defined |
|---|
| 32 | #endif |
|---|
| 33 | |
|---|
| 34 | #define IIC_1409x_RegId 0x32 // Demod Address |
|---|
| 35 | |
|---|
| 36 | DS_U8 Sdm_1409xInitialize(int output_mode); |
|---|
| 37 | DS_U8 Sdm_1409xSoftReset(void); |
|---|
| 38 | DS_U8 Sdm_1409xRegReset(void); |
|---|
| 39 | DS_U8 Sdm_1409xRepeaterEnable(void); |
|---|
| 40 | DS_U8 Sdm_1409xRepeaterDisable(void); |
|---|
| 41 | DS_U8 Sdm_1409xVsbMode(void); |
|---|
| 42 | DS_U8 Sdm_1409xQamMode(void); |
|---|
| 43 | DS_U8 Sdm_1409x64QamMode(void); |
|---|
| 44 | DS_U8 Sdm_1409x256QamMode(void); |
|---|
| 45 | DS_U8 Sdm_1409xSleepOn(void); |
|---|
| 46 | DS_U8 Sdm_1409xSleepOff(void); |
|---|
| 47 | double Sdm_1409xVsbSnrResultCheck(void); |
|---|
| 48 | double Sdm_1409xQamSnrResultCheck(void); |
|---|
| 49 | DS_U16 Sdm_1409xVsbQAMMasterLock(void); //Master Lock! |
|---|
| 50 | DS_U8 Sdm_1409xGetQAMMode(TunerDemod *QamMode); |
|---|
| 51 | |
|---|
| 52 | /************************************************************************** |
|---|
| 53 | * S5H1409 VSB Sync Lock Check Driver |
|---|
| 54 | * Conditions: |
|---|
| 55 | * Description : |
|---|
| 56 | * This function is used to check whether the channel chip is lock |
|---|
| 57 | * or not in VSB mode. |
|---|
| 58 | * Addr : 0x40 |
|---|
| 59 | * Value: |
|---|
| 60 | * bit 0 -> 1:Lock , 0:Unlock |
|---|
| 61 | ***************************************************************************/ |
|---|
| 62 | |
|---|
| 63 | DS_U16 Sdm_1409xVsbSyncLock(void); //Sync Lock! |
|---|
| 64 | |
|---|
| 65 | /************************************************************************** |
|---|
| 66 | * S5H1409 QAM EQ Lock Check Driver |
|---|
| 67 | * Conditions: |
|---|
| 68 | * Description : |
|---|
| 69 | * This function is used to check whether the channel chip is lock |
|---|
| 70 | * in QAM mode. |
|---|
| 71 | * Addr : 0xf0 |
|---|
| 72 | * Value: |
|---|
| 73 | * 13bit -> 1:Lock , 0:Unlock |
|---|
| 74 | ***************************************************************************/ |
|---|
| 75 | |
|---|
| 76 | DS_U16 Sdm_1409xQAMEQLock(void); //EQ Lock! |
|---|
| 77 | |
|---|
| 78 | /************************************************************************** |
|---|
| 79 | * Name: |
|---|
| 80 | * Sdm_1409SetScanMode |
|---|
| 81 | * Description: |
|---|
| 82 | * bScanMode must be set true before doing the channel scan and set FALSE |
|---|
| 83 | * after finishing the scanning |
|---|
| 84 | * Author: |
|---|
| 85 | * Alex |
|---|
| 86 | ********************************************************************/ |
|---|
| 87 | DS_U8 Sdm_1409SetScanMode(DS_BOOL bScanMode); |
|---|
| 88 | |
|---|
| 89 | /********************************************************************************************************* |
|---|
| 90 | * S5H1409 QAM Interleave mode set driver |
|---|
| 91 | * Conditions: Only in qam mode |
|---|
| 92 | * Description: In the TOV state at low SNR, this driver could be improve the perfomance. |
|---|
| 93 | * Call this function in a timer when in QAM mode( maybe 0.5-1 second / loop) |
|---|
| 94 | * Addr: 0xab |
|---|
| 95 | * Value: 0x1000 -> manually write the interleaver mode. |
|---|
| 96 | **********************************************************************************************************/ |
|---|
| 97 | void Sdm_1409xQamInterleave_ModeSet(void); |
|---|
| 98 | |
|---|
| 99 | /************************************************************************** |
|---|
| 100 | * Name: |
|---|
| 101 | * Sdm_1409xQamSnrValue |
|---|
| 102 | * Description: |
|---|
| 103 | * Check the SNR value |
|---|
| 104 | * Author: |
|---|
| 105 | * Alex |
|---|
| 106 | ********************************************************************/ |
|---|
| 107 | DS_U8 Sdm_1409xQamSnrValue(void); |
|---|
| 108 | |
|---|
| 109 | void Sdm_1409xSetQamInterleave(DS_BOOL bSet); |
|---|
| 110 | DS_BOOL Sdm_1409xIsQamMode(void); |
|---|
| 111 | #endif |
|---|
| 112 | |
|---|
| 113 | DS_U16 Sdm_1409xGetTrellisErrCnt(void); |
|---|
| 114 | DS_U16 Sdm_1409xGetRSErrCnt(void); |
|---|
| 115 | |
|---|
| 116 | /***************************************************************************** |
|---|
| 117 | * End Of File |
|---|
| 118 | *****************************************************************************/ |
|---|