Monday, June 30, 2008

Monday

Tonight, went to the movies with Dan and Aaron and saw "Don't mess with the Zohan". It was pretty silly.

My changes to Kaffeine for ATSC scanning got checked in to the KDE repository over the weekend by the maintainer. Checked out the latest trunk so I can validate the fixes, and discovered that the tree doesn't build.

Started working on the Pinnacle PCTV HD Pro Stick 801e driver. Got some USB snoops from the Windows system I rebuilt on Sunday (hard drive failure). Started hacking on the dib0700 driver to add the appropriate entries. The changes don't compile yet (still in the very early stages)

Going to watch Scrubs and let my brain unwind before I go to bed.

The website is down

I usually don't embed crap from YouTube, but I did find the following pretty entertaining.

There's some profanity, so those of you with small children may wish to turn down the volume or just cover their ears for a few minutes.

Thanks, Ben.

Sunday, June 29, 2008

Wii fun

Went to a Saturday matinee and saw Wall-E. Cute movie. I'm sure my nephew will enjoy it when it comes out on DVD (he loves Cars).

Throwing caution to the wind, Victoria convinced me on Saturday night to pick up a Nintendo Wii. I haven't owned a game console since the first 8-bit Nintendo (circa 1986). They've come quite a long way.



Man, it's tiring. And my shoulder is sore from virtual baseball. WTF? A sports injury from a video game?

Look how close to the television Victoria is in the picture above playing Wii Boxing. Is it any wonder that when they first came out people broke their TV's with the remote? I have to wonder whether the thick rubber padded jacket that wraps around the remote was there when they first released the Wii, or whether they added it when too many people whacked the person they were playing with (I almost did this several times playing Wii tennis).

Also, I've been watching the first season of The Incredible Hulk on NetFlix (1977). In the last episode I watched, David Banner turns into the hulk out of frustration when stuck in New York City traffic. I can certainly sympathize.

Oh, and if anybody is wondering, I've owned the Wii for 24 hours now, and have not taken it apart yet. That's like a new record for me.

Thursday, June 26, 2008

Bill Gates ranting about Microsoft

We've all cases where we had to get something working under Windows and had problems. However, it's especially entertaining to read about a case where it was Bill Gates who couldn't get something installed:

http://osnews.com/story/19921/Full_Text:_an_Epic_Bill_Gates_e-Mail_Rant

It's a couple of years old, but still pretty funny.

Tuesday, June 24, 2008

Good day as development goes...

Woke up this morning to find an email from the Kaffeine developers where my patch appears to have been well received. If I'm lucky, there will be a 0.8.6b release that contains the ATSC support even though the codebase is actively developing for KDE4. It would be really nice to get the fixes in for the next major release of Ubuntu.

Also received an email from the person I have been working on with the PointNix dental camera. His testing confirmed that it was indeed an saa7113 and the patch I sent him "just worked". I prepared a final patch tonight (removing all the debugging code, etc), which assuming he doesn't see any problems with I will submit to Mauro for inclusion in the v4l-dvb codebase.

Today at work, I learned way more that I would have liked about the Intel Itanium instruction set. I had a stack overflow which required me to decode the stack pointer registers.

Now in most processors (including x86), they call the register something kind of obvious like "ESP" or just "SP". But in Itanium, the stack pointer is in General Register 12 (GR12). Yeah, and to throw me off they have a very convenient looking register called the "Current Frame Marker" (CFM) which has a "size of frame" component. Except the CFM only applies to the register stack and not the memory stack. There went half my day...

To their credit, the Intel Itanium Processor Software Developer's Manual spans three volumes at around 900 pages each. So you can't say the processor is poorly documented.

http://www.intel.com/design/itanium/manuals/iiasdmanual.htm

Today's Perl cat test

For your viewing pleasure, here is the cat test from today's candidate:

sub bin_cat {
my (file) = @_;
defined file || die;
my y = open (file, "r")
while (my x = read(y)) {
print (x);
}
}

Monday, June 23, 2008

Plugging along...

Learned a bit today about thread stack sizes on Linux. Fixed my daemon so it's VSZ went from 343 MB down to 8MB. It turns up if you don't explicitly set the thread stack size in your code, it uses the value in "ulimit -s", which on 32-bit Linux is 10MB and on 64-bit Linux is 32MB. Of course, my thread stacks only needed to be around 64 **KB**.

It now looks much better in top. :-)

Submitted my patch to Kaffeine for ATSC support. It hasn't shown up on the kaffeine-devel mailing list, which makes me wonder if it's some sort of delay or whether the message disappeared into the ether.

Wrote another patch for the Pointnix Intra-Oral camera tonight based on the dmesg output sent over the weekend. It turns up the device appears to have an saa7113 on the i2c bus, and the guy I was working with was using the Terratec XP Prodigy driver which is set to use a tvp5150 decoder instead. Long story short, it might now start to "just work". He confirmed that the code for the snapshot button is working, so if I can get the device to detect properly and setup the write decoder, I should be home free.

Went out and got some Ben and Jerry's ice cream. Yum. Will probably watch an episode of the first season of The Incredible Hulk (in an attempt to thwart my insomnia) and then go to bed.

Sunday, June 22, 2008

Weekend roundup

Victoria and I went to New Jersey on Saturday. Lauren had her baby (Amelia Grace). Celebrated Jenny's birthday at her house with some ice cream cake.

Today, spent a few hours in the coffee house in Philadelphia. Did some stuff for work until the latency got too high to do ssh. In the afternoon, had a picnic with Victoria and played Scrabble in the park.

Came back to the city tonight. Worked on my patch for Kaffeine some more. I pretty much have the scanning results consistent with the output from my copy of Elgato EyeTV. I'm just trying to get it cleaned up enough to submit, which is taking longer than I would like. I spent a good bit of time trying to figure out why the one stream of ATSC radio I was getting didn't have a proper channel name, until I confirmed that the data just isn't in the TVCT stream (which only then I confirmed that EyeTV hit the same issue).

I'm not tired but I really should go to bed. Crap.

Unauthorized Access

High School kid breaks into school computer? 38 Years:
http://www.tgdaily.com/content/view/38012/118/

Phone companies illegally give millions of phone calls between innocent Americans to the NSA? Change the law and grant them immunity:
http://www.eff.org/press/archives/2008/06/20

Thursday, June 19, 2008

More Kaffeine work

Did more cleanup work on the ATSC scanning support. Added changes to distinguish ATSC radio channels, filter hidden channels, show the proper channel shortname, etc. Testing. Still some more work to do, but it's looking pretty stable now and I started reformatting the changes so they could be submitted upstream as a patch.

Todo:
  • Performance tuning for maximum cycle times according to A/65C Section 7.1 (will make scanning much faster)
  • Properly setup dvbsi/psip object inheritance
  • Compare scanning results against ascan output
  • Compare scanning results against imported channels.conf values
  • Exclude channels with "inactive" field from scan results
  • Figure out how teletext support is represented in ATSC
  • TVCT service type field checking
  • Analyze descriptors available for useful information
  • See if any broadcasters are providing extended channel name descriptors
  • Make sure CVCT wont crash parser (even though it's unsupported at this point)
  • Better logging
  • Whitespace reformatting
Booked vacation tonight for Bermuda in August. Wohoo.

Wednesday, June 18, 2008

Not sleeping again

It's 3am and I haven't slept yet. This is really starting to be a problem.

Too anxious to sleep. Too tired to be productive.

Perhaps it's time to starting thinking about a sleep aid.

Tuesday, June 17, 2008

Kaffeine ATSC scanning support working

Well, with some more debugging I got the ATSC scanning finally working. I didn't realize that the ATSC decided to register it's own private PMT section_type for AC-3 audio, so that's why my entries weren't getting into the list of available channels (one of those thing I discovered when looking at the raw dump and asked WTF is section_type 0x81???).


(click on the image to enlarge)

I've still got some cleanup to do, but now that it's working it should be easier to take a second pass over the code and see what was really needed to make it work.... I need to refactor it so that there is minimal interference with the existing DVB support while still sharing code where appropriate (such as the PAT/PMT parsing)

Feeling crummy...

Didn't sleep well at all last night. Tossed and turned most of the night. Ugh.

I'm tired.

Air conditioner has been installed. My apartment has been cooling off for a couple of hours and I can already feel the difference. What a pain though... And it looks like the power cable is going to obstruct my vertical blinds because it is too short to go around.

I really should see about finishing up my work on Kaffeine so I can submit a patch, but I feel like I just don't have the energy tonight. Perhaps I will veg in front of the television for a while since my brain isn't really working right now.

Monday, June 16, 2008

Kaffeine ATSC scanning - I'm SO CLOSE

Wrote a simple PSIP parser for Kaffeine. Successfully parsed the MGT and TVCT tables when scanning and extracted the channel major/minor number, short name, modulation, etc. All that is left is to tell Kaffeine about the results so the entries appear in the GUI's channel list. A bit of code cleanup and I'll submit a patch to the maintainer.

After that, I'll look at extending the parser to get program guide info from the PSIP stream. But at least at this point it's working and casual users looking for something to watch TV with will be able to use it.

Air conditioner being installed tomorrow. Finally, my apartment will not be like an oven. Yay.

Dell pushing Windows Software for Linux PCs?

Yeah, so this one doesn't make a whole lot of sense:


(click on the image to zoom)

Dell has been trying to establish itself as a Linux vendor. In fact, I bought one of their Inspiron 530n workstations with Ubuntu 7.04 late last year.

So, since I'm thinking about getting a new PC and I'm perfectly happy with my 530N, I figured I would see about buying another.

So I go through the wizard for the Ubuntu PC, and run across the above page. Apparently they don't seem to understand what they are trying to sell or else they would not be offering Windows addon software for a Linux PC.

Why am I not surprised?

Sunday, June 15, 2008

Weekend in Philly

Spent the weekend in Philadelphia. Went to Victoria's trapeze party last night. Started to learn how to juggle pins (juggling was the one practical skill I picked up in college).

Played Scrabble with Victoria and Michelle this afternoon.

Spent yesterday afternoon reading the ATSC A/65 spec for PSIP so I can finish the Kaffeine ATSC scanning support.

Back in the City now. Going to grab some dinner and then see if I can put together a patch to support the Pointex intra-oral camera:

http://www.pointnix.com/ENG/dental/product_02.asp

Yay for good dental hygiene! And no, it's not a camera for consumers - it's intended for use by dentists.

Friday, June 13, 2008

$500 Ethernet cable? WTF?

Wow:

Snake-Oil Alert: Denon Sells 'Audiophile' Ethernet Cable for $500
http://blog.wired.com/gadgets/2008/06/snake-oil-alert.html

And all this time I've been using the freebie Cat5 cable that came with my Wifi router!

Monday, June 9, 2008

More Kaffeine ATSC work

Some more of my patches got merged into the V4L codebase:

em28xx: enable DVB for HVR-900
http://linuxtv.org/hg/v4l-dvb/rev/ca65777314d2
em28xx: Properly register extensions for already attached devices
http://linuxtv.org/hg/v4l-dvb/rev/64e24dfade80
em28xx: Split HVR900 into two separate entries
http://linuxtv.org/hg/v4l-dvb/rev/648a6da8dc3a

Submitted a couple more tonight with some cleanup...

Also continued work on the ATSC scanning support for Kaffeine. This is going to be harder than I thought. The code that parses out the PMT/PAT/PSIP info is really convoluted the way it is written. It is riddled with magic numbers with no explanation such as:

type = getBits(buf,0,8);
pid = getBits(buf,11,13);
Do you know what those offsets are? The author appears to have never heard of anything resembling constants, whether they be done with #define or enum. It's especially annoying since I have to keep looking up all the raw values in the various EIA standards or compare it against a run of the dvb-app scan in verbose mode.

Also, the formatting style wears on the eyes. Like this:

if ( audio && desc->napid<desc->maxapid ) {
... do something
}
Yeah, there are no spaces between any of the comparsions in if() statements. IMHO, the following is MUCH easier to follow:

if ( audio && desc->napid < desc->maxapid ) {
... do something
}
It's not a typo. The entire project is like that. It's clearly the author's intended coding style. I would love to pass the whole thing through indent but he/she clearly likes it this way.

The experience thus far makes me want to scrap the whole scanning subsystem and merge the detection functionality from dvb-app's scan tool. At this point I just wanted to do the minimum work to get the ATSC scanning working (as to ensure it will be taken upstream). Really the whole thing should be refactored but that's a can of worms I'm loathed to open.

I'll get the fucker working but it won't be pretty.

At least all of both the EIA and ATSC standards are publicly available, so none of this is an exercise in reverse engineering...

Friday, June 6, 2008

Top ten Linus quotes

Who couldn't like a list of Linus quotes?

http://www.businessreviewonline.com/os/archives/2008/06/the_10_best_lin.html

Well, I guess those of you who aren't into computers or Linux. Still....

Thursday, June 5, 2008

Kaffeine ATSC scanning support

Had a pretty productive evening. Submitted a patch to Mauro to separate out the two variants of the HVR-900 so we don't think the newer variant has the Zarlink demodulator. After looking at the code, I think we might have accidentally disabled DVB support in the device at some points, since the "has_dvb" field isn't set to '1'.

After going through some dependency hell (missing header/install package/rinse/repeat), I got Kaffeine to compile on my Ubuntu 8.04 box. Hacked in support for ATSC scanning where appropriate. It doesn't quite work yet, but it does get signal lock, shows the signal strength and SNR, so I'm pretty close. Just looks like I have to get the PSIP parsing working and it will be good to go.

It would be great if I could get a patch submitted this weekend.

Unfortunately Kaffeine looks like one of those programs that "gets the job done" but the code is kind of a mess. Ran into lots of cases where there were "if/elseif/else" blocks where if the code didn't see one of the expected values it would just silently do a return from the function without any logging or error message.

I guess the fact that I basically got it working in one night suggests it couldn't be too bad...

Wednesday, June 4, 2008

Wednesday

A pretty quiet day at work today. Fixed some bugs. Had a couple of meetings. After work, went to Dewey's Flatiron with Dan, Matt, Chris, Packy, and Milosz.

Came home and confirmed that my changes for the Pinnacle PCTV HD Pro stick got accepted into the mainline.

Did some work on the LinuxTV DVB Wiki. Cleaned up the info for the HVR-950, Elgato EyeTV, and both Pinnacle devices I am working on. Took some pictures so people can tell the difference between the two Pinnacle devices.

Tuesday, June 3, 2008

Titanic Was Found During Secret Cold War Navy Mission

Here's an interesting article. I remember what a big deal it was in 1985 when they found the Titanic. I read all about it in National Geographic at the time.

It turns out Robert Ballard's real mission was to find two sunken nuclear submarines for the U.S. Navy.

http://news.nationalgeographic.com/news/2008/06/080602-titanic-secret.html

Pinnacle PCTV HD Pro stick now working under Linux...

Picked up a refurbished Pinnacle PCTV HD Pro USB ATSC tuner in an effort to leverage what I know about the em28xx chipset to get as many devices working as possible. Basically got it working under Linux in one night. It's virtually identical to the HVR-950 from a hardware standpoint, so I just had to update some constants. Both ATSC and analog appear to be working as expected.

Submitted the patches, and will update the DVB Wiki page for the device once they are checked in. Unfortunately I think I missed the 2.6.26 merge window.

It's annoying that Pinnacle shipped two completely different hardware designs under the same product name. I'm going to have to take pictures of the two devices and put them on the Wiki so people know which is which (since I only have one of them working under Linux at this point).

My insomnia is back and I didn't sleep much last night. Victoria suggested I stop working and watch some TV half an hour before I go to bed. Guess I'll try that now...

Monday, June 2, 2008

Victoria's First Fabric Performance

Check out Victoria's first fabric performance at the AirPlay Trapeze Student showcase on May 31, 2008:

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

Isn't she talented?