ASX Version4.20.14
Functions

Tuner control functions

These functions support tuner operations. More...

Functions

ASX32_API ASX_ERROR ASX_Tuner_EnumerateBand (ASX_HANDLE hTuner, const int nIndex, enum asxTUNERBAND *peBand, int *pnCount)
 Enumerate each tuner band option.
ASX32_API ASX_ERROR ASX_Tuner_GetBand (ASX_HANDLE hTuner, enum asxTUNERBAND *peBand)
 Get the tuner band.
ASX32_API ASX_ERROR ASX_Tuner_SetBand (ASX_HANDLE hTuner, const enum asxTUNERBAND eBand)
 Set the tuner band.
ASX32_API ASX_ERROR ASX_Tuner_SetFrequency (ASX_HANDLE hTuner, const unsigned long nFreq)
 Set the tuner frequency.
ASX32_API ASX_ERROR ASX_Tuner_GetFrequency (ASX_HANDLE hTuner, unsigned long *plFreq)
 Get the tuner frequency.
ASX32_API ASX_ERROR ASX_Tuner_GetFrequencyRange (ASX_HANDLE hTuner, const enum asxTUNERBAND eBand, unsigned long *plMin, unsigned long *plMax, unsigned long *plStep)
 Get the tuner frequency range in Hz.
ASX32_API ASX_ERROR ASX_Tuner_GetGainRange (ASX_HANDLE hTuner, float *fMin, float *fMax, float *fStep)
 Get the tuner gain range (in dB).
ASX32_API ASX_ERROR ASX_Tuner_SetGain (ASX_HANDLE hTuner, const float fTunerGain)
 Set the tuner gain.
ASX32_API ASX_ERROR ASX_Tuner_GetGain (ASX_HANDLE hTuner, float *pfTunerGain)
 Get the tuner gain.
ASX32_API ASX_ERROR ASX_Tuner_GetRFLevel (ASX_HANDLE hTuner, float *nRFLevel)
 Get the tuner RF level.
ASX32_API ASX_ERROR ASX_Tuner_GetRawRFLevel (ASX_HANDLE hTuner, int *nRawRFLevel)
 Get the Raw tuner RF level.
ASX32_API ASX_ERROR ASX_Tuner_GetStatus (ASX_HANDLE hTuner, unsigned int *puErrorStatusMask, unsigned int *puErrorStatus)
 Get the tuner status.
ASX32_API ASX_ERROR ASX_Tuner_GetMode (ASX_HANDLE hTuner, const enum asxTUNERMODE eMode, enum asxTUNERMODE *peSetting)
 Gets the tuner mode.
ASX32_API ASX_ERROR ASX_Tuner_SetMode (ASX_HANDLE hTuner, const enum asxTUNERMODE eMode, const enum asxTUNERMODE eSetting)
 Sets the tuner mode.
ASX32_API ASX_ERROR ASX_Tuner_EnumerateDeemphasis (ASX_HANDLE hTuner, const int nIndex, enum asxTUNERDEEMPHASIS *peDeemphasis, int *pnCount)
 Enumerates tuner de-emphasis options.
ASX32_API ASX_ERROR ASX_Tuner_SetDeemphasis (ASX_HANDLE hTuner, const enum asxTUNERDEEMPHASIS eDeemphasis)
 Set tuner de-emphasis.
ASX32_API ASX_ERROR ASX_Tuner_GetDeemphasis (ASX_HANDLE hTuner, enum asxTUNERDEEMPHASIS *peDeemphasis)
 Get tuner de-emphasis.
ASX32_API ASX_ERROR ASX_Tuner_EnumerateProgram (ASX_HANDLE hTuner, const int nIndex, enum asxTUNERPROGRAM *peProgram, int *pnCount)
 Enumerates tuner program options.
ASX32_API ASX_ERROR ASX_Tuner_SetProgram (ASX_HANDLE hTuner, const enum asxTUNERPROGRAM eProgram)
 Set tuner program.
ASX32_API ASX_ERROR ASX_Tuner_GetProgram (ASX_HANDLE hTuner, enum asxTUNERPROGRAM *peProgram)
 Get tuner program.
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioSignalQuality (ASX_HANDLE hTuner, int *pnSignalQuality)
ASX32_API ASX_ERROR ASX_Tuner_GetDigitalSignalQuality (ASX_HANDLE hTuner, int *pnSignalQuality)
 Get digital signal quality.
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioSdkVersion (ASX_HANDLE hTuner, char *szSdkVersion, const int nStringLength)
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioDspVersion (ASX_HANDLE hTuner, char *szSdkVersion, const int nStringLength)
ASX32_API ASX_ERROR ASX_Tuner_GetFirmwareVersion (ASX_HANDLE hTuner, char *szFirmwareVersion, const int nStringLength)
 Get a Firmware version string.
ASX32_API ASX_ERROR ASX_Tuner_EnumerateHdBlend (ASX_HANDLE hTuner, const int nIndex, enum asxTUNERHDBLEND *peBlend, int *pnCount)
 Enumerates tuner blend options.
ASX32_API ASX_ERROR ASX_Tuner_SetHdBlend (ASX_HANDLE hTuner, const enum asxTUNERHDBLEND nMode)
 Set a HD Radio tuner to analog only or auto switch.
ASX32_API ASX_ERROR ASX_Tuner_GetHdBlend (ASX_HANDLE hTuner, enum asxTUNERHDBLEND *pnMode)
 Get a HD Radio tuner analog or digital blend.
ASX32_API ASX_ERROR ASX_Tuner_GetDabMultiplexName (ASX_HANDLE hTuner, char *szMultiplexName, const int nSize)
 Get a DAB Multiplex Name.
ASX32_API ASX_ERROR ASX_Tuner_GetDabMultiplexId (ASX_HANDLE hTuner, unsigned long *dwMultiplexId)
 Get a DAB Multiplex ID.
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioServiceCount (ASX_HANDLE hTuner, int *pnIndex, int *pnCount)
 Get Number of Dab Audio Services.
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioServiceName (ASX_HANDLE hTuner, char *szAudioServiceName, const int nSize, const int nIndex)
 Get a DAB Audio Service.
ASX32_API ASX_ERROR ASX_Tuner_SetDabAudioService (ASX_HANDLE hTuner, const int nIndex)
 Set a DAB Audio Service.
ASX32_API ASX_ERROR ASX_Tuner_GetDabServiceId (ASX_HANDLE hTuner, unsigned long *dwServiceId)
 Get a DAB Service ID.
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioInfo (ASX_HANDLE hTuner, char *szAudioInfo, const int nSize)
 Get a DAB audio information.

Detailed Description

These functions support tuner operations.


Function Documentation

ASX32_API ASX_ERROR ASX_Tuner_EnumerateBand ( ASX_HANDLE  hTuner,
const int  nIndex,
enum asxTUNERBAND peBand,
int *  pnCount 
)

Enumerate each tuner band option.

Parameters:
hTunerA handle to an ASX tuner control.
nIndexThe index of the tuner band option to fetch.
peBandThe returned tuner band option.
pnCountThe total number of available tuner bands.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_EnumerateDeemphasis ( ASX_HANDLE  hTuner,
const int  nIndex,
enum asxTUNERDEEMPHASIS peDeemphasis,
int *  pnCount 
)

Enumerates tuner de-emphasis options.

Parameters:
hTunerA handle to an ASX tuner control.
nIndexThe number of the de-emphasis setting to retrieve.
peDeemphasisThe de-emphasis option.
pnCountThe total number of de-emphasis options.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_EnumerateHdBlend ( ASX_HANDLE  hTuner,
const int  nIndex,
enum asxTUNERHDBLEND peBlend,
int *  pnCount 
)

Enumerates tuner blend options.

The API only supports HDRadio in the USA.

Parameters:
hTunerA handle to an ASX tuner control.
nIndexThe number of the blend settings to retrieve.
peBlendThe program option.
pnCountThe total number of program options.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_EnumerateProgram ( ASX_HANDLE  hTuner,
const int  nIndex,
enum asxTUNERPROGRAM peProgram,
int *  pnCount 
)

Enumerates tuner program options.

The API only supports HDRadio in the USA.

Parameters:
hTunerA handle to an ASX tuner control.
nIndexThe number of the program setting to retrieve.
peProgramThe program option.
pnCountThe total number of program options.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetBand ( ASX_HANDLE  hTuner,
enum asxTUNERBAND peBand 
)

Get the tuner band.

Parameters:
hTunerA handle to an ASX tuner control.
peBandThe returned tuner band. This must be one of the options returned by calls to ASX_Tuner_EnumerateBand().
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioInfo ( ASX_HANDLE  hTuner,
char *  szAudioInfo,
const int  nSize 
)

Get a DAB audio information.

Parameters:
hTunerA handle to an ASX tuner control.
szAudioInfoa string to return info about the audio service, such as bitrate, mode
nSizeMax size of string
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioServiceCount ( ASX_HANDLE  hTuner,
int *  pnIndex,
int *  pnCount 
)

Get Number of Dab Audio Services.

Parameters:
hTunerA handle to an ASX tuner control.
pnIndexCurrent index selected
pnCountNumber of available services
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioServiceName ( ASX_HANDLE  hTuner,
char *  szAudioServiceName,
const int  nSize,
const int  nIndex 
)

Get a DAB Audio Service.

Parameters:
hTunerA handle to an ASX tuner control.
szAudioServiceNameString containing audio service name
nSizeMax size of string
nIndexIndex of service to get
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDabMultiplexId ( ASX_HANDLE  hTuner,
unsigned long *  dwMultiplexId 
)

Get a DAB Multiplex ID.

Parameters:
hTunerA handle to an ASX tuner control.
dwMultiplexIdunsigned long to return Multiplex Id
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDabMultiplexName ( ASX_HANDLE  hTuner,
char *  szMultiplexName,
const int  nSize 
)

Get a DAB Multiplex Name.

Parameters:
hTunerA handle to an ASX tuner control.
szMultiplexNameString containing audio service name
nSizeMax size of string
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDabServiceId ( ASX_HANDLE  hTuner,
unsigned long *  dwServiceId 
)

Get a DAB Service ID.

Parameters:
hTunerA handle to an ASX tuner control.
dwServiceIdunsigned long to return the DAB audio service Id
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDeemphasis ( ASX_HANDLE  hTuner,
enum asxTUNERDEEMPHASIS peDeemphasis 
)

Get tuner de-emphasis.

Parameters:
hTunerA handle to an ASX tuner control.
peDeemphasisThe returned de-emphasis value.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetDigitalSignalQuality ( ASX_HANDLE  hTuner,
int *  pnSignalQuality 
)

Get digital signal quality.

The API supports HDRadio in the USA and DAB elsewhere.

Parameters:
hTunerA handle to an ASX tuner control.
pnSignalQualitythe returned signal quality between 0(poor)..6(excellent).
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetFirmwareVersion ( ASX_HANDLE  hTuner,
char *  szFirmwareVersion,
const int  nStringLength 
)

Get a Firmware version string.

Parameters:
hTunerA handle to an ASX tuner control.
szFirmwareVersionthe returned FW Version string
nStringLengthlength of string being passed in
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetFrequency ( ASX_HANDLE  hTuner,
unsigned long *  plFreq 
)

Get the tuner frequency.

Parameters:
hTunerA handle to an ASX tuner control.
plFreqThe returned frequency.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Note:
The tuner frequency may not change immediately. It may take up to 300ms to change. To determine when the frequency has changed, call ASX_Tuner_GetFrequency() until it returns the new frequency.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_GetFrequencyRange ( ASX_HANDLE  hTuner,
const enum asxTUNERBAND  eBand,
unsigned long *  plMin,
unsigned long *  plMax,
unsigned long *  plStep 
)

Get the tuner frequency range in Hz.

Parameters:
hTunerA handle to an ASX tuner control.
eBandBand to get frequency range of.
plMinThe returned minimum frequency in Hz.
plMaxThe returned maximum frequency in Hz.
plStepThe returned frequency step in Hz.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetGain ( ASX_HANDLE  hTuner,
float *  pfTunerGain 
)

Get the tuner gain.

Parameters:
hTunerA handle to an ASX tuner control.
pfTunerGainThe returned gain in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_GetGainRange ( ASX_HANDLE  hTuner,
float *  fMin,
float *  fMax,
float *  fStep 
)

Get the tuner gain range (in dB).

Some tuners controls support a gain adjustment and this control will retunn the range of gain settings supported.

Parameters:
hTunerA handle to an ASX tuner control.
fMinThe returned minimum gain in dB.
fMaxThe returned maximum gain in dB.
fStepThe returned gain step in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_GetHdBlend ( ASX_HANDLE  hTuner,
enum asxTUNERHDBLEND pnMode 
)

Get a HD Radio tuner analog or digital blend.

Parameters:
hTunerA handle to an ASX tuner control.
pnMode0 is automatic switch to digital, 1 is analog only.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioDspVersion ( ASX_HANDLE  hTuner,
char *  szSdkVersion,
const int  nStringLength 
)
Deprecated:
This function has been superseded by ASX_Tuner_GetFirmwareVersion()
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioSdkVersion ( ASX_HANDLE  hTuner,
char *  szSdkVersion,
const int  nStringLength 
)
Deprecated:
This function has been superseded by ASX_Tuner_GetFirmwareVersion()
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioSignalQuality ( ASX_HANDLE  hTuner,
int *  pnSignalQuality 
)
Deprecated:
This function has been superseded by ASX_Tuner_GetDigitalSignalQuality()
ASX32_API ASX_ERROR ASX_Tuner_GetMode ( ASX_HANDLE  hTuner,
const enum asxTUNERMODE  eMode,
enum asxTUNERMODE peSetting 
)

Gets the tuner mode.

Currently this can only be used for turning the RSS level reading on and off on an MT4039 tuner.

Parameters:
hTunerA handle to an ASX tuner control.
eModeThe only valid parameter for this call is asxTUNERMODE_RSS.
peSettingReturns the mode setting. Only current valid values are asxTUNERMODE_RSS_ENABLE or asxTUNERMODE_RSS_DISABLE.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetProgram ( ASX_HANDLE  hTuner,
enum asxTUNERPROGRAM peProgram 
)

Get tuner program.

The API only supports HDRadio in the USA.

Parameters:
hTunerA handle to an ASX tuner control.
peProgramThe returned program setting.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetRawRFLevel ( ASX_HANDLE  hTuner,
int *  nRawRFLevel 
)

Get the Raw tuner RF level.

Parameters:
hTunerA handle to an ASX tuner control.
nRawRFLevelThe returned Raw RF level in whatever units the tuner supports.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_GetRFLevel ( ASX_HANDLE  hTuner,
float *  nRFLevel 
)

Get the tuner RF level.

Parameters:
hTunerA handle to an ASX tuner control.
nRFLevelThe returned RF level in dBuV.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_GetStatus ( ASX_HANDLE  hTuner,
unsigned int *  puErrorStatusMask,
unsigned int *  puErrorStatus 
)

Get the tuner status.

This function gets the tuner status and indicates which bits are valid for the current status reading.

Parameters:
hTunerA handle to an ASX tuner control.
puErrorStatusMaskThe returned status mask. This mask indicates which status bits are valid in puErrorStatus. Bits are defined by asxTUNER_STATUS.
puErrorStatusThe returned status bits.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_SetBand ( ASX_HANDLE  hTuner,
const enum asxTUNERBAND  eBand 
)

Set the tuner band.

Parameters:
hTunerA handle to an ASX tuner control.
eBandThe tuner band to set. This must be one of the options returned by calls to ASX_Tuner_EnumerateBand().
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_SetDabAudioService ( ASX_HANDLE  hTuner,
const int  nIndex 
)

Set a DAB Audio Service.

Parameters:
hTunerA handle to an ASX tuner control.
nIndexIndex of service to tune to
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_SetDeemphasis ( ASX_HANDLE  hTuner,
const enum asxTUNERDEEMPHASIS  eDeemphasis 
)

Set tuner de-emphasis.

Parameters:
hTunerA handle to an ASX tuner control.
eDeemphasisThe de-emphasis value to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_SetFrequency ( ASX_HANDLE  hTuner,
const unsigned long  nFreq 
)

Set the tuner frequency.

This function sets the tuner frequency subject to the allowable range of frequencies for the current tuner band setting.

Parameters:
hTunerA handle to an ASX tuner control.
nFreqThe frequency to set in kHz.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Note:
The tuner band may not change immediately. It may take up to 300ms to change. To determine when the band has changed, call ASX_Tuner_GetBand() until it returns the new band.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_SetGain ( ASX_HANDLE  hTuner,
const float  fTunerGain 
)

Set the tuner gain.

Parameters:
hTunerA handle to an ASX tuner control.
fTunerGainThe gain to set in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.
ASX32_API ASX_ERROR ASX_Tuner_SetHdBlend ( ASX_HANDLE  hTuner,
const enum asxTUNERHDBLEND  nMode 
)

Set a HD Radio tuner to analog only or auto switch.

Parameters:
hTunerA handle to an ASX tuner control.
nMode0 is automatic switch to digital, 1 is analog only.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_SetMode ( ASX_HANDLE  hTuner,
const enum asxTUNERMODE  eMode,
const enum asxTUNERMODE  eSetting 
)

Sets the tuner mode.

Currently this can only be used for turning the RSS level reading on and off on an MT4039 tuner.

Parameters:
hTunerA handle to an ASX tuner control.
eModeThe only valid parameter for this call is asxTUNERMODE_RSS.
eSettingThe mode setting. Only current valid values are asxTUNERMODE_RSS_ENABLE or asxTUNERMODE_RSS_DISABLE.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Tuner_SetProgram ( ASX_HANDLE  hTuner,
const enum asxTUNERPROGRAM  eProgram 
)

Set tuner program.

To The API only supports HDRadio in the USA.

Parameters:
hTunerA handle to an ASX tuner control.
eProgramThe program to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.