• 欢迎浏览“String me = Creater\忠实的资深Linux玩家;”,请文明浏览,理性发言,有侵犯你的权益请邮件我(creater@vip.qq.com).
  • 把任何的失败都当作一次尝试,不要自卑;把所有的成功都想成是一种幸运,不要自傲。
  •    4年前 (2015-01-05)  dsp |   抢沙发  14 
    文章评分 0 次,平均分 0.0

    .\ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_c6xdsp\system\system_c6xdsp.c

    Int32 System_init()中

     System_initLinks();

    .\ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_c6xdsp\system\System_c6xdsp.c

    Void System_initLinks()中

     AlgLink_init();
    VaLink_init();
    NullLink_init();
    MergeLink_init();
    SelectLink_init();
    RvmLink_init();

    文件为.ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_c6xdsp\rvm\rvmLink_tsk.c

    Int32 RvmLink_init()中

     status = Utils_tskCreate(&pObj->tsk,
    RvmLink_tskMain,
    RVM_LINK_TSK_PRI,
    gRvmLink_tskStack[rvmId],
    RVM_LINK_TSK_STACK_SIZE, pObj, tskName);

    文件为.ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_c6xdsp\rvm\rvmLink_tsk.c

    Void RvmLink_tskMain(struct Utils_TskHndl * pTsk, Utils_MsgHndl * pMsg)中

     /* create the rvm algorithm */
    status = RvmLink_create(pObj, Utils_msgGetPrm(pMsg));

    文件为.ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_c6xdsp\rvm\rvmLink_tsk.c

    在Int32 RvmLink_create(RvmLink_Obj * pObj, RvmLink_CreateParams * pPrm)中

    /* Allocate LUT memory */
    pObj->pLut = Utils_memAlloc(RVM_LINK_LUT_SIZE,32);
    UTILS_assert(pObj->pLut != NULL);
    
    /* Read LUT data into LUT memory */
    //strcpy((char*)rvmLutPrm.fileName,"/mnt/mmc/lut_9j003_5mp_2nd.dat");
    strcpy((char*)rvmLutPrm.fileName,"/mnt/mmc/lut_2560x1920.dat");
    //strcpy((char*)rvmLutPrm.fileName,"/mnt/mmc/lut_2048x1152.dat");
    //strcpy((char*)rvmLutPrm.fileName,"/mnt/mmc/RVM_lut.bin");
    rvmLutPrm.lutBufAddr = (UInt32)pObj->pLut;
    rvmLutPrm.lutBufSize = RVM_LINK_LUT_SIZE;
    
    System_linkControl(SYSTEM_LINK_ID_HOST,
    SYSTEM_COMMON_READ_RVM_LUT,
    &rvmLutPrm,
    sizeof(SystemCommon_rvmLutPrm),
    TRUE);
    UTILS_assert(rvmLutPrm.errorCode == 0); 

    这个assert出错

    [c6xdsp ]  5943: Assertion @ Line: 117 in links_c6xdsp/rvm/rvmLink_tsk.c: rvmLutPrm.errorCode == 0 : failed !!!

    DSP使用System_linkControl发送了SYSTEM_COMMON_READ_RVM_LUT命令,由A8 HOST接受,以下为A8端代码
    在文件:.\ipnc_rdk\ipnc_mcfw\mcfw\src_linux\mcfw_api\ti_vsys.c

    Int32 Vsys_eventHandler(UInt32 eventId, Ptr pPrm, Ptr appData)
     case SYSTEM_COMMON_READ_RVM_LUT:
     pRvmLutPrm = (SystemCommon_rvmLutPrm*)pPrm;
    
     pRvmLutPrm->errorCode = 0;
     sdCardMounted = 0;
    
     memDevFd = open("/dev/mem",O_RDWR|O_SYNC);
     if(memDevFd < 0)
     {
     OSA_printf(" ERROR: /dev/mem open failed !!!\n");
     pRvmLutPrm->errorCode = -1;
     }
     else
     {
     /* Open LUT file and find the file size */
     FILE *fp = fopen(pRvmLutPrm->fileName,"rb");
     if(fp == NULL)
     {
     /* May be SD card is not mounted,try mounting it */
     if(system("mount -t vfat /dev/mmcblk0 /mnt/mmc\n") != 0)
     {
     OSA_printf(" ERROR: SD card mount failed !!!\n");
     pRvmLutPrm->errorCode = -1;
     }
     else
     {
     sdCardMounted = 1;
     fp = fopen(pRvmLutPrm->fileName,"rb");
     }
     }
    
     if(fp == NULL)
     {
     OSA_printf(" ERROR: LUT file open failed !!!\n");
     pRvmLutPrm->errorCode = -1;
     }
     else
     {
     /* Go to end of file */
     fseek(fp,0,SEEK_END);
    
     fileSize = ftell(fp);
     pRvmLutPrm->lutFileSize = fileSize;
    
     /* Go to beginning of file */
     fseek(fp,0,SEEK_SET);
    
     if(fileSize > pRvmLutPrm->lutBufSize)
     {
     OSA_printf(" ERROR: LUT buffer is insufficient !!!\n");
     pRvmLutPrm->errorCode = -1;
     }
     else
     {
     /* Map the LUT buffer */
     virtLutBufAddr = MMAP(pRvmLutPrm->lutBufAddr,fileSize);
     if(virtLutBufAddr == NULL)
     {
     OSA_printf(" ERROR: mmap of LUT buffer failed !!!\n");
     pRvmLutPrm->errorCode = -1;
     }
     else
     {
     /* Read LUT file into LUT buffer */
     if(fread(virtLutBufAddr,1,fileSize,fp) != fileSize)
     {
     OSA_printf(" ERROR: File read failed !!!\n");
     pRvmLutPrm->errorCode = -1;
     }
     else
     {
     Cache_wb((Ptr)virtLutBufAddr,fileSize,Cache_Type_ALL,TRUE);
     }
    
     /* Unmap the address space */
     MUNMAP((UInt32)virtLutBufAddr,fileSize);
     }
     }
    
     fclose(fp);
     }
    
     close(memDevFd); 
    
     if(sdCardMounted == 1)
     {
     /* Unmount SD card */
     system("umount /mnt/mmc\n");
     }
     }
    
     break;

    其中由于打开文件

    strcpy((char*)rvmLutPrm.fileName,"/mnt/mmc/lut_2560x1920.dat");失败,
    同时加载SD卡,试图在SDK中寻找这个文件失败导致。
     

    除特别注明外,本站所有文章均为String me = "Creater\忠实的资深Linux玩家";原创,转载请注明出处来自http://unix8.net/home.php/3922.html

    关于

    发表评论

    暂无评论

    切换注册

    登录

    忘记密码 ?

    切换登录

    注册

    扫一扫二维码分享