Sunday, November 28, 2010

gst dsp/omapfb on zoom2

While waiting for the new board to arrive, I started to setup the gst-dsp + omapfb environment for what I currently have available: a zoom2.

After few tips from Axel Castaneda (for fb and v4l2 options) and much of googling, I got the board to show the video on the display using gst dsp/omapfb plugins.

As of today, you can easily use any kernel above 2.6.37-rc2, since it has a usable tidspbridge driver.

Here it's what I did (BTW, you can find a tidspbridge kernel in gitorious and ignore fetch & merge steps):

Clone/fetch latest linux-2.6 from, took linux-2.6 2.6.37-rc3:
git clone git://
cd linux-2.6
git checkout -b tidspbridge-2.6.37-rc3 v2.6.37-rc3
Then merge the patches providing display support for zoom2/3 boards from Tomi's DSS2 repo, the easiest thing to do is pulling his entire devel branch.
git pull git:// devel
And last, pick a patch to solve a gpio reset problem on zoom2 (zoom3 works fine without this last step).
wget -O display.patch
git am display.patch
Config for omap2+, and in menuconfig select:
Build the uImage and copy to the filesystem:
Alternatively, you can use modules_install after compiling kernel and modules.

Now, assuming you have a filesystem + gstreamer environment (or you can take my rootfs, which has a uImage + dsp needed modules/binaries, be sure to read and agree to the license under /lib/dsp, just in case).

Boot the uImage and insmod/modprobe the modules.
insmod /dspbridge/mailbox.ko
insmod /dspbridge/mailbox_mach.ko
insmod /dspbridge/bridgedriver.ko base_img=/lib/dsp/baseimage.dof
Generate a test video to play with:
gst-launch videotestsrc num-buffers=200 ! video/x-raw-yuv, framerate=30/1, width=320, height=240 ! dspmp4venc ! avimux ! filesink location=my_avi.avi 
If you noticed, the video generated is encoded using the dsp.

Then send the video to the framebuffer, with:
gst-launch filesrc location=my_avi.avi ! avidemux ! dspvdec ! omapfbsink 
And that's it.

No comments:

Post a Comment