Monday, February 18, 2008

Presidents Day code-a-thon

Had the day off from work for President's Day.

I've spent 29 out of the last 34 hours working on getting ATSC working under Linux for my HVR-950 (went to bed at 4am this morning). I got the lgdt3303 enabled and processing, but the xc3028 tuner is not getting a signal lock on anything in the ATSC frequency range. It's a completely digital tuner, so getting it to work is entirely driven by the microcode loaded into the device at the given time and the tuning commands sent over the i2c bus. I don't have any documentation on the registers, so I'm completely working off of usb wire dumps and comparison to the mrec driver. I miss the days at 3Com where I just had to go to the hardware library to grab the data book for whatever chip I was interested in.

Learned about all sorts of new stuff though in the last two days: 8VSB, AGC, Reed-Solomon error correction, demodulation, frequency locking, PSIP, usbmon.

Also, wasted a good portion of the day not realizing that although ATSC uses the same 6MHz bandwidth as NTSC that the channel locations do not directly correlate to the NTSC spectrum. It wasn't until I ran atsc-scan against the mrec driver that I realized that ATSC channel 25.1 locks on at 53.302 MHz. Channel 4.1 locks on at 55.702 MHz and not at 67.25. I was testing by just looking to see if I got a signal lock on the first few entries in the scan file, which it turns out weren't valid in my area even if the tuner worked perfectly.

Would be nice to have Paul around, since he actually knows something about how video works. The "Digital Video Electronics" book I bought a few weeks ago doesn't really compare to his PhD in EE.