This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MMC/SD Card with MPEG4 Encoder on DM355

Can someone tell me why does the MPEG4 encoder creation fails even when I am using a kernel which has supposedly fixed the EDMA resource problems?

My VENC1_create fails when the encoder requests 38 contigous EDMA channels iff MMC/SD card is selected in the Kernel configuration. According to release notes of r37 kernel (http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.01_GA_%28r37%29_Release_Notes#Fixed_in_this_release_.28Beta.2C_Build_r35.29) this is fixed in the earlier release of r35. I have an application where the av file has to be stored in the SD card.

Please help? 

 

  • Whoever  moved this thread to multimedia codecs, can you please move it to Linux or PSP forums? This is not a codec question. See the link in my original post. This is about SD/MMC driver on Linux davinci staging r35 release. The same problem can surface with any application which requests 10s of consecutive EDMA channels.

  • Hi,

    Are you sure you are trying to allocate 38 contiguous channels or are you trying to allocate 38 contiguous slots? The r37 release has a mechanism built in which actually scans all the DMA events which are registered and builds a list of free channels available. When you enable MMCSD in kernel, EDMA channels 26 and 27 are marked as allocated, so any application which is requiring 38 continuous channels will fail as there are only 64 channels available. If your application is trying to allocate 38 contiguous slots it should pass as there are 128 EDMA slots available on DM355.

    Regards, Sudhakar

  • Dear Sudhakar,

    Thank you very much for the response.

    I am passing 128 slots in the CFG of the app. (EDMA3.maxRequests = 128;)

    The encoder, kernel and all the framework components are from the latest releases from TI - http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_10/latest/index_FDS.html. Only difference is that I am trying this on a Leopard board instead of on the EVM. I am not sure whether the encoder requests channels or slots, but based on what I know so far I would bet on slots. I am curious that this same issue is marked as solved in r35, as explained in my original question (http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_10/latest/index_FDS.html).

    I think if someone tries the latest release of DVSDK with MMC/SD added as built in into the Linux kernel (so that the resources are claimed already) the dvsdk demo should fail in MPEG4 encoder Venc create. Please let me know if this is not true.               

    Thank you for the help.

    Cheers,

    ES

     

     

  • I think I posted the wrong link for the second one. Here are the correct ones: Link1 and Link2

  • Hi,

    It is true that the number of slots which was used by MMC/SD has been reduced in r35 release. DM355 has 2 instances of MMC/SD and each instance was using 16 EDMA slots. This has been reduced to 8 per each instance. After reducing the number of EDMA slots to 8, I personally tested DVSDK demos and it was working. You can check the number of EDMA slots each instance of MMC/SD is using by verifying the "nr_sg" variable of dm355_mmc_config structure in arch/arm/mach-davinci/board-dm355-evm.c file. You can also modify this variable and check whether the error goes away.

    Regards, Sudhakar

  • Great! I think I know what is going on. I see that nr_sg is 8 in evm board file. You probably made this change only to EVM's board file and not to the Leopard's board file. Probably these kind of SOC level settings should go to the relevant SOC header files instead of board files. 

    Anyway, I will make this change, test and let you know the results before tomorrow evening. If it works, you can change it in the staging kernel sources as well. 

    Thank you very much for the help.

    Cheers,

    ES

     

  • Dear Sudhakar,

    Your fix on the EVM when taken to leopard board, solves the problem. Maybe you could update the staging kernel source code to get it reflected on all DM355 based boards supported like I mentioned earlier.

    Cheers,

    ES