Hello Community,
I am working on a h264 video encoding project on the DM6467 platform. Based on the demo applications from the dvsdk, i started developing a user space application for video encoding. The last weeks i worked on a linux kernel module which implements a spi protocol driver. My userspace application handles the video data trough a ioctl to my kernelmodul, which transfers the data trough spi towards a FPGA.
The kernelmodul stores video data in kernelspace (CopyFromUser) and the ioctl returns to userspace immediatly. The kernelmodule registers an interrupt on a GPIO. After it is receiving a interrupt from the FPGA, it starts transfering the a video data block of 1024 bytes to the FPGA. While driving this module from an test application, my spi protocol driver works fine. When i start using my video encoding application i get following kernel messages:
"spi_davinci spi_davinci.0: SPI data transfer error"
With a IRQ frequency smaller than 700 Hz i get the above message. The occurrenceof this message unpredictabled, but it appears several times per second. My video bitrate is about 4Mbit. And again: the message does not occur if i use my test application. I guessed that the problem only occurs during video encoding.
I read trough the davinci_spi.c code, i found that the above message is printed if the DMA transfer fails. Is it possible, that a video codec disturbs my spi dma transfers? Has anybody some advices for me?
After i found this topic http://e2e.ti.com/support/embedded/linux/f/354/t/140290.aspx#505675, i tried to check the DMA configuration. I found that the DSP does not use the DMA Channel required by ARM SPI.
Thanks!