Intel IXP400 Car Stereo System User Manual


 
Intel
®
IXP400 Digital Signal Processing (DSP) Software Version 2.5
Configuration and Initialization
API Reference Manual 41
Warning: New tone definition must be added during the initialization after
xDspSysInit(). The pre-
defined country-specific call progress tone will be overwritten if a new tone is added with the same
tone ID.
8.3 Adding Tones to Tone Detector
Description
This function adds a criterion for the Tone Detector to detect a new tone. The criterion specify the
qualification ranges to a set of parameters defined as:
typedef struct {
UINT16 repCount;
/* repetition number of the segment. 0 means to repeat forever */
UINT16 segType; /* signal type (single or dual frequency wave or AM wave ) */
UINT32 durationOn; /* active duration in 1-ms unit. */
UINT32 durationOff;/* silence duration in 1-ms unit. */
INT16 freqA; /* 1st frequency if single or dual frequency wave,
or the modulated carry frequency if AM wave, in 1Hz unit*/
INT16 freqB; /* 2nd frequency if dual frequency wave
or the modulating frequency if AM wave,
ignored if single frequency wave */
INT16 ampA; /* amplitude of frequency A above, (0~ – 45 in 1dBm unit) */
INT16 ampB; /* amplitude of frequency B if dual frequency wave,
or modulation rate if AM wave (0~100 in 1% unit),
ignored if single frequency wave */
UINT16 mode; /* mode, overwrite or mix over the Decoder output */
INT16 nextSeg; /* the index of next segment relative to the current segement.
e.g., 1 means to go the following segment,
0 means repeat the current segment,
–2 means go back to previous 2 segments.
XTG_LASTSEG means end-of-tone */
} XTGToneSeg_t;
Prototype
Status_t xBuildToneTD(UINT8 toneId, XTDToneInfo_t
*pToneInfo, UINT32 *pErrCode);
Input
toneId – Tone ID, must be in the range of 16 ~ 255
pToneInfo — Tone detection criterion information
Output
pErrCode – Error code if errors
Return
XSUCC if successful
Otherwise
XERROR