mirror of
https://github.com/thead-yocto-mirror/xtensa_dsp
synced 2026-06-21 17:22:27 +02:00
Compare commits
1 Commits
Linux_SDK_
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e6887d7aa |
@@ -59,52 +59,6 @@ int csi_dsp_cmd_send(const struct xrp_queue *queue,int cmd_type,void * cmd_paylo
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*********************************/
|
||||
static int dsp_register_report_item_to_dsp(struct csi_dsp_task_handler *task)
|
||||
{
|
||||
int resp =0;
|
||||
struct report_config_msg config;
|
||||
if(!task || task->report_id<0 || !task->instance || !task->instance->comm_queue)
|
||||
{
|
||||
DSP_PRINT(ERROR,"param check fail\n");
|
||||
return -1;
|
||||
}
|
||||
config.report_id=task->report_id;
|
||||
memcpy(config.task,task->task_ns,TASK_NAME_LINE);
|
||||
if(csi_dsp_cmd_send(task->instance->comm_queue,PS_CMD_REPORT_CONFIG,&config,sizeof(struct report_config_msg),&resp,sizeof(resp),NULL))
|
||||
{
|
||||
DSP_PRINT(ERROR,"register_report_item_to_dsp fail\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// int csi_dsp_register_report_fix_id(struct csi_dsp_task_handler *task,
|
||||
// int (*cb)(void*context,void*data),
|
||||
// void* context,
|
||||
// size_t data_size)
|
||||
// {
|
||||
// if(task->report_id<0)
|
||||
// {
|
||||
// printf("report id is invalid\n");
|
||||
// return -1;
|
||||
// }
|
||||
// if(xrp_add_report_item_with_id(task->instance->report_impl,
|
||||
// cb,task->report_id,context,data_size)<0)
|
||||
// {
|
||||
// return -1;
|
||||
// }
|
||||
// if(dsp_register_report_item_to_dsp(task))
|
||||
// {
|
||||
// return -1;
|
||||
// }
|
||||
// printf("new reprot %d is created and register to DSP\n",task->report_id);
|
||||
// return 0;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
int csi_dsp_delete_instance(void* dsp)
|
||||
{
|
||||
if(!dsp)
|
||||
@@ -711,7 +665,7 @@ int csi_dsp_task_start(void *task_ctx)
|
||||
DSP_PRINT(ERROR,"csi_dsp_task_start resp due to %d\n",resp);
|
||||
return -1;
|
||||
}
|
||||
DSP_PRINT(INFO,"task start sucessful!\n",task->task_id);
|
||||
DSP_PRINT(INFO,"task:%d start sucessful!\n",task->task_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -734,8 +688,9 @@ int csi_dsp_task_stop(void *task_ctx)
|
||||
}
|
||||
if(resp != CSI_DSP_OK)
|
||||
{
|
||||
printf("csi_dsp_task_start fail due to %d\n",resp);
|
||||
DSP_PRINT(ERROR,"csi_dsp_task_start fail due to %d\n",resp);
|
||||
}
|
||||
DSP_PRINT(INFO,"task:%d stop!\n",task->task_id);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -86,7 +86,7 @@ TEST_GROUP(DspPostProcessTestBasic)
|
||||
{
|
||||
|
||||
csi_dsp_task_release_request(req);
|
||||
FAIL_TEST("Add buffer:%d\n");
|
||||
FAIL_TEST("Add buffer fail\n");
|
||||
}
|
||||
|
||||
int *buf;
|
||||
@@ -134,10 +134,23 @@ TEST_GROUP(DspPostProcessTestBasic)
|
||||
printf("plane:%d, buf2 data:%d\n",j,buf[0]);
|
||||
}
|
||||
|
||||
struct setting{
|
||||
int with;
|
||||
int height;
|
||||
}setting_config;
|
||||
|
||||
setting_config.height = with;
|
||||
setting_config.with =height;
|
||||
if(csi_dsp_request_set_property(req,&setting_config,sizeof(setting_config)))
|
||||
{
|
||||
csi_dsp_task_release_request(req);
|
||||
FAIL_TEST("set property fail\n");
|
||||
}
|
||||
|
||||
if(csi_dsp_request_enqueue(req))
|
||||
{
|
||||
csi_dsp_task_release_request(req);
|
||||
FAIL_TEST("Add buffer:%d\n");
|
||||
FAIL_TEST("Add buffer fail\n");
|
||||
}
|
||||
gettimeofday(&time_enqueue, 0);
|
||||
req = csi_dsp_request_dequeue(task);
|
||||
|
||||
@@ -79,25 +79,37 @@ TEST(DspViEnhanceProcessTest,Isp2Dsp2RyProcessTestBasic)
|
||||
FAIL_TEST("reporter create fail\n");
|
||||
}
|
||||
struct csi_dsp_task_fe_para config_params;
|
||||
|
||||
config_params.frontend_type = CSI_DSP_FE_TYPE_ISP;
|
||||
config_params.task_id = -1;
|
||||
config_params.isp_param.id=0;
|
||||
config_params.isp_param.hor=640;
|
||||
config_params.isp_param.ver=480;
|
||||
config_params.isp_param.data_fmt=CSI_DSP_IMG_FMT_RAW12_ALGIN;
|
||||
config_params.isp_param.line_in_entry=640*2;
|
||||
config_params.isp_param.line_stride=640*2;
|
||||
config_params.isp_param.buffer_size=640*2*16*2;
|
||||
config_params.isp_param.buffer_addr=0xb0000000;
|
||||
|
||||
if(csi_dsp_task_config_frontend(vi_task,&config_params))
|
||||
if(csi_dsp_task_get_frontend(vi_task,&config_params))
|
||||
{
|
||||
FAIL_TEST("get isp config fail\n");
|
||||
}
|
||||
|
||||
config_params.frontend_type = CSI_DSP_FE_TYPE_ISP;
|
||||
config_params.task_id = -1;
|
||||
config_params.isp_param.id=0;
|
||||
config_params.isp_param.hor=640;
|
||||
config_params.isp_param.ver=480;
|
||||
config_params.isp_param.data_fmt=CSI_DSP_IMG_FMT_RAW12_ALGIN;
|
||||
config_params.isp_param.line_in_entry=640*2;
|
||||
config_params.isp_param.line_stride=640*2;
|
||||
config_params.isp_param.buffer_size=640*2*16*2;
|
||||
config_params.isp_param.buffer_addr=0xb0000000;
|
||||
|
||||
|
||||
if(csi_dsp_task_config_frontend(vi_task,&config_params))
|
||||
{
|
||||
FAIL_TEST("isp config fail\n");
|
||||
}
|
||||
|
||||
struct csi_dsp_task_be_para post_config;
|
||||
|
||||
if(csi_dsp_task_get_backend(vi_task,&post_config))
|
||||
{
|
||||
FAIL_TEST("get post-isp config fail\n");
|
||||
}
|
||||
|
||||
|
||||
post_config.backend_type = CSI_DSP_BE_TYPE_POST_ISP;
|
||||
post_config.task_id = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user