2007年2月5日 星期一

Vinetic 2cpe v2.2

drv_tapi-3.5.1

CFLAGS="-O2 -G 0" ./configure --host=mipsel-linux --target=mipsel-linux --enable-warnings --enable-obsolete-bitfield-event-interface --enable-module --enable-kernelincl=/home/gigijoe/ECS040/linux_2_4_31/include --cache-file=/dev/null

drv_vinetic-1.2.6

CFLAGS="-O2 -G 0" ./configure --host=mipsel-linux --target=mipsel-linux --enable-warnings --enable-spi --disable-udp-redirect --enable-kernelincl=/home/gigijoe/ECS040/linux_2_4_31/include --enable-boardname=AM5120 --disable-v1 --with-access-mode=INTEL_DEMUX --with-access-width=8 --enable-2cpe --with-max-devices=1 --enable-trace --enable-obsolete-premapping --enable-tapiincl=/home/gigijoe/ECS040/Vinetic_BSP/drv_tapi-3.5.1/src/ --cache-file=/dev/null


drv_vinetic-1.1.20

< src/tapi/src/drv_tapi_io.h >

/** TAPI phone volume control */

/** Switch the phone off */
#define IFX_TAPI_LINE_VOLUME_OFF (0xFF)
/** Switch the volume to low, -24 dB */
#define IFX_TAPI_LINE_VOLUME_LOW (-24)
/** Switch the volume to medium, 0 dB */
#define IFX_TAPI_LINE_VOLUME_MEDIUM (0)
/** Switch the volume to high, 24 dB */
#define IFX_TAPI_LINE_VOLUME_HIGH (24)

/** TAPI Lec control */

/** LEC delay line maximum length */
#define IFX_TAPI_LEC_LEN_MAX (16)
/** LEC delay line minimum length */
#define IFX_TAPI_LEC_LEN_MIN (4)


< src/drv_vinetic_tapi.c >


/**
Set the phone volume
\param pChannel Handle to TAPI_CONNECTION structure
\param pVol Handle to IFX_TAPI_LINE_VOLUME_t structure
\return Return value according to IFX_return_t
- IFX_ERROR if an error occured
- IFX_SUCCESS if successful
\remarks
Gain Parameter are given in 'dB'. The range is -24dB ... 24dB.
*/
IFX_return_t TAPI_LL_Phone_Volume (TAPI_CONNECTION *pChannel,
IFX_TAPI_LINE_VOLUME_t const *pVol)
{
IFX_int32_t ret;
IFX_uint8_t ch = pChannel->nChannel;
IFX_boolean_t bALM_mute = IFX_FALSE;
VINETIC_DEVICE *pDev = (VINETIC_DEVICE *)pChannel->pDevice;

/* range check, cos gain var is integer */
if ((pVol->nGainTx < (IFX_TAPI_LINE_VOLUME_LOW)) ||
(pVol->nGainTx > IFX_TAPI_LINE_VOLUME_HIGH) ||
(pVol->nGainRx < (IFX_TAPI_LINE_VOLUME_LOW)) ||
(pVol->nGainRx > IFX_TAPI_LINE_VOLUME_HIGH))
{
/* parameter are out of supported range */

if ((pVol->nGainRx == IFX_TAPI_LINE_VOLUME_OFF) &&
(pVol->nGainTx == IFX_TAPI_LINE_VOLUME_OFF))
{
/* special case: mute the interface with both parameter set to
IFX_TAPI_LINE_VOLUME_OFF */
bALM_mute = IFX_TRUE;
}
else
{
LOG (TAPI_DRV,DBG_LEVEL_HIGH,
("\n\rDRV_ERROR: Volume Gain out of range!\n\r"));
return IFX_ERROR;
}
}

/* protect fw msg */
IFXOS_MutexLock (pDev->memberAcc);

if (bALM_mute == IFX_FALSE)
{
/* get actual settings into local var */
pDev->pAlmCh[ch].ali_ch.bit.gain_x =
(IFX_uint32_t)VINETIC_AlmPcmGain [pVol->nGainTx + 24];
pDev->pAlmCh[ch].ali_ch.bit.gain_r =
(IFX_uint32_t)VINETIC_AlmPcmGain [pVol->nGainRx + 24];
pDev->pAlmCh[ch].ali_ch.bit.en = 1;
}
else
{
/* mute the interface */
pDev->pAlmCh[ch].ali_ch.bit.en = 0;
}

/* write local configuration if */
ret = CmdWrite (pDev, pDev->pAlmCh[ch].ali_ch.value, CMD_ALM_CH_LEN);
/* release lock */
IFXOS_MutexUnlock (pDev->memberAcc);

/* SetTraceLevel (VINETIC, DBG_LEVEL_HIGH); */

return (ret == IFX_SUCCESS) ? IFX_SUCCESS : IFX_ERROR;
}


drv_tapi-3.5.1

< src/drv_tapi_io.h >

/** TAPI phone volume control */
/** Switch the volume to low, -12 dB */
#define IFX_TAPI_LINE_VOLUME_LOW (-12)
/** Switch the volume to medium, -6 dB */
#define IFX_TAPI_LINE_VOLUME_MEDIUM (-6)
/** Switch the volume to high, 0 dB */
#define IFX_TAPI_LINE_VOLUME_HIGH (0)
/** Switch the volume to minimum gain, -24 dB, note that DTMF detection etc
might not work properly on such low signgals */
#define IFX_TAPI_LINE_VOLUME_MIN_GAIN (-24)
/** Switch the volume to maximum gain, +24 dB */
#define IFX_TAPI_LINE_VOLUME_MAX_GAIN (24)


/** TAPI Lec control */

/** LEC delay line maximum length */
#define IFX_TAPI_LEC_LEN_MAX (16)
/** LEC delay line minimum length */
#define IFX_TAPI_LEC_LEN_MIN (4)


drv_vinetic-1.2.6


< src/drv_vinetic_pcm.c >


/**
Sets the PCM interface volume.
\param pChannel Handle to TAPI_CHANNEL structure
\param pVol Handle to IFX_TAPI_LINE_VOLUME_t structure
\return Return value according to IFX_return_t
- IFX_ERROR if an error occured
- IFX_SUCCESS if successful
\remarks
Gain Parameter are given in 'dB'. The range is -24dB ... 24dB.
*/
IFX_return_t IFX_TAPI_LL_PCM_Volume_Set (IFX_TAPI_LL_CH_t *pLLChannel,
IFX_TAPI_LINE_VOLUME_t const *pVol)
{
IFX_int32_t ret;
VINETIC_CHANNEL *pCh = (VINETIC_CHANNEL *) pLLChannel;
VINETIC_DEVICE *pDev = (VINETIC_DEVICE*) (pCh->pParent);

/* range check, cos gain var is integer */
if ((pVol->nGainTx < (IFX_TAPI_LINE_VOLUME_LOW)) ||
(pVol->nGainTx > IFX_TAPI_LINE_VOLUME_HIGH) ||
(pVol->nGainRx < (IFX_TAPI_LINE_VOLUME_LOW)) ||
(pVol->nGainRx > IFX_TAPI_LINE_VOLUME_HIGH))
{
/* parameter are out of supported range */
TRACE (VINETIC,DBG_LEVEL_HIGH,
("\n\rDRV_ERROR: Volume Gain out of range for PCM!\n\r"));
return IFX_ERROR;
}

/* protect fw msg */
IFXOS_MutexLock (pDev->memberAcc);

/* get actual settings into local var */
pCh->pPCM->fw_pcm_ch.bit.gain_1 = (IFX_uint32_t)VINETIC_AlmPcmGain [pVol->nGainTx + 24];
pCh->pPCM->fw_pcm_ch.bit.gain_2 = (IFX_uint32_t)VINETIC_AlmPcmGain [pVol->nGainRx + 24];
pCh->pPCM->fw_pcm_ch.bit.en = 1;

/* write local configuration if */
ret = CmdWrite (pDev, pCh->pPCM->fw_pcm_ch.value, CMD_PCM_CH_LEN);
/* release lock */
IFXOS_MutexUnlock (pDev->memberAcc);

return ret;
}


沒有留言:

張貼留言