コード例 #1
0
/*--------------------------------------------------------------------------
int8 tunrbb_drv_fc8050_stop(void)
    (1)   Stopping the FC8050 Chip Operation 
    (2)   Return Value
           Sucess : 1
           Fail : 0 or negative interger (If there is error code)
    (3)   Argument
           VOID
---------------------------------------------------------------------------- */
int8	tunerbb_drv_fc8050_stop(void)
{
	uint8 res;
	
	res=BBM_AUDIO_DESELECT(0, 0, DAB_SVC_ID);
	res|=BBM_VIDEO_DESELECT(0, 0, DMB_SVC_ID, 0);
	res|=BBM_VIDEO_DESELECT(0, 0, DMB_SVC_ID+1, 1);
	res|=BBM_DATA_DESELECT(0, 0, DAT_SVC_ID);
	
#if !defined(STREAM_TS_UPLOAD)
	memset((void*)&g_chinfo, 0xff, sizeof(g_chinfo));
	memset((void*)&msc_buffer, 0x00, sizeof(DATA_BUFFER));
	memset((void*)&fic_buffer, 0x00, sizeof(DATA_BUFFER));
#endif
	
	if(res)
		return FC8050_RESULT_ERROR;
	else
		return FC8050_RESULT_SUCCESS;
}
コード例 #2
0
unsigned char DMBDrv_DeInit(void)
{
	gInitFlag = 0;

	BBM_VIDEO_DESELECT(NULL, 0, 0, 0);
	BBM_AUDIO_DESELECT(NULL, 0, 3);
	BBM_DATA_DESELECT(NULL, 0, 2);
	BBM_WRITE(NULL, BBM_COM_STATUS_ENABLE, 0x00);

	msWait(100);

	BBM_DEINIT(NULL);

	BBM_FIC_CALLBACK_DEREGISTER(NULL);
	BBM_MSC_CALLBACK_DEREGISTER(NULL);

	BBM_HOSTIF_DESELECT(NULL);

	return TDMB_SUCCESS;
}
コード例 #3
0
unsigned char DMBDrv_SetCh(unsigned long ulFrequency, unsigned char ucSubChannel, unsigned char ucSvType)
{
	if(!gInitFlag)
		return TDMB_FAIL;

        bfirst = 1;
        TSBuffpos = 0;
        MSCBuffpos = 0;
        mp2len = 0;

        gCurSvcType = ucSvType;
        gCurSubChId = ucSubChannel;
  
	BBM_VIDEO_DESELECT(NULL, 0, 0, 0);
	BBM_AUDIO_DESELECT(NULL, 0, 3);
	BBM_DATA_DESELECT(NULL, 0, 2);

	BBM_WORD_WRITE(NULL, BBM_BUF_INT, 0x00ff);

	if(BBM_TUNER_SET_FREQ(NULL, ulFrequency) != BBM_OK) {
		return TDMB_FAIL;
	}

	if(ucSvType == 0x18) {
		BBM_VIDEO_SELECT(NULL, ucSubChannel, 0, 0);
	} else if(ucSvType == 0x00) {
		BBM_AUDIO_SELECT(NULL, ucSubChannel, 3);
	} else {
		BBM_DATA_SELECT(NULL, ucSubChannel, 2);
	}
	
#ifdef FEATURE_FC8050_DEBUG
	if(ucSvType == 0x18) 
		gDmbMode=FC8050_DMB;
	else if(ucSvType == 0x00)
		gDmbMode=FC8050_DAB;
	else 
		gDmbMode=FC8050_DATA;
#endif
	return TDMB_SUCCESS;
}