PDA

View Full Version : [SOLVED] Problem with pcTV HD PCI 800i: cx88-dvb won't load



Mack
14th June 2012, 08:31 PM
Thanks very much for looking at this.

This hybrid tv card seems to be well supported, but I'm stuck getting the digital tv functions to be recognized in F16. The same card seems to be sold under various brands:

(1) The box says pctv hd pci card 800i.

(2) It sold on Newegg as Hauppauge pctv hd pci card 800i (http://www.newegg.com/Product/Product.aspx?Item=15-116-043&SortField=0&SummaryType=0&Pagesize=10&PurchaseMark=&SelectedRating=-1&VideoOnlyMark=False&VendorMark=&IsFeedbackTab=true&Keywords=linux&Page=1#scrollFullInfo).

(3) LinuxTV has a page on setting it up as Pinnacle pctv hd pci card 800i (http://www.linuxtv.org/wiki/index.php/Pinnacle_PCTV_HD_Card_%28800i%29).

Does anyone have this card working in F16?

Grepping dmesg for the drivers and firmware ("cx88\|xc5000") pretty well tells the whole story about where I'm stuck:



[ 15.525280] cx88[0]: subsystem: 11bd:0051, board: Pinnacle PCTV HD 800i [card=58,autodetected], frontend(s): 1
[ 15.525284] cx88[0]: TV tuner type 76, Radio tuner type -1
[ 15.527722] cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.9 loaded
[ 15.531457] cx88/0: cx2388x v4l2 driver version 0.0.9 loaded
[ 15.885787] xc5000 1-0064: creating new instance
[ 15.887566] xc5000: Successfully identified at address 0x64
[ 15.887568] xc5000: Firmware has not been loaded previously
[ 15.887573] cx88[0]: Calling XC5000 callback
[ 15.913802] input: cx88 IR (Pinnacle PCTV HD 800i) as /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/0000:05:00.1/rc/rc0/input4
[ 15.913889] rc0: cx88 IR (Pinnacle PCTV HD 800i) as /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/0000:05:00.1/rc/rc0
[ 15.914338] cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
[ 15.914586] cx88[0]/2: cx2388x 8802 Driver Manager
[ 15.914616] cx88[0]/2: found at 0000:05:00.2, rev: 5, irq: 18, latency: 32, mmio: 0xf6000000
[ 15.914732] cx88[0]/0: found at 0000:05:00.0, rev: 5, irq: 18, latency: 32, mmio: 0xf8000000
[ 15.918379] xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)...
[ 15.920180] cx88/2: cx2388x dvb driver version 0.0.9 loaded
[ 15.920183] cx88/2: registering cx8802 driver, type: dvb access: shared
[ 15.920187] cx88[0]/2: subsystem: 11bd:0051, board: Pinnacle PCTV HD 800i [card=58]
[ 15.922221] xc5000: firmware read 12401 bytes.
[ 15.922223] xc5000: firmware uploading...
[ 15.922226] cx88[0]: Calling XC5000 callback
[ 15.931712] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input5
[ 15.933866] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0
[ 19.295056] xc5000: firmware upload complete...
[ 19.892517] cx88[0]/0: registered device video0 [v4l2]
[ 19.892678] cx88[0]/0: registered device vbi0
[ 19.892858] cx88[0]/2: cx2388x based DVB/ATSC card
[ 19.892864] cx8802_alloc_frontends() allocating 1 frontend(s)
[ 19.896963] cx88[0]/2: frontend initialization failed
[ 19.896967] cx88[0]/2: dvb_register failed (err = -22)
[ 19.896970] cx88[0]/2: cx8802 probe failed, err = -22
[ 19.897031] cx88[0]: Calling XC5000 callback
[ 19.897757] cx88[0]: Calling XC5000 callback
[ 19.904371] modprobe[714]: FATAL: Error inserting cx88_dvb (/lib/modules/3.3.7-1.fc16.x86_64/kernel/drivers/media/video/cx88/cx88-dvb.ko): No such device


The /dev/dvb nodes don't get created. The analog /dev/v4l nodes get created and, at least the video one works for analog stations---which is useless now that Comcast has "upgraded" its basic service to all-digital.

Trying to insert cx88-dvd by hand yields the same error message as the last dmesg line.

The firmware and drivers for this card have been in the kernel for a while. I've tried a couple of F16 kernels, as well as compiling drivers from source as described on the LinuxTV page, but have always exactly the same problem.

The dmesg output above is with the latest linuxtv source built against kernel 3.3.7-1.fc16.x86_64, but it's essentially identical with that I get with just the F16 kernels.

I can't find anything relevant in bugzilla, but maybe I've just missed it.

I've run out of ideas for what to try, and would really appreciate any suggestions!

Here is the card's lspci -vvnn :



05:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [14f1:8800] (rev 05)
Subsystem: Pinnacle Systems Inc. Device [11bd:0051]
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 18
Region 0: Memory at f8000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: [44] Vital Product Data
No end tag found
Capabilities: [4c] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel modules: cx8800

05:00.1 Multimedia controller [0480]: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] [14f1:8801] (rev 05)
Subsystem: Pinnacle Systems Inc. Device [11bd:0051]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (1000ns min, 63750ns max), Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: Memory at f7000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: [4c] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: cx88_audio
Kernel modules: cx88-alsa

05:00.2 Multimedia controller [0480]: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] [14f1:8802] (rev 05)
Subsystem: Pinnacle Systems Inc. Device [11bd:0051]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (1500ns min, 22000ns max), Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: [4c] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: cx88-mpeg driver manager
Kernel modules: cx8802

george_toolan
15th June 2012, 08:57 AM
Try


rmmod cx8800
rmmod cx88-alsa
rmmod cx8802
rmmod cx88xx
modprobe cx88xx
modprobe cx88-dvb

Mack
15th June 2012, 05:07 PM
Thanks for the suggestion, george_toolan!

I found the same idea on a LinuxTV page for a different card (http://linuxtv.org/wiki/index.php/KWorld_ATSC_120) that was linked in an old redhat bug report (https://bugzilla.redhat.com/show_bug.cgi?id=663976).

Unfortunately, it doesn't do the trick. Literally, I can't rmmod cx88-alsa (hence cx88xx) because it's tangled up with other modules, so I blacklisted cx8800, cx88-alsa, cx8802, and cx88xx, then rebooted, removed the blacklisting, and mod probed cx88xx and cx88-dvb. cx88-dvb still refuses to insert with the same error message.

I updated to kernel 3.3.8-1.fc16.x86_64 last night and reinstalled linux-firmware, but still no luck.

Thanks again for the suggestion.

george_toolan
15th June 2012, 06:36 PM
Try


modprobe cx88xx card=58

Mack
15th June 2012, 08:09 PM
Thanks again for your help, but still no luck. I'm still getting the same error message



FATAL: Error inserting cx88_dvb (/lib/modules/3.3.8-1.fc16.x86_64/kernel/drivers/media/video/cx88/cx88-dvb.ko): No such device


Here's dmesg from modprobe cx88xx card=58 ; modprobe cx88-dvb:



[ 205.803990] Linux media interface: v0.10
[ 205.805918] Linux video capture interface: v2.00
[ 223.269594] cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.9 loaded
[ 223.273908] cx88[0]: subsystem: 11bd:0051, board: Pinnacle PCTV HD 800i [card=58,insmod option], frontend(s): 1
[ 223.273911] cx88[0]: TV tuner type 76, Radio tuner type -1
[ 223.390371] i2c-core: driver [tuner] using legacy suspend method
[ 223.390376] i2c-core: driver [tuner] using legacy resume method
[ 223.404724] tuner 4-0064: Tuner -1 found with type(s) Radio TV.
[ 223.470150] xc5000 4-0064: creating new instance
[ 223.471757] xc5000: Successfully identified at address 0x64
[ 223.471759] xc5000: Firmware has not been loaded previously
[ 223.471761] cx88[0]: Calling XC5000 callback
[ 223.496530] Registered IR keymap rc-pinnacle-pctv-hd
[ 223.496635] input: cx88 IR (Pinnacle PCTV HD 800i) as /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/0000:05:00.2/rc/rc0/input11
[ 223.496886] rc0: cx88 IR (Pinnacle PCTV HD 800i) as /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/0000:05:00.2/rc/rc0
[ 223.497469] cx88[0]/2: cx2388x 8802 Driver Manager
[ 223.497504] cx88[0]/2: found at 0000:05:00.2, rev: 5, irq: 18, latency: 32, mmio: 0xf6000000
[ 223.498349] cx88/2: cx2388x dvb driver version 0.0.9 loaded
[ 223.498353] cx88/2: registering cx8802 driver, type: dvb access: shared
[ 223.498358] cx88[0]/2: subsystem: 11bd:0051, board: Pinnacle PCTV HD 800i [card=58]
[ 223.498362] cx88[0]/2: cx2388x based DVB/ATSC card
[ 223.498365] cx8802_alloc_frontends() allocating 1 frontend(s)
[ 223.499483] IR NEC protocol handler initialized
[ 223.501609] IR RC5(x) protocol handler initialized
[ 223.503064] cx88[0]/2: frontend initialization failed
[ 223.503068] cx88[0]/2: dvb_register failed (err = -22)
[ 223.503069] cx88[0]/2: cx8802 probe failed, err = -22
[ 223.503272] IR RC6 protocol handler initialized
[ 223.504869] IR JVC protocol handler initialized
[ 223.506265] IR Sony protocol handler initialized
[ 223.507822] IR SANYO protocol handler initialized
[ 223.509810] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input12
[ 223.510129] IR MCE Keyboard/mouse protocol handler initialized
[ 223.511614] lirc_dev: IR Remote Control driver registered, major 248
[ 223.511946] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0
[ 223.511948] IR LIRC bridge handler initialized
[ 223.604436] cx88/2: cx2388x dvb driver version 0.0.9 loaded
[ 223.604440] cx88/2: registering cx8802 driver, type: dvb access: shared
[ 223.604444] cx88[0]/2: subsystem: 11bd:0051, board: Pinnacle PCTV HD 800i [card=58]
[ 223.604448] cx88[0]/2: cx2388x based DVB/ATSC card
[ 223.604450] cx8802_alloc_frontends() allocating 1 frontend(s)
[ 223.605826] cx88[0]/2: frontend initialization failed
[ 223.605830] cx88[0]/2: dvb_register failed (err = -22)
[ 223.605832] cx88[0]/2: cx8802 probe failed, err = -22


Thanks again---I've run out of ideas and any suggestions are great!

george_toolan
17th June 2012, 06:34 PM
Sorry, that was a silly suggestion. The card was already identified as card 58 earlier ;-)

Just make sure it is properly installed into the pci slot.

Do you have any BIOS options which might affect the pci slot like latency timers or dma busmastering?

Mack
18th June 2012, 12:46 AM
The only thing I ever fooled with in the BIOS were the fan settings. There are three pci settings and some more pcie settings. The pci settings are:

PCI ROM Priority - Legacy [ EFI Compatible is the alternative ]

PCI Latency Timer - 32 PCI Bus Clocks [ alternatives are 64, 96, 128, 160, 192, 224, 248 ]

VGA Palette Snoop - Disabled

The card is detected fine and the analog tv output works. The first error message "frontend initialization failed" is generated by



dvb_attach(s5h1409_attach,
&pinnacle_pctv_hd_800i_config,
&core->i2c_adap);


returning NULL. I believe the above call amounts to some sanity checking (which succeeds or else other errors would be generated) followed by calling s5h1409_attach on the remaining arguments. For that to return NULL seems to require one of two errors, here snipped out of the code for s5h1409_attach:



struct s5h1409_state *state = NULL;
u16 reg;

/* allocate memory for the internal state */
state = kzalloc(sizeof(struct s5h1409_state), GFP_KERNEL);
if (state == NULL)
goto error;

/* setup the state */
state->config = config;
state->i2c = i2c;
state->current_modulation = 0;
state->if_freq = S5H1409_VSB_IF_FREQ;

/* check if the demod exists */
reg = s5h1409_readreg(state, 0x04);
if ((reg != 0x0066) && (reg != 0x007f))
goto error;


pinnacle_pctv_hd_800i_config is



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 ,
};


At this point I am officially lost.

jmr821
22nd June 2012, 01:22 AM
I use that card with fedora 17 lxde. All you have to do with fedora 17 ( for cable and atsc ) is download the driver from the liniux tv site using the procedure they have listed , and cp the files . reboot . Then you have to figure out what to use to view tv. Me-tv is currently on vacation so i have been using kaffiene. If works ok but i like the layout of Metv better.

That is all i do to use the pinnacle 800i on my linux box. Now with my win tv 1600 i just get the tv app up and running and away i go nothing else to do.

Mack
22nd June 2012, 07:47 PM
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:



yum install kernel-devel git


Then get the latest v4l-dvb drivers. (See the LinuxTVwiki (http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers#If_the_Modules_did_not_load_cor rectly_or_the_device_is_still_not_configured_corre ctly_for_use:) for alternative approaches.)



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.



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



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



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



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



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



make


while still in the media_build/v4l directory. Assuming that there are no errors, then



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.



yum install dvb-apps w_scan mplayer


(1) Get the frequencies used by your provider:



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 (http://scte65scan.sourceforge.net/), download the source, then



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



./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



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



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:



mplayer dvb://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 ...