| | |
| | | int data_len; |
| | | |
| | | ToB* tob = ToB::GetInstance(); |
| | | u16 LevelCnt = tob->GetLevels(Levels); //918 levels |
| | | u16 LevelCnt = tob->GetLevels(Levels, levels_max_len); //1688 levels |
| | | u32 msgLen = LevelCnt * sizeof(*Levels); |
| | | int Packegs = (msgLen+MSG_DATA_LEN-1)/MSG_DATA_LEN; |
| | | |
| | |
| | | |
| | | data_num = (data_num - sizeof(struct ParamCtrl))/sizeof(s16); |
| | | // ptr->mid = var.pscene->get_module_id(ptr->mid, type, ptr->cmd) ; |
| | | // printf("mID:%d pID:%d val[0]:%d val[1]:%d\n",ptr->mid, ptr->cmd, data[0], data[1]); |
| | | // dbg_printf("mID:%d pID:%d val[0]:%d val[1]:%d\n",ptr->mid, ptr->cmd, data[0], data[1]); |
| | | tob->toCtrl(ptr->mid, ptr->cmd, data, data_num); |
| | | } |
| | | |
| | |
| | | bin = (u8*)sram_malloc(SRAM_DDR, mem_any, pmsg->totalPkts*MSG_DATA_LEN); |
| | | } |
| | | if(bin == NULL) return -1; |
| | | // printf("No:%d len %d\n", pmsg->pktNo,pmsg->dataLen); |
| | | // dbg_printf("No:%d len %d\n", pmsg->pktNo,pmsg->dataLen); |
| | | var.TopoLoading = utrue; |
| | | memcpy(bin+pmsg->pktNo*MSG_DATA_LEN, pmsg->data , pmsg->dataLen); |
| | | |
| | |
| | | var.g_level_report_interval = LEVEL_REPORT_TIME(dspconfig.mLevelReportInt); |
| | | |
| | | ModuleLeveldBUSetting(dspconfig.mConvertUnit); |
| | | //Config(conf); |
| | | RouteConfig(dspconfig.routes, dspconfig.mRouteNum); |
| | | SRCsConfig(0 , &dspconfig.srcs[0]); |
| | | SRCsConfig(1 , &dspconfig.srcs[1]); |
| | |
| | | } |
| | | |
| | | Send(MsgType::MSG_ACK_REQ, 0 , 0); |
| | | printf("HandShake OK\n"); |
| | | // dbg_printf("HandShake OK\n"); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | { |
| | | extern ubool systemMute; |
| | | if(pmsg->magic != 0x5aa5) { |
| | | //printf("magic error.\n"); |
| | | //dbg_printf("magic error.\n"); |
| | | return -1; |
| | | } |
| | | |