AudioScience HPI Version_4.24.1
Defines | Functions

PAD Control

Controls

The PAD control supports the reading of "Program Associated Data" from a tuner node. More...

Defines

#define HPI_PAD_CHANNEL_NAME_LEN   16
 The text string containing the station/channel combination.
#define HPI_PAD_ARTIST_LEN   64
 The text string containing the artist.
#define HPI_PAD_TITLE_LEN   64
 The text string containing the title.
#define HPI_PAD_COMMENT_LEN   256
 The text string containing the comment.
#define HPI_PAD_PROGRAM_TYPE_INVALID   0xffff
 The PTY when the tuner has not received any PTY.

Functions

hpi_err_t HPI_PAD_GetChannelName (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, char *pszString, const uint32_t dwDataLength)
 Get an tuners's HD-Radio station name.
hpi_err_t HPI_PAD_GetArtist (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, char *pszString, const uint32_t dwDataLength)
 Get tuner's PAD artist information.
hpi_err_t HPI_PAD_GetTitle (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, char *pszString, const uint32_t dwDataLength)
 Get tuner's PAD title information.
hpi_err_t HPI_PAD_GetComment (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, char *pszString, const uint32_t dwDataLength)
 Get tuner's PAD comment information.
hpi_err_t HPI_PAD_GetProgramType (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwPTY)
 Get tuner's PAD program type (PTY).
hpi_err_t HPI_PAD_GetRdsPI (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwPI)
 Get tuner's PAD RDS program identification (PI).
hpi_err_t HPI_PAD_GetProgramTypeString (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, const uint32_t dwDataType, const uint32_t nPTY, char *pszData, const uint32_t dwDataLength)
 Translate tuner's PTY into a string.

Detailed Description

The PAD control supports the reading of "Program Associated Data" from a tuner node.

It supports Radio Data System (RDS) in FM analog mode and Program Services Data (PSD) in HD-Radio mode.

For DAB PAD data support, see the HPI_Tuner_DAB functions


Define Documentation

#define HPI_PAD_CHANNEL_NAME_LEN   16

The text string containing the station/channel combination.

#define HPI_PAD_ARTIST_LEN   64

The text string containing the artist.

#define HPI_PAD_TITLE_LEN   64

The text string containing the title.

#define HPI_PAD_COMMENT_LEN   256

The text string containing the comment.

#define HPI_PAD_PROGRAM_TYPE_INVALID   0xffff

The PTY when the tuner has not received any PTY.

Referenced by HPI_PAD_GetProgramTypeString().


Function Documentation

hpi_err_t HPI_PAD_GetChannelName ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
char *  pszString,
const uint32_t  dwDataLength 
)

Get an tuners's HD-Radio station name.

This function returns:

  • nothing when the tuner is in FM analog mode
  • Station name when the tuner is in HD-Radio mode
    Returns:
    0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
pszStringPointer to channel/station name string buffer.
dwDataLengthThe length of the passed in pszString in bytes. Minimum length is HPI_PAD_CHANNEL_NAME_LEN.
hpi_err_t HPI_PAD_GetArtist ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
char *  pszString,
const uint32_t  dwDataLength 
)

Get tuner's PAD artist information.

This function returns:

  • RDS RT field when the tuner is in FM analog mode
  • Artist field when the tuner is in HD-Radio mode
    Returns:
    0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
pszStringPointer to artist string buffer.
dwDataLengthThe length of the passed in pszString in bytes. Minimum length is HPI_PAD_ARTIST_LEN.
hpi_err_t HPI_PAD_GetTitle ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
char *  pszString,
const uint32_t  dwDataLength 
)

Get tuner's PAD title information.

This function returns:

  • RDS PS field when the tuner is in FM analog mode
  • Title field when the tuner is in HD-Radio mode
    Returns:
    0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
pszStringPointer to title string buffer.
dwDataLengthThe length of the passed in pszData in bytes. Minimum length is HPI_PAD_TITLE_LEN.
hpi_err_t HPI_PAD_GetComment ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
char *  pszString,
const uint32_t  dwDataLength 
)

Get tuner's PAD comment information.

Note:
This function is unimplemented.
Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
pszStringPointer to comment string buffer.
dwDataLengthThe length of the passed in pszData in bytes. Minimum length is HPI_PAD_COMMENT_LEN.
hpi_err_t HPI_PAD_GetProgramType ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwPTY 
)

Get tuner's PAD program type (PTY).

This function returns:

  • RDS PTY field when the tuner is in FM analog mode
  • Station Type when the tuner is in HD-Radio mode

If the PTY field has not been set by the tuner, HPI_PAD_PROGRAM_TYPE_INVALID (0xffff) is returned.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
pdwPTYPointer to returned Program Type.
hpi_err_t HPI_PAD_GetRdsPI ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwPI 
)

Get tuner's PAD RDS program identification (PI).

This function returns:

  • RDS PI when the tuner is in FM analog and HD-Radiomode
Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
pdwPIPointer to returned Program Identification.
hpi_err_t HPI_PAD_GetProgramTypeString ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
const uint32_t  dwDataType,
const uint32_t  nPTY,
char *  pszData,
const uint32_t  dwDataLength 
)

Translate tuner's PTY into a string.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to PAD control.
dwDataTypeData type. One of eHPI_RDS_type.
nPTYThe PTY value to translate.
pszDataPointer to the returned data string.
dwDataLengthString length. Should be 32 or larger.

References HPI_ERROR_INVALID_OPERATION, HPI_PAD_PROGRAM_TYPE_INVALID, and HPI_RDS_Get_PTY_Translate().