Wednesday, January 30, 2008

Perl on HP-UX

Started playing around with HP-UX/parisc again...

==============================================
bash-2.04# perl -v

This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
Patch level: 36

Copyright (c) 1989, 1990, 1991, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 4.0 source kit.
bash-2.04#
==============================================

Yuck.

Monday, January 28, 2008

MacBook Air Parody

I'm not a huge fan of YouTube, but I did find the following parody for the MacBook Air to be pretty funny:

http://www.youtube.com/watch?v=sQiiszIthx4

Satellite coming crashing to Earth!

CNN, the New York Times, and most of the major news outlets are giving front page coverage to the U.S. satellite that has failed and is coming down some time in the Spring:

http://www.nytimes.com/2008/01/27/us/27spy.html?_r=1&oref=slogin
http://www.cnn.com/2008/TECH/space/01/26/dead.satellite.ap/index.html

Didn't any of them see the episode of the West Wing where Donna freaks out about the Chinese satellite that is crashing down to Earth?

http://www.tv.com/the-west-wing/the-falls-gonna-kill-you/episode/33776/summary.html

Sunday, January 27, 2008

Fun with device drivers

Continued my work tonight on my HVR-950 digital support. Forgot how fun drivers can be when you don't have the design manuals for any of the chips...

Trying to figure out why the LGDT3303 wasn't responding to I2C commands on initialization. It looks like the reset pin is actually hard-wired to one of the GPIO pins of the em2880 bridge chip. This allows it to toggle which components are active based on whether it's doing digital reception or analog. This in itself isn't that uncommon (in fact, we did the same thing at 3Com when we designed the 56K version of the OCLM - the main CPU could reset the modem chipset by just pulling up a GPIO pin).

The funny thing is though that the resetting of the demodulator is done as a product of a callback in the tuner reset.

So here's how analog support works today:

  1. em28xx driver loads
  2. Bridge initializes
  3. Driver tells bridge to initialize tuner in analog node
  4. Tuner loads firmware and trips reset
  5. reset callback from tuner sets GPIO pins enabling tvp5150 video decoder

Now the fun part is when you want to be in digital mode. The way the DVB driver is layered as an extension to the analog driver, the workflow basically looks like this:

  1. em28xx driver loads
  2. Bridge initializes
  3. Driver tells bridge to initialize tuner in analog node
  4. Tuner initialize issues reset to the tuner
  5. reset callback from tuner sets GPIO pins enabling tvp5150 video decoder
  6. em28xx-dvb digital driver loads
  7. Digital driver tells bridge to initialize tuner in digital mode
  8. Tuner loads firmware and trips reset
  9. reset callback from tuner sets GPIO pins enabling lgdt3303 digital demodulator (and presumably disabling the tvp5150 as well)
  10. dvb_attach() is called against the lgdt3303 driver

Bearing in mind that the driver supports probably a dozen different combinations of tuner, digital demodulator, and video decoder chipsets, it's little wonder that it's is such a mess.

Unfortunately, without breaking out an oscilloscope and mapping out the GPIO pins, I'm afraid to just start twiddling them until it works. Driving a pin high that's designed to be an input will likely burn out whatever it's connected to. This was another valuable lesson which I learned at 3Com when I burned the tip of my finger discovering that I had wired up a UART chip backwards (the burn took two months to heal).

After showing my father the burn, he pointed out that when checking a chip for heat you're only supposed to barely touch it. I guess little gems of wisdom like that might have been what kept me out of hardware design.

Weekend

Had a pleasant weekend. Vikki came to New York. Went to Candle 79 for a nice dinner last night. Supposedly it's one of the best Vegetarian restaurants in New York according to Zagat's, and it did not disappoint.

Worked on my HVR-950 ATSC port yesterday. Got the ported em28xx-dvb driver to compile, which is a start. I'm pretty excited about it, since the bulk of the changes I had to make so far were shallow enough that I could understand what would be required to make them work in the standard v4L2 framework.

Also picked up a 3.5" external hard drive enclosure from CompUSA at 20% off. Was thinking about maybe hooking up some of the old hard drives I have kicking around in a box to rip the data off of them.

Not sure what we're going to do today.

Tuesday, January 22, 2008

Video4Linux hacking

Left work early to pick up the print of Central Park that I had framed (Christmas present from Mom). Turned out really good. Planning on hanging it in the hallway next to the front door.

Started looking at what would be required to get the HVR-950 ATSC support working under Linux. Started porting the em28xx-dvb.c from mrec's repository to the mainline (it's GPL), which is proving to be a considerable challenge for the following reasons:

  • He has a totally different implementation of the xc3028 tuner driver
  • He added all sorts of hooks to the core V4L DVB API which were never accepted in the mainline (or the community decided to implement the same functionality in a different way)
  • I don't have any real experience with the DVB API in general
  • I am spoiled by my monitor at work that is big enough to let me see fifty lines from four or five files at the same time (I have a 17" at home which makes this impractical).

The upside is that from the cx88-dvb driver, I can pretty much do a side-by-side comparison of the structure and port em28xx-dvb.c accordingly. I just have to study the cx88 driver a bit more before I try to jump in again. Perhaps doing a diagram of the structure of the driver will help me understand the flow better....

Drinking some sleepytime tea now. May read some more of Xenocide and try to get to bed at a reasonable hour.

Monday, January 21, 2008

Monday

Dan lit a fire under me to get to the bottom of some race conditions that had been stacking up in my bug queue for the last few weeks. Took a few hours of my undivided attention but I think I isolated and fixed all of them. I just hadn't had a chance to focus on anything else since I've been working to get feature complete. Still, it felt a little overwhelming this afternoon until I stepped out of the office and got some coffee.

So I've been giving Yahoo! Mail $25 per year since 2002 in exchange for 25 MB of mail storage. Since I've been using GMail for the last couple of years, the only reason I've kept paying Yahoo is because I had not moved the mail over (and I had been using it since 1998).

Finally got around to setting up GMail to rip the email over so I can drop back down to the free Yahoo Mail service (which I only keep because my website is hosted on Geocities).

Spent a good portion of the evening reading through email from the late nineties. Stumbled across this E-card from my father:

From: bert_heitmueller@3com.com
Reply-To: bert_heitmueller@3com.com
Date: Thu, 20 Apr 2000 12:29:35 PDT
To: devin_heitmueller@<redacted>
Subject: This Easter, Son, I Wish You a World of Happiness - from Bert

You have just received an animated greeting card from Bert
You'll see the personal greeting by using the following Web location.

http://www1.bluemountain.com/cards/box5753x/mkm2avfmdbdxjp.htm

(Your greeting card will be available for the next 90 days)
There is no charge for this service! :) HAVE a good day and have fun!

He sent it two days before his heart attack.