Tuner Controls
[Mixer and Controls]

The tuner control sets the band and frequency of a tuner, and measures the RF level. More...

Functions

HPI_ERR HPI_Tuner_QueryBand (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hTuner, const HW32 dwIndex, HW16 *pwBand)
 Query tuner for supported bands.
HPI_ERR HPI_Tuner_SetBand (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 wBand)
 Set the band that the tuner recieves.
HPI_ERR HPI_Tuner_GetBand (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 *pwBand)
 Get the current tuner band.
HPI_ERR HPI_Tuner_QueryFrequency (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hTuner, const HW32 dwIndex, const HW16 band, HW32 *pdwFreq)
 Query tuner band for supported frequency range and steps Calling with dwIndex=0,1,2 returns frequency minimum, maximum and step respectively (in kHz), for the specified band.
HPI_ERR HPI_Tuner_SetFrequency (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 wFreqInkHz)
 Set the tuner frequency.
HPI_ERR HPI_Tuner_GetFrequency (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pwFreqInkHz)
 Get the current tuner frequency.
HPI_ERR HPI_Tuner_QueryGain (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hTuner, const HW32 dwIndex, HW16 *pwGain)
 Query possible settings of tuner gain control Iterate dwIndex until an error is returned to get the list of gains supported by this tuner.
HPI_ERR HPI_Tuner_SetGain (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short nGain)
 Set the RF attenuator gain of the tuner front end.
HPI_ERR HPI_Tuner_GetGain (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short *pnGain)
 Get the current tuner gain.
HPI_ERR HPI_Tuner_GetRFLevel (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short *pwLevel)
 Get the RF level of a tuner input in millibel microvolts.
HPI_ERR HPI_Tuner_GetRawRFLevel (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short *pwLevel)
 Get the RF raw level of a tuner.
HPI_ERR HPI_Tuner_QueryDeemphasis (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hTuner, const HW32 dwIndex, const HW16 band, HW32 *pdwDeemphasis)
 Query tuner band for supported deemphasis settings.
HPI_ERR HPI_Tuner_SetDeemphasis (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwDeemphasis)
 Set the audio de-emphasis.
HPI_ERR HPI_Tuner_GetDeemphasis (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwDeemphasis)
 Get the audio de-emphasis setting.
HPI_ERR HPI_API HPI_Tuner_QueryProgram (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hTuner, HW32 *pbitmapProgram)
 Get bitmap of programmes supported by this tuner.
HPI_ERR HPI_API HPI_Tuner_SetProgram (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwProgram)
 Sets the tuner program.
HPI_ERR HPI_API HPI_Tuner_GetProgram (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwProgram)
 Gets the tuner program.
HPI_ERR HPI_API HPI_Tuner_GetHdRadioDspVersion (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, char *pszDspVersion, const HW32 dwStringSize)
 Gets the DSP firmware verison of an HD Radio tuner.
HPI_ERR HPI_API HPI_Tuner_GetHdRadioSdkVersion (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, char *pszSdkVersion, const HW32 dwStringSize)
 Gets the SDK firmware verison of an HD Radio tuner.
HPI_ERR HPI_Tuner_GetVideoStatus (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 *pwStatus)
 Get the video status of a tuner input.
HPI_ERR HPI_Tuner_GetStatus (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 *pwStatusMask, HW16 *pwStatus)
 Get the status of various Boolean attributes of a tuner control.
HPI_ERR HPI_Tuner_SetMode (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 nMode, HW32 nValue)
 This function turns off the RSS (FM FR level reading) capability for the specified tuner.
HPI_ERR HPI_Tuner_GetMode (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 nMode, HW32 *pnValue)
 Get the current tuner mode.
HPI_ERR HPI_API HPI_Tuner_GetHdRadioSignalQuality (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwQuality)
 Get the digital signal quality from an HDRadio tuner.
HPI_ERR HPI_Tuner_GetRDS (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, char *pData)
 Get tuner RDS data.

Detailed Description

The tuner control sets the band and frequency of a tuner, and measures the RF level.

tuner.png

Function Documentation

HPI_ERR HPI_Tuner_QueryBand const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hTuner,
const HW32  dwIndex,
HW16 *  pwBand
 

Query tuner for supported bands.

Iterate dwIndex until an error is returned to get the list of bands supported by this tuner

Parameters:
phSubSys  Pointer to HPI subsystem handle
hTuner  Control to query
dwIndex  Index for possible attribute values
pwBand  band

HPI_ERR HPI_Tuner_SetBand HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16  wBand
 

Set the band that the tuner recieves.

Not all tuners support all bands, e.g. AM+FM or TV+FM.

Note:
That with the exception of HPI_TUNER_BAND_AUX, the tuner frequency must subsequently be set using HPI_Tuner_SetFrequency().

Please see

See also:
HPI_ControlQuery() for details on determining the bands supported by a particular Tuner Controls.
Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
wBand  One of the supported HPI_TUNER_BAND_XXX Tuner bands.

HPI_ERR HPI_Tuner_GetBand HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16 *  pwBand
 

Get the current tuner band.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pwBand  Current tuner band - one of Tuner bands.

HPI_ERR HPI_Tuner_QueryFrequency const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hTuner,
const HW32  dwIndex,
const HW16  band,
HW32 *  pdwFreq
 

Query tuner band for supported frequency range and steps Calling with dwIndex=0,1,2 returns frequency minimum, maximum and step respectively (in kHz), for the specified band.

For example, to determine the frequency range of the AM band, do the following:

wErr= HPI_Tuner_QueryFrequency(phSS,hC, HPI_TUNER_FREQ, 0, HPI_TUNER_BAND_AM , pdwMinFreq);
wErr= HPI_Tuner_QueryFrequency(phSS,hC, HPI_TUNER_FREQ, 1, HPI_TUNER_BAND_AM , pdwMaxFreq);
wErr= HPI_Tuner_QueryFrequency(phSS,hC, HPI_TUNER_FREQ, 2, HPI_TUNER_BAND_AM , pdwFreqStep);
Parameters:
phSubSys  Pointer to HPI subsystem handle
hTuner  Control to query
dwIndex  Index for possible attribute values
band  Band for which to query frequency range
pdwFreq  frequency min,max, step for given band

HPI_ERR HPI_Tuner_SetFrequency HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  wFreqInkHz
 

Set the tuner frequency.

Note:
See HPI_ControlQuery() to determine how to find the frequency supported by a particular tuner band.
Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  HPI subsystem handle.
wFreqInkHz  Tuner frequncy in kHz. Valid values depend on the tuner band setting.

HPI_ERR HPI_Tuner_GetFrequency HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pwFreqInkHz
 

Get the current tuner frequency.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pwFreqInkHz  Returned tuner frequency in kHz.

HPI_ERR HPI_Tuner_QueryGain const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hTuner,
const HW32  dwIndex,
HW16 *  pwGain
 

Query possible settings of tuner gain control Iterate dwIndex until an error is returned to get the list of gains supported by this tuner.

Parameters:
phSubSys  Pointer to HPI subsystem handle
hTuner  Control to query
dwIndex  Index for possible attribute values
pwGain  Tuner gain in millibels

HPI_ERR HPI_Tuner_SetGain HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
short  nGain
 

Set the RF attenuator gain of the tuner front end.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
nGain  Valid values depend on the adapter type. For the ASI8700: 0dB or -20 x HPI_UNITS_PER_dB.

HPI_ERR HPI_Tuner_GetGain HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
short *  pnGain
 

Get the current tuner gain.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pnGain  Current tuner gain in milliBels

HPI_ERR HPI_Tuner_GetRFLevel HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
short *  pwLevel
 

Get the RF level of a tuner input in millibel microvolts.

Divide the return value by HPI_UNITS_PER_dB to get the level in dBuV. This function only applies to certain bands on certain tuners.

Tuner Type Raw RF Level values Comments
MT4039 (TV/FM) 1..4 Only present in FM mode
MT1384 (AM</FM) 0..255 .
Si4703 (FM) Not supported .

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pwLevel  Return level. The units are mBuV (mB micro volts). Range is +/- 100 dBuV

HPI_ERR HPI_Tuner_GetRawRFLevel HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
short *  pwLevel
 

Get the RF raw level of a tuner.

This is a "raw" value and it will depend on the type of tuner being accessed. This function only applies to certain bands on certain tuners. ASI87xx - Supports this function.
ASI89xx with ASI1711 tuner - Does not support this function. It will return HPI_ERROR_INVALID_CONTROL_ATTRIBUTE.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pwLevel  The units of this depend on the tuner type. This is the raw level reading that the tuner returns.

HPI_ERR HPI_Tuner_QueryDeemphasis const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hTuner,
const HW32  dwIndex,
const HW16  band,
HW32 *  pdwDeemphasis
 

Query tuner band for supported deemphasis settings.

Some tuner bands don't support deemphasis, and will return an empty list. Iterate dwIndex until an error is returned to get the list of deemphasis supported by this tuner band.

Parameters:
phSubSys  Pointer to HPI subsystem handle
hTuner  Control to query
dwIndex  Index for possible deemphasis values
band  Band for which to query deemphasis
pdwDeemphasis  deemphasis in us

HPI_ERR HPI_Tuner_SetDeemphasis HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwDeemphasis
 

Set the audio de-emphasis.

Not all tuners support de-emphasis. USA FM channels require de-emphasis of 75 usec, while Europe requires 50 usec. Some AM tuners may also have a deemphasis setting.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
dwDeemphasis  Pre-emphasis - 0, 50 or 75 (usec)

HPI_ERR HPI_Tuner_GetDeemphasis HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwDeemphasis
 

Get the audio de-emphasis setting.

Not all tuners support de-emphasis.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pdwDeemphasis  Returns pre-emphasis value of, 0, 50 or 75 (usec)

HPI_ERR HPI_API HPI_Tuner_QueryProgram const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hTuner,
HW32 *  pbitmapProgram
 

Get bitmap of programmes supported by this tuner.

Parameters:
phSubSys  Pointer to HPI subsystem handle
hTuner  Control to query
pbitmapProgram  Tuner program bitfield

HPI_ERR HPI_API HPI_Tuner_SetProgram HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwProgram
 

Sets the tuner program.

Certain tuners and transmitting stations support multipe programs on a single tuner frequency. This API allows the user to set the program number on the currently tuned channel. HDRadio transmissions in the USA are a good example of a transmission protocol that supports multiple programs on a single frequency. See HPI_ControlQuery() documentation for how to find the list of supported programs.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
dwProgram  Program number to set. Range is 0-7.

HPI_ERR HPI_API HPI_Tuner_GetProgram HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwProgram
 

Gets the tuner program.

Certain tuners and transmitting stations support multipe programs on a single tuner frequency. This API allows the user to get the current program number on the currently tuned channel. HDRadio transmissions in the USA are a good example of a transmission protocol that supports multiple programs on a single frequency.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pdwProgram  Returns current program. Range is 0-7.

HPI_ERR HPI_API HPI_Tuner_GetHdRadioDspVersion HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
char *  pszDspVersion,
const HW32  dwStringSize
 

Gets the DSP firmware verison of an HD Radio tuner.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pszDspVersion  Returns current version of DSP software running on the tuner.
dwStringSize  Length on the string in bytes.

HPI_ERR HPI_API HPI_Tuner_GetHdRadioSdkVersion HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
char *  pszSdkVersion,
const HW32  dwStringSize
 

Gets the SDK firmware verison of an HD Radio tuner.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pszSdkVersion  Returns current version of SDK software running on the tuner.
dwStringSize  Length on the string in bytes.

HPI_ERR HPI_Tuner_GetVideoStatus HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16 *  pwStatus
 

Get the video status of a tuner input.

Deprecated:
This function has been superceded by HPI_Tuner_GetStatus()
Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pwStatus  A bitfield with the following bits HPI_TUNER_VIDEO_COLOR_PRESENT, HPI_TUNER_VIDEO_HORZ_SYNC_MISSING,HPI_TUNER_VIDEO_IS_60HZ.

HPI_ERR HPI_Tuner_GetStatus HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16 *  pwStatusMask,
HW16 *  pwStatus
 

Get the status of various Boolean attributes of a tuner control.

The pwStatusMask returns which bits in wStatus are valid, as not all tuners support all the status attributes.

Parameters:
phSubSys HPI subsystem handle.
hControl Handle to tuner control.
*pwStatusMask A returned bitfield indicating which of the bits in pwStatus contain valid status information. See Tuner status fields for valid bit settings.
*pwStatus A returned bitfield containing current status flags. See Tuner status fields for bit meanings.
Returns:
0 on success, or one of the HPI Error codes.

HPI_ERR HPI_Tuner_SetMode HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  nMode,
HW32  nValue
 

This function turns off the RSS (FM FR level reading) capability for the specified tuner.

This only applies to certain bands on certain tuners. ASI87xx - Supports this function.
ASI89xx with ASI1711 tuner - Does not support this function. It will return HPI_ERROR_INVALID_CONTROL_ATTRIBUTE.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
nMode  Currently only supports HPI_TUNER_MODE_RSS.
nValue  Should be set to either HPI_TUNER_MODE_RSS_DISABLE or HPI_TUNER_MODE_RSS_ENABLE.

HPI_ERR HPI_Tuner_GetMode HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  nMode,
HW32 *  pnValue
 

Get the current tuner mode.

Currently supports checking whether RSS is enabled or disabled. There are some dependancies across adapters for this function.
ASI87xx - Supports this function.
ASI89xx with ASI1711 tuner - RSS is always enabled. This function will return HPI_ERROR_INVALID_CONTROL_ATTRIBUTE.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
nMode  Currently only supports HPI_TUNER_MODE_RSS.
pnValue  Returned value is either HPI_TUNER_MODE_RSS_DISABLE or HPI_TUNER_MODE_RSS_ENABLE.

HPI_ERR HPI_API HPI_Tuner_GetHdRadioSignalQuality HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwQuality
 

Get the digital signal quality from an HDRadio tuner.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pdwQuality  Pointer to returned HDRadio signal quality.

HPI_ERR HPI_Tuner_GetRDS HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
char *  pData
 

Get tuner RDS data.

Returns RDS data if there is any. ASI87xx - Does not support this function.
ASI89xx with ASI1711 tuner - Does support this function.

Returns:
0 on success, or one of the HPI Error codes.
Return values:
HPI_ERROR_BUFFER_EMPTY if the RDS buffer is now empty.
Parameters:
phSubSys  HPI subsystem handle.
hControl  Handle to tuner control.
pData  pointer to 12 element array for returned RDS data


Generated on Tue Nov 18 12:59:31 2008 for AudioScience HPI by  doxygen 1.4.6-NO