I finally found the problem: There is a recent chipset change on this card, but no change in the lspci id of the card, so the kernel driver is failing. This should be fixed in the kernel soon. In the meantime, here is a quick and dirty fix.
How to identify an affected pctv hd pci 800i:
The kernel vendor:device id is the same for both chipsets, so you have to look at the card itself. Look at the markings on the chips. There is only one Samsung chip. If it has a number beginning "S5H1409" you have an older card that is already supported. If it has a number beginning "S5H1411", then you have a new card like mine that this fix applies to.
The fix
You'll need at least kernel-headers and git:
Code:
yum install kernel-devel git
Then get the latest v4l-dvb drivers. (See the
LinuxTVwiki for alternative approaches.)
Code:
git clone git://linuxtv.org/media_build.git
cd media_build
./build
It's the ./build command that actually downloads the source, then makes it. If you get errors, then you need further "devel" packages. The output will point you toward what you need.
Next, we'll edit the code for the cx88-dvb module.
Code:
cd v4l
<editor> cx88-dvb.c
Replace "<editor>" with your favorite text editor.
There are three occurrences of "800i" in the file. We'll make minor changes at the first and third. The second makes settings for the xc5000 tuner chip, which is unchanged.
At the first occurrence of "800i", replace
Code:
static const struct s5h1409_config pinnacle_pctv_hd_800i_config = {
.demod_address = 0x32 >> 1,
.output_mode = S5H1409_PARALLEL_OUTPUT,
.gpio = S5H1409_GPIO_ON,
.qam_if = 44000,
.inversion = S5H1409_INVERSION_OFF,
.status_mode = S5H1409_DEMODLOCKING,
.mpeg_timing = S5H1409_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK,
};
with
Code:
static const struct s5h1411_config pinnacle_pctv_hd_800i_config = {
.output_mode = S5H1411_PARALLEL_OUTPUT,
.gpio = S5H1411_GPIO_ON,
.mpeg_timing = S5H1411_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK,
.qam_if = S5H1411_IF_44000,
.vsb_if = S5H1411_IF_44000,
.inversion = S5H1411_INVERSION_OFF,
.status_mode = S5H1411_DEMODLOCKING
};
At the third occurrence, change
Code:
case CX88_BOARD_PINNACLE_PCTV_HD_800i:
fe0->dvb.frontend = dvb_attach(s5h1409_attach,
&pinnacle_pctv_hd_800i_config,
&core->i2c_adap);
if (fe0->dvb.frontend != NULL) {
if (!dvb_attach(xc5000_attach, fe0->dvb.frontend,
&core->i2c_adap,
&pinnacle_pctv_hd_800i_tuner_config))
goto frontend_detach;
}
break;
to
Code:
case CX88_BOARD_PINNACLE_PCTV_HD_800i:
fe0->dvb.frontend = dvb_attach(s5h1411_attach,
&pinnacle_pctv_hd_800i_config,
&core->i2c_adap);
if (fe0->dvb.frontend != NULL) {
if (!dvb_attach(xc5000_attach, fe0->dvb.frontend,
&core->i2c_adap,
&pinnacle_pctv_hd_800i_tuner_config))
goto frontend_detach;
}
break;
All that changes in this case is that "s5h1409_attach" is replaced with "s5h1411_attach".
Now save the file, quit the editor, and run
while still in the media_build/v4l directory. Assuming that there are no errors, then
Code:
cd ..
sudo make install
reboot
Now "dmesg | grep cx88" shouldn't have any errors and /dev/dvb/adapter0/ should be populated with the nodes demux0, dvr0, frontend0, and net0. (If you have another dvb card installed, the 0's might be 1's, of course.)
Next time you upgrade the kernel, yum will remark that you've messed with the drivers, but go ahead and install the new kernel. If this problem isn't fixed in that new kernel, you'll need to repeat the above process.
That fixes the kernel support. It's off the topic, but here's how I actually got tv streaming working with this card.
How to get tv:
Some of this is specific to my tv service---US Comcast basic service, which provides clear QAM streams---but many other cases should be similar. It may be necessary in other cases to use different scanning options.
Code:
yum install dvb-apps w_scan mplayer
(1) Get the frequencies used by your provider:
Code:
w_scan -fa -A2 -c US -x > local-frequencies
This takes a few minutes. In my case, these turned out to be a subset of
/usr/share/dvb/atsc/us-Cable-IRC-center-frequencies-QAM256. (Actually w_scan turned up two that are not in that file. They turned out to be phony. Maybe Comcast is using them for something else.)
A typical line should look like "A 135000000 QAM256". Here 135000000 is one of the frequencies and QAM256 is the modulation type.
At this point, you can use scandvb to find the channels living on these frequencies. I found this to be impractical. Several channels live on some of these frequencies; most are empty. Furthermore the video stream for a channel usually has more than one audio stream associated with it in order to support multiple languages. It is possible to use mencoder to check each channel found by scandvb and determine whether there's really anything there or not. In my case, a script to do this would take about 12.5 hours to run. And I still wouldn't know what the Comcast numbers of channels I'd found are, or which are in English.
Incidentally, kaffiene and mythtv couldn't crack this nut, either.
Here's a better way.
(2) Get scte65scan.
It's evidently not in the Fedora or rpmfusion repositories, but it's trivial to build. Go to its
Sourceforge page, download the source, then
Code:
tar xzf scte65scan-0.2.1.tgz
cd scte65scan-0.2.1
make
Incidentally, the README is better than most and explains well Comcast "virtual channels". The point is to get your channel 10 to be Comcast's channel 10.
Now copy your local-frequencies file to the scte65scan-0.2.1 directory, then run
Code:
./scte65scan -f1 -n1 local-frequencies > tables.txt
The file tables.txt will contain several channel-number to tuning-info maps. The easiest way to find which one is yours is to hook up a TV using Comcast's "DTA" (Digital TV Adapter) and go to the DTA Info screen. (Hold the INFO button on the remote down for 5 seconds or so.) You can poke around and find it there. Cut that section out of tables.txt and save it as channels.conf.
(3) Get the correct VIDs and AIDs:
At this point, my channels.conf file began
Code:
2:519000000:QAM_256:8192:8192:2109
3:627000000:QAM_256:8192:8192:1
4:627000000:QAM_256:8192:8192:2
The format is
Comcast-channel-number:frequency:modulatation-type:VID:AID:channel
VID and AID are Video ID and Audio ID, respectively. It's wrong that they are all 8192. That breaks tuning to the channel that you want.
(4) Get the correct VIDs and AIDs from Comcast's DTA:
This is a bit tedious. Using your TV, one by one, tune to the channels in the first column of your current channels.conf. Go to the DTA Info screen and find the VID and AID for that channel. At least in my case, these are given in hex. Write these down.
Convert these hex numbers to decimal. Then edit channels.conf to change all those 8192's (0x2000's) to the correct values. My channels.conf now begins
Code:
2:519000000:QAM_256:2114:2115:2109
3:627000000:QAM_256:1986:1984:1
4:627000000:QAM_256:2050:2048:2
Copy your channels.conf file to ~/.mplayer.
(5) Enjoy:
To watch Comcast channel 10:
If the video is choppy, you might try the option "-cache 8192". If you're still not happy with the quality, mplayer has enough options that you can play roulette till digitial tv is obsolete.
Unsolved problem:
What's *on* tv, now that you can watch it ...