Turn: http://blog.csdn.net/kickxxx/article/details/6862506
Configuration
MX51 supports CVBS output UI and video
1. Compile the tvout Module
2. Modify the kernel startup parameter of uboot.
Tvout output pal CVBS signal
Set bootargs_base 'setenv bootargs console = ttymxc0, 115200 di0_primary Video = mxcdi1fb: yuv444, TV-PAL tve'
Tvout outputs ntsc cvbs signal
Set bootargs_base 'setenv bootargs console = ttymxc0, 115200 di0_primary Video = mxcdi1fb: yuv444, TV-NTST tve'
Test
After startup, check the correct UI and video on the LCD and execute the following command:
Setprop RW. second_display_connected 1
That is, you can see the UI on the LCD and CVBS, and enter the video player to play a video. At this time, you should be able to see the UI on the LCD, not the video; you can see the UI and video on the CVBS.
To switch back to the LCD, run setprop RW. second_display_connected 0.
Switch back to CVBS and run setprop RW. second_display_connected 1.
Video dual-screen problem:
Currently, the implementation of Freescale does not support video display on both screens. The Freescale statement is that the bandwidth is not enough. I have not verified it, but if you need to display video data on both screens
Theoretically, it is feasible. If video data sent to fb2 can be copied and scaled according to fb0 size (CPU or IPU), then merged with the UI data on fb0, the video dual-screen should be implemented. Of course, this is theoretical. There are two problems to solve: 1. Complicated processing code; 2. Can IPU handle this load.
Transparency
When the tvout background shows video, the UI is not supported well, at least in my project, because the code in hardware/mx5x/framebuffer. cpp is faulty.
Transparency is associated with bpp32 and bpp16. You need to understand the relationship between transparency and bpp, global_alpha, local_alpha, and color key, and observe the merging relationship between the two layers carefully.
Switching Delay
When you use setprop RW. second_display_connected value to switch, you will find that there is a delay in the switch. Because this command will take effect, you must have a page refresh to make fb_post called.
Click the touch screen to refresh the interface.