DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Macros | Typedefs | Enumerations | Functions
stbhwtun.h File Reference

Header file - Function prototypes for tuner control. More...

#include "techtype.h"
#include "stbhwc.h"

Go to the source code of this file.

Macros

#define SYMBOL_RATE_AUTO   0
 

Typedefs

typedef enum e_stb_tune_system_type E_STB_TUNE_SYSTEM_TYPE
 
typedef enum e_stb_tune_signal_type E_STB_TUNE_SIGNAL_TYPE
 
typedef enum e_stb_tune_tmode E_STB_TUNE_TMODE
 
typedef enum e_stb_tune_tbwidth E_STB_TUNE_TBWIDTH
 
typedef enum e_stb_tune_tconst E_STB_TUNE_TCONST
 
typedef enum E_STB_TUNE_THIERARCHY E_STB_TUNE_THIERARCHY
 
typedef enum e_stb_tune_tcoderate E_STB_TUNE_TCODERATE
 
typedef enum e_stb_tune_tguardint E_STB_TUNE_TGUARDINT
 
typedef enum e_stb_tune_cmode E_STB_TUNE_CMODE
 
typedef enum e_stb_tune_lnb_voltage E_STB_TUNE_LNB_VOLTAGE
 
typedef enum e_stb_tune_fec E_STB_TUNE_FEC
 
typedef enum
e_stb_tune_analog_video_type 
E_STB_TUNE_ANALOG_VIDEO_TYPE
 

Enumerations

enum  e_stb_tune_system_type {
  TUNE_SYSTEM_TYPE_UNKNOWN = 0, TUNE_SYSTEM_TYPE_DVBT = 1, TUNE_SYSTEM_TYPE_DVBT2 = 2, TUNE_SYSTEM_TYPE_DVBS = 3,
  TUNE_SYSTEM_TYPE_DVBS2 = 4, TUNE_SYSTEM_TYPE_DVBC = 5
}
 
enum  e_stb_tune_signal_type {
  TUNE_SIGNAL_NONE = 0, TUNE_SIGNAL_QPSK = 1, TUNE_SIGNAL_COFDM = 2, TUNE_SIGNAL_QAM = 3,
  TUNE_SIGNAL_ANALOG = 4
}
 
enum  e_stb_tune_tmode {
  TUNE_MODE_COFDM_1K = 0, TUNE_MODE_COFDM_2K = 1, TUNE_MODE_COFDM_4K = 2, TUNE_MODE_COFDM_8K = 3,
  TUNE_MODE_COFDM_16K = 4, TUNE_MODE_COFDM_32K = 5, TUNE_MODE_COFDM_UNDEFINED = 255
}
 
enum  e_stb_tune_tbwidth { TUNE_TBWIDTH_8MHZ = 0, TUNE_TBWIDTH_7MHZ = 1, TUNE_TBWIDTH_6MHZ = 2, TUNE_TBWIDTH_5MHZ = 3 }
 
enum  e_stb_tune_tconst {
  TUNE_TCONST_QPSK = 0, TUNE_TCONST_QAM16 = 1, TUNE_TCONST_QAM64 = 2, TUNE_TCONST_QAM128 = 3,
  TUNE_TCONST_QAM256 = 4, TUNE_TCONST_UNDEFINED = 255
}
 
enum  E_STB_TUNE_THIERARCHY {
  TUNE_THIERARCHY_NONE = 0, TUNE_THIERARCHY_1 = 1, TUNE_THIERARCHY_2 = 2, TUNE_THIERARCHY_4 = 4,
  TUNE_THIERARCHY_8 = 8, TUNE_THIERARCHY_16 = 16, TUNE_THIERARCHY_32 = 32, TUNE_THIERARCHY_64 = 64,
  TUNE_THIERARCHY_128 = 128, TUNE_THIERARCHY_UNDEFINED = 255
}
 
enum  e_stb_tune_tcoderate {
  TUNE_TCODERATE_1_2 = 0, TUNE_TCODERATE_2_3 = 1, TUNE_TCODERATE_3_4 = 2, TUNE_TCODERATE_5_6 = 3,
  TUNE_TCODERATE_7_8 = 4, TUNE_TCODERATE_UNDEFINED = 255
}
 
enum  e_stb_tune_tguardint {
  TUNE_TGUARDINT_1_32 = 0, TUNE_TGUARDINT_1_16 = 1, TUNE_TGUARDINT_1_8 = 2, TUNE_TGUARDINT_1_4 = 3,
  TUNE_TGUARDINT_1_128 = 4, TUNE_TGUARDINT_19_128 = 5, TUNE_TGUARDINT_19_256 = 6, TUNE_TGUARDINT_UNDEFINED = 255
}
 
enum  e_stb_tune_cmode {
  TUNE_MODE_QAM_4 = 0, TUNE_MODE_QAM_8 = 1, TUNE_MODE_QAM_16 = 2, TUNE_MODE_QAM_32 = 3,
  TUNE_MODE_QAM_64 = 4, TUNE_MODE_QAM_128 = 5, TUNE_MODE_QAM_256 = 6, TUNE_MODE_QAM_UNDEFINED = 255
}
 
enum  E_STB_TUNE_MODULATION { TUNE_MOD_AUTO, TUNE_MOD_QPSK, TUNE_MOD_8PSK, TUNE_MOD_16QAM }
 
enum  e_stb_tune_lnb_voltage { LNB_VOLTAGE_OFF = 0, LNB_VOLTAGE_14V = 1, LNB_VOLTAGE_18V = 2 }
 
enum  e_stb_tune_fec {
  TUNE_FEC_AUTOMATIC = 0, TUNE_FEC_1_2 = 1, TUNE_FEC_2_3 = 2, TUNE_FEC_3_4 = 3,
  TUNE_FEC_5_6 = 4, TUNE_FEC_7_8 = 5, TUNE_FEC_1_4 = 6, TUNE_FEC_1_3 = 7,
  TUNE_FEC_2_5 = 8, TUNE_FEC_8_9 = 9, TUNE_FEC_9_10 = 10
}
 
enum  e_stb_tune_analog_video_type {
  TUNE_ANLG_VIDEO_PAL_I = 0, TUNE_ANLG_VIDEO_PAL_B = 1, TUNE_ANLG_VIDEO_PAL_G = 2, TUNE_ANLG_VIDEO_PAL_D = 3,
  TUNE_ANLG_VIDEO_PAL_K = 4, TUNE_ANLG_VIDEO_PAL_L = 5, TUNE_ANLG_VIDEO_PAL_LDASH = 6
}
 

Functions

void STB_TuneInitialise (U8BIT paths)
 Initialises the tuner component. More...
 
void STB_TuneSetSystemType (U8BIT path, E_STB_TUNE_SYSTEM_TYPE type)
 Set the demodulator's signal type. This function must be called before each call to STB_TuneStartTuner in a dvb-t2 system and never in a dvb-t system. More...
 
E_STB_TUNE_SYSTEM_TYPE STB_TuneGetSystemType (U8BIT path)
 Returns the signal type as set by STB_TuneSetTerrType or as re-written by the driver. More...
 
void STB_TuneAutoRelock (U8BIT path, BOOLEAN state)
 Enables or disabled auto tuner relocking. More...
 
E_STB_TUNE_SIGNAL_TYPE STB_TuneGetSignalType (U8BIT path)
 Gets the signal type of the tuner path. More...
 
U32BIT STB_TuneGetMinTunerFreqKHz (U8BIT path)
 Returns the minimum tuner frequency in KHz. More...
 
U32BIT STB_TuneGetMaxTunerFreqKHz (U8BIT path)
 Returns the maximum tuner frequency in KHz. More...
 
void STB_TuneStartTuner (U8BIT path, U32BIT freq, U32BIT srate, E_STB_TUNE_FEC fec, S8BIT freq_off, E_STB_TUNE_TMODE tmode, E_STB_TUNE_TBWIDTH tbwidth, E_STB_TUNE_CMODE cmode, E_STB_TUNE_ANALOG_VIDEO_TYPE anlg_vtype)
 Starts the tuner, it will then attempt to lock specified signal. Unrequired parameters can be passed as 0 (zero) More...
 
void STB_TuneRestartTuner (U8BIT path)
 Restarts tuner and attempts to lock to signal in StartTuner call. More...
 
void STB_TuneStopTuner (U8BIT path)
 Stops any locking attempt, or unlocks if locked. More...
 
U8BIT STB_TuneGetSignalStrength (U8BIT path)
 Returns the current signal strength. More...
 
U8BIT STB_TuneGetDataIntegrity (U8BIT path)
 Returns the current data integrity. More...
 
U32BIT STB_TuneGetActualTerrFrequency (U8BIT path)
 Returns the actual frequency of the current terrestrial signal. More...
 
S8BIT STB_TuneGetActualTerrFreqOffset (U8BIT path)
 Returns the actual freq offset of the current terrestrial signal. More...
 
E_STB_TUNE_TMODE STB_TuneGetActualTerrMode (U8BIT path)
 Returns the actual mode of the current terrestrial signal. More...
 
E_STB_TUNE_TBWIDTH STB_TuneGetActualTerrBwidth (U8BIT path)
 Returns the actual bandwidth of the current terrestrial signal. More...
 
E_STB_TUNE_TCONST STB_TuneGetActualTerrConstellation (U8BIT path)
 Returns the constellation of the current terrestrial signal. More...
 
E_STB_TUNE_THIERARCHY STB_TuneGetActualTerrHierarchy (U8BIT path)
 Returns the heirarchy of the current terrestrial signal. More...
 
E_STB_TUNE_TCODERATE STB_TuneGetActualTerrLpCodeRate (U8BIT path)
 Returns the LP code rate of the current terrestrial signal. More...
 
E_STB_TUNE_TCODERATE STB_TuneGetActualTerrHpCodeRate (U8BIT path)
 Returns the HP code rate of the current terrestrial signal. More...
 
E_STB_TUNE_TGUARDINT STB_TuneGetActualTerrGuardInt (U8BIT path)
 Returns the guard interval of the current terrestrial signal. More...
 
U16BIT STB_TuneGetActualTerrCellId (U8BIT path)
 Returns the cell id the current terrestrial signal. More...
 
void STB_TuneSetPLP (U8BIT path, U8BIT plp)
 Sets the Physical Layer Pipe to be acquired. More...
 
U8BIT STB_TuneGetPLP (U8BIT path)
 Gets the Physical Layer Pipe to be acquired. More...
 
void STB_TuneActiveAerialPower (U8BIT path, BOOLEAN enabled)
 Enables/disables aerial power for DVB-T. More...
 
void STB_TuneSetLOFrequency (U8BIT tuner, U16BIT lo_freq)
 Sets the local oscillator frequency used by the LNB. More...
 
void STB_TuneSetModulation (U8BIT path, E_STB_TUNE_MODULATION modulation)
 Sets the type of modulation for the specified tuner. More...
 
void STB_TuneSetLNBVoltage (U8BIT path, E_STB_TUNE_LNB_VOLTAGE voltage)
 Sets the LNB voltage for the given tuner. More...
 
void STB_TuneSet22kState (U8BIT path, BOOLEAN state)
 Turns the 22 kHz tone on or off. More...
 
void STB_TuneSet12VSwitch (U8BIT path, BOOLEAN state)
 Sets the 12V switch for the given tuner. More...
 
U8BIT STB_TuneGetDISEQCReply (U8BIT path, U8BIT *data, U32BIT timeout)
 Receives a DisEqc reply. More...
 
void STB_TuneSendDISEQCMessage (U8BIT path, U8BIT *data, U8BIT size)
 Sends the DisEqc message. More...
 
void STB_TuneSetPulseLimitEast (U8BIT path, U16BIT count)
 Sets the pulse limit for the east. More...
 
void STB_TuneSetPulseLimitWest (U8BIT path, U16BIT count)
 Sets the pulse limit for the west. More...
 
void STB_TuneChangePulsePosition (U8BIT path, U16BIT count)
 
U16BIT STB_TuneGetPulsePosition (U8BIT path)
 Returns the current pulse position. More...
 
void STB_TuneAtPulsePosition (U8BIT path, U16BIT position)
 
void STB_TuneChangeSkewPosition (U8BIT path, U16BIT count)
 Changes the value of skew position count. More...
 
U8BIT STB_TuneSatGetCarrierStrength (U8BIT path, U32BIT freq)
 Returns the carrier signal strength as a percentage. More...
 
U32BIT STB_TuneGetActualSymbolRate (U8BIT path)
 Returns the actual symbol rate when a tuner has locked. More...
 
E_STB_TUNE_CMODE STB_TuneGetActualCableMode (U8BIT path)
 Returns the cable mode when the tuner has locked. More...
 
E_STB_TUNE_SYSTEM_TYPE STB_TuneGetSupportedSystemType (U8BIT path)
 Returns the system type supported by the path. This function differs from STB_TuneGetSystemType which only returns T2 or S2 if the tuner is currently performing T2 or S2 operations. More...
 

Detailed Description

Header file - Function prototypes for tuner control.

Date
06/02/2001

Function Documentation

void STB_TuneActiveAerialPower ( U8BIT  path,
BOOLEAN  enabled 
)

Enables/disables aerial power for DVB-T.

Parameters
pathtuner path
enabledTRUE to enable
void STB_TuneAutoRelock ( U8BIT  path,
BOOLEAN  state 
)

Enables or disabled auto tuner relocking.

Parameters
paththe tuner path to configure
stateTRUE enables relocking, FALSE disables it
void STB_TuneChangeSkewPosition ( U8BIT  path,
U16BIT  count 
)

Changes the value of skew position count.

Parameters
pathtuner path
countskew position count
E_STB_TUNE_CMODE STB_TuneGetActualCableMode ( U8BIT  path)

Returns the cable mode when the tuner has locked.

Parameters
pathtuner path
Returns
QAM mode
U32BIT STB_TuneGetActualSymbolRate ( U8BIT  path)

Returns the actual symbol rate when a tuner has locked.

Parameters
pathtuner path
Returns
Symbol rate in symbols per second
E_STB_TUNE_TBWIDTH STB_TuneGetActualTerrBwidth ( U8BIT  path)

Returns the actual bandwidth of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the signal bandwidth
U16BIT STB_TuneGetActualTerrCellId ( U8BIT  path)

Returns the cell id the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the cell id
E_STB_TUNE_TCONST STB_TuneGetActualTerrConstellation ( U8BIT  path)

Returns the constellation of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the constellation
S8BIT STB_TuneGetActualTerrFreqOffset ( U8BIT  path)

Returns the actual freq offset of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the frequency offset in Hz
U32BIT STB_TuneGetActualTerrFrequency ( U8BIT  path)

Returns the actual frequency of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the frequency in Hz
E_STB_TUNE_TGUARDINT STB_TuneGetActualTerrGuardInt ( U8BIT  path)

Returns the guard interval of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the guard interval
E_STB_TUNE_THIERARCHY STB_TuneGetActualTerrHierarchy ( U8BIT  path)

Returns the heirarchy of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the heirarchy, i.e. the muximum PLP id possibly present at the current frequency.
E_STB_TUNE_TCODERATE STB_TuneGetActualTerrHpCodeRate ( U8BIT  path)

Returns the HP code rate of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
The HP code rate
E_STB_TUNE_TCODERATE STB_TuneGetActualTerrLpCodeRate ( U8BIT  path)

Returns the LP code rate of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
The LP code rate
E_STB_TUNE_TMODE STB_TuneGetActualTerrMode ( U8BIT  path)

Returns the actual mode of the current terrestrial signal.

Parameters
paththe tuner path to query
Returns
the tuning mode
U8BIT STB_TuneGetDataIntegrity ( U8BIT  path)

Returns the current data integrity.

Parameters
paththe tuner path to query
Returns
the data integrity as percentage of maximum possible (0-100)
U8BIT STB_TuneGetDISEQCReply ( U8BIT  path,
U8BIT *  data,
U32BIT  timeout 
)

Receives a DisEqc reply.

Parameters
pathtuner path
datapointer to the received data
timeoutmaximum number of milliseconds to wait for a reply
Returns
The number of bytes received
U32BIT STB_TuneGetMaxTunerFreqKHz ( U8BIT  path)

Returns the maximum tuner frequency in KHz.

Parameters
paththe tuner path to query
Returns
maximum frequency in Khz
U32BIT STB_TuneGetMinTunerFreqKHz ( U8BIT  path)

Returns the minimum tuner frequency in KHz.

Parameters
paththe tuner path to query
Returns
minimum frequency in Khz
U8BIT STB_TuneGetPLP ( U8BIT  path)

Gets the Physical Layer Pipe to be acquired.

Parameters
paththe tuner path to query
Returns
Physical Layer Pipe to be acquired
U16BIT STB_TuneGetPulsePosition ( U8BIT  path)

Returns the current pulse position.

Parameters
pathtuner path
Returns
Current puls position
U8BIT STB_TuneGetSignalStrength ( U8BIT  path)

Returns the current signal strength.

Parameters
paththe tuner path to query
Returns
the signal strength as percentage of maximum (0-100)
E_STB_TUNE_SIGNAL_TYPE STB_TuneGetSignalType ( U8BIT  path)

Gets the signal type of the tuner path.

Parameters
paththe tuner path to configure
Returns
the tuner signal type
E_STB_TUNE_SYSTEM_TYPE STB_TuneGetSupportedSystemType ( U8BIT  path)

Returns the system type supported by the path. This function differs from STB_TuneGetSystemType which only returns T2 or S2 if the tuner is currently performing T2 or S2 operations.

Parameters
paththe tuner path to query
Returns
(E_STB_TUNE_SYSTEM_TYPE) the system type supported by this path. TUNE_SYSTEM_TYPE_DVBT2 means both DVBT and DVBT2 are supported, TUNE_SYSTEM_TYPE_DVBS2 means both DVBS and DVBS2 are supported
E_STB_TUNE_SYSTEM_TYPE STB_TuneGetSystemType ( U8BIT  path)

Returns the signal type as set by STB_TuneSetTerrType or as re-written by the driver.

Parameters
paththe tuner path to query
Returns
Signal type.
void STB_TuneInitialise ( U8BIT  paths)

Initialises the tuner component.

Parameters
pathsnumber of tuning paths to initialise
void STB_TuneRestartTuner ( U8BIT  path)

Restarts tuner and attempts to lock to signal in StartTuner call.

Parameters
paththe tuner path to restart
U8BIT STB_TuneSatGetCarrierStrength ( U8BIT  path,
U32BIT  freq 
)

Returns the carrier signal strength as a percentage.

Parameters
pathtuner path
freqcarrier frequency
Returns
Strength as a percentage
void STB_TuneSendDISEQCMessage ( U8BIT  path,
U8BIT *  data,
U8BIT  size 
)

Sends the DisEqc message.

Parameters
path- tuner path
data- message data
size- number of bytes in message data
void STB_TuneSet12VSwitch ( U8BIT  path,
BOOLEAN  state 
)

Sets the 12V switch for the given tuner.

Parameters
pathtuner path
stateTRUE for on
void STB_TuneSet22kState ( U8BIT  path,
BOOLEAN  state 
)

Turns the 22 kHz tone on or off.

Parameters
pathtuner path
stateTRUE to turn the tone on, FALSE to turn it off
void STB_TuneSetLNBVoltage ( U8BIT  path,
E_STB_TUNE_LNB_VOLTAGE  voltage 
)

Sets the LNB voltage for the given tuner.

Parameters
pathtuner path
voltagevoltage setting
void STB_TuneSetLOFrequency ( U8BIT  tuner,
U16BIT  lo_freq 
)

Sets the local oscillator frequency used by the LNB.

Parameters
paththe tuner path to query
void STB_TuneSetModulation ( U8BIT  path,
E_STB_TUNE_MODULATION  modulation 
)

Sets the type of modulation for the specified tuner.

Parameters
pathtuner path
modulationtype of modulation
void STB_TuneSetPLP ( U8BIT  path,
U8BIT  plp 
)

Sets the Physical Layer Pipe to be acquired.

Parameters
paththe tuner path to set up
plpPhysical Layer Pipe to be acquired
void STB_TuneSetPulseLimitEast ( U8BIT  path,
U16BIT  count 
)

Sets the pulse limit for the east.

Parameters
pathtuner path
counteast limit count
void STB_TuneSetPulseLimitWest ( U8BIT  path,
U16BIT  count 
)

Sets the pulse limit for the west.

Parameters
pathtuner path
countwest limit count
void STB_TuneSetSystemType ( U8BIT  path,
E_STB_TUNE_SYSTEM_TYPE  type 
)

Set the demodulator's signal type. This function must be called before each call to STB_TuneStartTuner in a dvb-t2 system and never in a dvb-t system.

Parameters
U8BITpath - the tuner path to set up
E_STB_TUNE_TERR_TYPEtype: TUNE_TERR_TYPE_DVBT, TUNE_TERR_TYPE_DVBT2 or TUNE_TERR_TYPE_UNKNOWN. When the signal type has been set to TUNE_TERR_TYPE_UNKNOWN, a call to STB_TuneStartTuner will force the driver to try with DVB-T first, and if no signal is found, with DVB-T2. When a signal has been found, STB_TuneGetTerrType will return the actual signal type.
void STB_TuneStartTuner ( U8BIT  path,
U32BIT  freq,
U32BIT  srate,
E_STB_TUNE_FEC  fec,
S8BIT  freq_off,
E_STB_TUNE_TMODE  tmode,
E_STB_TUNE_TBWIDTH  tbwidth,
E_STB_TUNE_CMODE  cmode,
E_STB_TUNE_ANALOG_VIDEO_TYPE  anlg_vtype 
)

Starts the tuner, it will then attempt to lock specified signal. Unrequired parameters can be passed as 0 (zero)

Parameters
paththe tuner path to start
freqthe frequency to tune to
sratethe symbol rate to lock
fecThe forward error correction rate
freq_offThe frequency offset to use
tmodeThe COFDM mode
tbwidthThe signal bandwidth
cmodeThe QAM mode
anlg_vtypeThe type of video for analogue tuner
void STB_TuneStopTuner ( U8BIT  path)

Stops any locking attempt, or unlocks if locked.

Parameters
paththe tuner path to stop