Add a video connector to the chumby One

From Chumby Wiki
Jump to: navigation, search

Hardware

Buy an RCA extender cable, with at least one male end. Cut to the length you desire the pigtail to be. Typically, you want to use the male plug half because your video equipment will have a female jack, but of course this may vary depending on how strange your video equipment is.

Take the cut end and strip the wire back, and solder according to the following diagram:

Image

Also, in theory, you're supposed to put a 50 pF capacitor across the video output point to ground. You can do this fairly easy using a leaded device, but things will probably work okay with out it. You may just get some aliasing on your video output without the filter.

To access this part of the circuit board, you actually do not need to remove any screws. If you are very careful, you can use a flathead screwdriver and insert it into the gap between the front bezel and the bottom plastic, and pry the bottom plastic up. You'll have to work it up by gapping the plastic at both ends of the seam between the front bezel and the bottom plastic, since there are two friction locks on either end of the seam. The piece just snaps into place, there are no screws that hold it down. If you're not careful, the worst you will do is break the retaining tab on the bottom plastic, which means that your battery compartment won't be held snugly in place when you put it back together again.

Firmware

You'll need to mod the firmware to activate the video out (lifted from the chumby forum):

The CPU used in the chumby One has a lot of stuff on the die. Including a composite-out TV encoder, which while not connected by default, is not hard to get access to at all. Today, bunnie posted instructions on how to add a video connector. He noted that modding the firmware is an "exercise to the reader". Well, I do enjoy exercises wink

You need to do three things, and you too can have Pandora on your TV!

   * Perform the video hardware mod
   * Install new kernel (using the scripts below)
   * Switch video modes (using switch_output)

I'm hoping the new kernel will make it into a future firmware release, but for now you'll have to install one yourself.

The utility to switch modes just does an ioctl() on one of the framebuffer devices to set the resolution to 720x480x32. This should automatically enable TV mode. If you're in a PAL country, it's a slightly different resolution, but the call ought to be the same. I have a small program that just does this.

Unfortunately, there isn't any hardware support for image-scaling, so I need to run the flashplayer at 720x480. Fortunately, while the TV encoder wants video in 32-bit, there is a colorspace converter that everything goes through, so a recompiled flashplayer isn't required.

Another drawback is that it doesn't appear possible to drive the LCD and the TV at the same time. As a result, the LCD goes into a "self-test" mode and just continuously draws a red/green/blue/black/white sequence.

Because of this, you pretty much have to use the touchscreen blind. Fortunately, you don't have to recalibrate it, so it shouldn't be too difficult to navigate.

Note that this is only composite video. There's no component or digital video circuitry onboard.

Also, because it's pushing a whole lot more pixels, it's going to run widgets slower. Still, pong-clock-on-TV is always cool.

I've posted the kernel on files.chumby.com. You can use this script to download and install it.

#!/bin/sh
KRN=krnB
if grep -q mmcblk0p2 /proc/cmdline; then KRN=krnA; fi
cd /mnt/storage
rm -f c1-k1-video switch_output
wget http://files.chumby.com/hacks/c1-k1-video
wget http://files.chumby.com/hacks/switch_output
chmod a+x switch_output
if [ "$(md5sum c1-k1-video | awk '{print $1}')" != "932523d6458abdfc2e7546bcb1c49587" ]
then
    echo "MD5 error.  Cannot continue."
    exit
fi
config_util --cmd=putblock --dev=/dev/mmcblk0p1 --block=${KRN} < /mnt/storage/c1-k1-video
echo "Kernel updated.  Reboot to use it."

Put this into a script and run it, then reboot.

Hook up a TV, then connect via SSH. Run the following commands to switch to NTSC and restart the flashplayer:

stop_control_panel
/mnt/storage/switch_output -n
chumbyflashplayer.x -x 720 -y 480 -i /tmp/controlpanel.swf

Files. The following files are relevant in case you want to dig deeper. Note that I did need to modify arch/arm/mach-stmp378x/include/mach/memory. to define CONSISTENT_DMA_SIZE as SZ_8M to be able to allocate the additional screen size. If you're playing around with it and your screen boots up all white, you've probably run out of DMA memory and need to up this value.

   * chumbyfbfw.c
   * new kernel
   * switch_output binary
   * switch_output source