Tales From The Geek Side

The geeky musings of Greg Rowe.

Archive for the 'MythTV' Category

VIA Rhine PXE boot driver fix

October 31st, 2006 by greg

If you PXE boot a machine that uses the via-rhine driver in Linux you will find that you can boot it only once. After that first boot you have to physically remove power to the box to restore the network controller to the proper state. Well, at least that is the behavior I see with my VIA M10000 board.

As a workaround I commented out the following line in via-rhine.c on or around line 1969

iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);

Ahh, once again my Myth frontend reboots!

Category: Code, Geek, MythTV | No Comments »

VIA M10000 don’t disable glx!

October 31st, 2006 by greg

For some reason or another I disabled glx from my xorg.conf for my mythfrontend. When I did that dri stopped working and so did XvMC. I thought xorg was out of sync with my kernel so I built a new kernel but that wasn’t the real problem. At least now I have a custom kernel that’s nice and lean. Now, hopefully, I have enough horsepower to display some scaled down HDTV!

Category: Geek, MythTV | No Comments »

Updating my systems for MythTV 0.20

October 29th, 2006 by greg

I recently took the time to update most of my computer systems. First I installed a new kernel on my Shuttle SD11G5 which is my desktop machine. It’s a silent machine that uses a pentium M. That went well once I figured out that I had to include vm86 for X to work properly with the integrated i915GM graphics card. This is my desktop machine and I sometimes use it as a frontend. Currently if I try to watch HD content with 2.6.18 it will crash the entire computer. Something isn’t quite right with the LinearAlloc option for the i810 driver for xorg.

Updating the backend:
Next I updated my backend machine. My backend machine is a file server as well as the machine that runs Myth backend. I have a PVR150 card that I’ve been using for quite some time with Myth 0.18. I also have an HD3000 card that I’ve had for longer than the PVR150 that I haven’t been using. I didn’t use the HD card because I couldn’t get a lock on local stations because my antenna was oriented towards another city. It’s a long story but I reoriented the antenna because there is no longer any reason to have it pointed towards the other city. Once I did that I no longer had ghosting issues in the UHF band and I found (eventually) that the HD card locks perfectly on all of the local digital broadcasts. Myth reports generally 80% or more signal strength but I’m getting ahead of myself.

Building 2.6.17:
The first thing I updated was the kernel. I read on the MythTV wiki that the ivtv drivers (for the PVR150) don’t work with 2.6.18 so I downloaded 2.6.17. Configuration was fairly easy but I made a couple of mistakes along the way. Even through the ivtv drivers are not part of the kernel they use some encoder modules that are part of the standard kernel. The HD3000 card on the other hand uses modules that are all found in the kernel. The options I built my kernel with are:

Device Drivers:
Multimedia Devices:
<m> Video For Linux
<*> Enable Video For Linux API 1 compatible layer
Video Capture Devices:
<m> Conexant 2388x (bt878 successor) support
<m> DVB/ATSC support for cx2388x based TV cards
[*]     Build all supported frontends for cx2388x based TV cards
Encoders and Decoders:
<m> Wolfson Microelectronics WM8775 audio ADC with input mixer
<m>  Conexant cx2584x audio /video decoders

Building ivtv:
The next step was to compile ivtv. This was made incredibly easy by the wonder program in Debian called module-assistant. The ivtv source code is a package in the absolutely fantastic debian-multimedia repository. If you setup a MythTV system I fully believe there is no easier way than using their packages. In another post I’ll describe the setup of my diskless VIA mini-itx M10000 frontend system that uses hardware mpeg2 decoding and how the debian-multimedia project makes that a piece of cake. To use their packages add the following to /etc/apt/sources.list:

deb http://www.debian-multimedia.org sid main
deb-src http://www.debian-multimedia.org sid main

Once you’ve done that building and installing the ivtv drivers is a piece of menu-driven cake. Just run `module-assistant`. The UI steps you through everything and besides choosing what you want to build there really isn’t anything that you have to do. The program does it all for you.

Installing firmware files:
You’ll need the ivtv firmware files. Since I already had a much older version of ivtv on my system I didn’t have anything to do in this step. The firmware files I have in /usr/lib/hotplug/firmware for ivtv are:

v4l-cx2341x-dec.fw
v4l-cx2341x-enc.fw
v4l-cx2341x-init.mpg
v4l-cx25840.fw

Then, just add ivtv to /etc/modules and you are all set.

Next I had to get firmware for my HD3000 card. There is a script that comes with 2.6.17 for downloading the correct firmware file. You’ll need a different firmware file depending on what your HD source is. For me, I grab the HD streams that are broadcast over the air (8-VSB I think the encoding is called). The script is in Documentation/dvb/get_dvb_firmware. For the HD3000 card I ran it with the following:

$ perl get_dvb_firmware or51132-vsb

This gave me a file, “dvb-fe-or51132-vsb.fw”, which I moved to /usr/lib/hotplug/firmware. Finally, I added cx88 and cx88-blackbird to /etc/modules and I was done.

The rest of the upgrade process was incredibly simple because of debian-multimedia.org. I literally did an `apt-get dist-upgrade` and everything I needed was updated, MythTV 0.20 being the most important. It was upgraded from 0.18 to 0.20 with only one issue. Myth somehow lost the record times for a number of my recordings. I consider myself luck that I didn’t have any other issues. I can easily live with lost dates.

I did need to reconfigure the backend to use the HD3000 card and the PVR150. Since I am now loading both cards the ivtv card gets /dev/video1 instead of /dev/video0. But anyhow, setting up the backend for these cards was not too bad. Only the channel setup for the PVR150 was confusing.

Reconfiguring the backend:
I ran `mythtv-steup` (side note: why is the setup program for a server based app a GUI app? I really think this should be curses based. Remote administration of this is a nightmare and it need not be that way) and removed the existing capture cards and channel sources. I went to labs.zap2it.com and created two channel lineups. I’m very grateful that Zap2It provides this channel listing service for free. One channel listing is for digital broadcasts and the other for analog. You’ll want to make two because, while you can tune analog stations on the HD3000 card it is considered by Myth to be a seperate input source on the card. Just trust me, it’s much more convenient to have two channel sources.

When you add the HD3000 capture card select “DVB DTV capture card (3.x).” Myth will show you your card type at the “Frontend ID:” label. Next, choose the “Analog Options” button and make sure you select the correct V4L video device! Initially mine showed the device for the PVR150 card and things won’t work right if it is setup that way. Also be sure to select “Television” as the default input.

Next, I added the PVR150 card as a MPEG-2 encoder card. Once the correct video device is selected Myth prints the model number in the GUI. For this card be sure to select “Tuner1″ as the default input device.

The next step is assigning channels to the inputs. You do need to setup the channel sources but that is very easy to do. To assign channels select “Input Connections.” You’ll see the DVB card (HD3000) listed with a number of items below it. You can record analog TV with the card but it is software only and the tuning quality is horrible compared to my PVR150 card. After playing around with it I took it out of the setup. Setting up the channels for the DVB card isn’t exactly straight forward. You must select your digital “video source.” I don’t know why they call it a video source. To me it’s a “channel group.” Anyhow once you do that you MUST hit the scan for channels button. This is only required for DVB cards. It is optional for analog cards but do not choose this for analog cards and you will be annoyed at what it does with your channels if you do. Once the scan is complete, and it takes some time, then press the “fetch channels from listings source” button. There finally the HD card is read to go! Remember you can assign the analog channels to the analog input device for the HD card but I had poor results with it.

The last step was to assign the channels to the PVR150 device. Simply select the video source you created at labs.zap2it.com for your analog stations and then press the “fetch channels from listings source.” DO NOT SCAN FOR CHANNELS. You become frustrated at what this will do to your channels.

Category: Geek, MythTV | No Comments »

Bad timing

September 26th, 2006 by greg

On Sunday I finally climbed back up into my attic to adjust my antena. I live in Rochester but I used to want to see WB49 out of Buffalo. I’m a fan of Smallville and there was no over the air broadcast of Smallville in Rochester. Now there is no more UPN and no more WB. Channel 49 out of Buffalo is My Network TV. Channel 40 out of Rochester is also My Network TV. I have no longer have any reason to attempt to get signals from Buffalo. I can’t watch Smallville anymore but I’d rather wait for DVD anyhow.

Quite some time ago I bought an HD tuner card that ignores the “don’t record” flag broadcasts. I installed it but really never worked to get it working correctly. I was more interested in getting my PVR 150 card working with MythTV than getting the HD3000 card working. Since, at that time, the drivers somewhat conflicted with each other I didn’t try to get the HD card working. However, when the HD was installed and I was playing with it I wasn’t able to get a lock on Rochester HD stations but I could on Buffalo HD stations! This was because I was getting a ghosted signal from Rochester (multi-path interference). By orienting the antena towards Rochester I shouldn’t have that problem anymore.

So on Sunday I turned the antenna towards the Rochester towers. I climbed up into the hot attic which is difficult to manuever in because of blown-in insulation. I loosened the antena bolts and spun it to the east. My wife reported a good signal on the Rochester stations but poor results from Buffalo stations, which was what I was expecting. Since I was up there I decided to try a few other positions. All of those resulted in poor reception for our target stations, FOX 31 and WXXI 21. WXXI in particular used to give us a ghosted signal. So, 21 was my point of reference for adjusting the antenna. If we could get a good picture on 21 I knew that we’d be set.

I rotated the antena BACK to the east facing position. Now my wife reported that 21 wasn’t coming in at all! I started getting frustrated and my wife was level headed enough to call my parents and see what 21 looked like from their house. They couldn’t get 21 in either so obviously 21 was having broadcast issues. Grrrrrr…such bad timing.

I tightened up the antena and came down. Later in the day 21 was crystal clear. Now my next project is to get the HD tuner card working with MythTV. I’ll be taking notes and posting it here.

Category: Geek, MythTV | No Comments »