Skip to contentSkip to conversation

TT S2-3200 + CI Extension

linux-dvb Martin Hurton 3 participants 11 messages Aug 25, 2008 – Aug 30, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi List,

I have the TT-budget S2-3200 card with CI Extension and have problem to get it work with my CAM module. I have tried different CI Extensions, different CI cables, different CAM modules, and also different computers but still without any success. I am using multiproto driver.

Debugging the driver I have found the problem is in the following code:
(budget-ci.c).

507 ci_version = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1, 0);
508 if ((ci_version & 0xa0) != 0xa0) {
509 result = -ENODEV;
510 goto error;
511 }

it seems the driver expects the high nibble of ci_version to be 0xa but in my case, the ci_version is always zero. And because of this, the CA is not supported.

Did anybody have this same problem? Or can somebody explains why this happens? Any help will be greatly appreciated.

Regards,
/Martin

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#1 lore raw
Quoted 16 lines · Martin Hurton

Hi List,

I have the TT-budget S2-3200 card with CI Extension and have problem to get it work with my CAM module. I have tried different CI Extensions, different CI cables, different CAM modules, and also different computers but still without any success. I am using multiproto driver.

Debugging the driver I have found the problem is in the following code:
(budget-ci.c).

507 ci_version = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1, 0);
508 if ((ci_version & 0xa0) != 0xa0) {
509 result = -ENODEV;
510 goto error;
511 }

Quoted 8 lines

it seems the driver expects the high nibble of ci_version to be 0xa but in my case, the ci_version is always zero. And because of this, the CA is not supported.

Did anybody have this same problem? Or can somebody explains why this happens? Any help will be greatly appreciated.

Martin,

I am investigating a simillar (but not the same) problem with a TT-3200 and a T-Rex/Dragon CAM (see my postings in the last week). I am beginning to come to the conclusion that either I have a hardware problem or the TT-3200 does not like certain CAMs, this is partially born out by the fact the some incompatible cams are listed on the wiki
http://www.linuxtv.org/wiki/index.php/DVB_Conditional_Access_Modules . I don't know whether this is a hardware or software (or both) incompatibility. If it software it could be fixable. Does anyone know?

I did come across a post, which I have been unable to find again! This referred to the fact that the Dragon CAM was asserting a line on PCMCIA interface that said it was a low voltage device (3.5V) and that this was outside the CI spec and causing a problem with the budget CI.

However this link says that it should work. I don't know if your CAM is on it. I suspect this is referring to the supplied windows driver
http://www.dvbnetwork.de/index.php?option=com_fireboard&func=view&id=927&catid=2&Itemid=26

I would love to investigate further but really need some specs of the software interface to the 3200. Can anyone point me at further info? All I have at the momenet is the spec for the SAA7146 chip and the en50221 CI spec.

Sorry I cannot offer any direct help. But I thought you might like to know you are not the only one fighting with this piece of hardware :-)

Roger

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#2 lore raw

Hi Guys

What is the hardware revision of your CI board (printed on the bottom of the PCB just above the PCI connector)?

I have a Rev 1.1 on my TT S2-3200 which requires polling, as well a Rev 1.0 on an old NOVA-S card which provides an interrupt, both of which work with the current driver. The version testing code was added to the driver to handle these two boards. Maybe there is a new revision out that the driver does not yet cater for.

A working CI and CAM combination should produce the following output when the driver loads:

Linux video capture interface: v2.00
saa7146: register extension 'dvb'.
saa7146: register extension 'budget_ci dvb'.
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5
PCI: setting IRQ 5 as level-triggered
ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKB] -> GSI 5 (level, low) -> IRQ 5
saa7146: found saa7146 @ mem d8ae8000 (revision 1, irq 5) (0x13c2,0x1019). saa7146 (0): dma buffer size 192512
DVB: registering new adapter (TT-Budget S2-3200 PCI)
adapter has MAC addr = 00:d0:5c:64:ba:14
input: Budget-CI dvb ir receiver saa7146 (0) as /devices/pci0000:00/0000:00:09.0/input/input6
budget_ci: CI interface initialised
stb0899_get_dev_id: Device ID=[8], Release=[2]
stb0899_get_dev_id: Demodulator Core ID=[DMD1], Version=[1]
stb0899_get_dev_id: FEC Core ID=[FEC1], Version=[1]
stb0899_attach: Attaching STB0899
stb6100_attach: Attaching STB6100
dvb_ca adapter 0: DVB CAM detected and initialised successfully
DVB: registering frontend 0 (STB0899 Multistandard)...

Quoted 5 lines
Quoted 5 lines

508 if ((ci_version & 0xa0) != 0xa0) {
509 result = -ENODEV;
510 goto error;
511 }

Martin, have you tried commenting out this test to see if you then can get the 'CI interface initialised' message?

Quoted 4 lines

Sorry I cannot offer any direct help. But I thought you might like to know you are not the only one fighting with this piece of hardware :-)

Roger

Roger, in your other message you said your CI board reports the version as 0xa0 which the driver expects to generate interrupts, which clearly it doesn't. Have you tried changing the code so that the driver uses polling for your CI version?

Werner

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#3 lore raw

Hi Werner

Quoted 4 lines · Werner Hauger

Hi Guys

What is the hardware revision of your CI board (printed on the bottom of the PCB just above the PCI connector)?

The revision of my CI board is 1.1.

Quoted 32 lines

I have a Rev 1.1 on my TT S2-3200 which requires polling, as well a Rev 1.0 on an old NOVA-S card which provides an interrupt, both of which work with the current driver. The version testing code was added to the driver to handle these two boards. Maybe there is a new revision out that the driver does not yet cater for.

A working CI and CAM combination should produce the following output when the driver loads:

Linux video capture interface: v2.00
saa7146: register extension 'dvb'.
saa7146: register extension 'budget_ci dvb'.
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5
PCI: setting IRQ 5 as level-triggered
ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKB] -> GSI 5 (level, low) -> IRQ 5
saa7146: found saa7146 @ mem d8ae8000 (revision 1, irq 5) (0x13c2,0x1019). saa7146 (0): dma buffer size 192512
DVB: registering new adapter (TT-Budget S2-3200 PCI)
adapter has MAC addr = 00:d0:5c:64:ba:14
input: Budget-CI dvb ir receiver saa7146 (0) as /devices/pci0000:00/0000:00:09.0/input/input6
budget_ci: CI interface initialised
stb0899_get_dev_id: Device ID=[8], Release=[2]
stb0899_get_dev_id: Demodulator Core ID=[DMD1], Version=[1]
stb0899_get_dev_id: FEC Core ID=[FEC1], Version=[1]
stb0899_attach: Attaching STB0899
stb6100_attach: Attaching STB6100
dvb_ca adapter 0: DVB CAM detected and initialised successfully
DVB: registering frontend 0 (STB0899 Multistandard)...

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

508 if ((ci_version & 0xa0) != 0xa0) {
509 result = -ENODEV;
510 goto error;
511 }

Martin, have you tried commenting out this test to see if you then can get the 'CI interface initialised' message?

When I comment out the above code, I can see the "CI interface initialised" message, but cannot see the "dvb_ca adapter 0: DVB CAM detected and initialised successfully" one. The CA is not working.

Quoted 4 lines
Quoted 4 lines

Sorry I cannot offer any direct help. But I thought you might like to know you are not the only one fighting with this piece of hardware :-)

Quoted 8 lines
Quoted 1 line

Roger

Roger, in your other message you said your CI board reports the version as 0xa0 which the driver expects to generate interrupts, which clearly it doesn't. Have you tried changing the code so that the driver uses polling for your CI version?

Werner

Do you know of any way to make sure the connection between TT-3200 and CI board is working properly?

Regards,
/Martin

Quoted 5 lines

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#4 lore raw

Hi

Quoted 2 lines · Martin Hurton

The revision of my CI board is 1.1.

Ok.

Quoted 3 lines

When I comment out the above code, I can see the "CI interface initialised" message, but cannot see the "dvb_ca adapter 0: DVB CAM detected and initialised successfully" one. The CA is not working.

Good, that means there is communication between the TT-3200 and the CI board. The firmware version reported by your CI was preventing any attempt to communicate. A few lines further down from your change is another version check that decides if polling or interrupts should be used:

// version 0xa2 of the CI firmware doesn't generate interrupts

        if (ci_version == 0xa2) {
                ca_flags = 0;
                budget_ci->ci_irq = 0;
        } else {
                ca_flags = DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE |
                                DVB_CA_EN50221_FLAG_IRQ_FR |
                                DVB_CA_EN50221_FLAG_IRQ_DA;
                budget_ci->ci_irq = 1;
        }

The default is interrupts which you say doesn't work. You can try adding your CI version to the if section test (or rearranging the whole if/else section so that the two values are always set as per the if section) to see if polling gets your CAM initialised.

Werner

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#7 lore raw

Hi

2008/8/27 Roger James <[email protected]>:

Quoted 5 lines

Roger James wrote:

Do you ( or anyone) know of any source of information on the software interface to these boards? The guys who wrote the original code must have had some. Is Andrew de Quincey still active on the list?

Unfortunately not. Andrew had documentation from TT/Hauppauge but under NDA. I did not see anything from him on the list after he added support for the then new 1.1 version.

Quoted 4 lines

Hooray,

I have got it working. I took out the TT3200 and the CI board to check their versions. Before putting them back in I cleaned and reseated the DEBI

So what revision of the CI board do you have ?

Quoted 8 lines

interface cable connections. Whilst I was playing with some more diagnostics I noticed I was getting back a 0x1d (CISTPL_DEVICE_OA) code from the call the read_attribute_memory in the call to ciintf_poll_status I had put into the "PC card not responding" path. I put back the change to use polling mode for firmware version 0xa0 that I had tried and failed with before, and lo and behold it all burst into life. Well at least it appears to have intiailised, whether it will decrypt is for another day.

I'm glad you got it working. I wonder if that means there we indeed have different CI firmware on new CI boards that need to be catered for in the driver.

Quoted 139 lines

Here is the dmesg output now for information.

saa7146: register extension 'budget_ci dvb'.
ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKD] -> GSI 12 (level, low) -> IRQ 12
saa7146: found saa7146 @ mem e0a42000 (revision 1, irq 12) (0x13c2,0x1019). saa7146 (0): dma buffer size 192512
DVB: registering new adapter (TT-Budget S2-3200 PCI)
adapter has MAC addr = 00:d0:5c:68:34:04
input: Budget-CI dvb ir receiver saa7146 (0) as /class/input/input9
budget_ci: Slot status d587c000 set to NONE 3 ci_version a0
budget_ci: Slot status d587c000 set to PRESENT dvb_ca_en50221_init
budget_ci: CI interface initialised
dvb_ca_en50221_thread
budget_ci: Slot status d587c000 set to RESET
budget_ci: Slot status d587c000 set to READY
budget_ci: read_attribute 1d
TUPLE type:0x1d length:4
0x00: 0x00 .
0x01: 0x61 a
0x02: 0x00 .
0x03: 0xff .
TUPLE type:0x1c length:4
0x00: 0x00 .
0x01: 0xd3 .
0x02: 0x00 .
0x03: 0xff .
TUPLE type:0x15 length:27
0x00: 0x05 .
0x01: 0x00 .
0x02: 0x54 T
0x03: 0x2d -
0x04: 0x52 R
0x05: 0x45 E
0x06: 0x58 X
0x07: 0x58 X
0x08: 0x00 .
0x09: 0x54 T
0x0a: 0x52 R
0x0b: 0x45 E
0x0c: 0x58 X
0x0d: 0x20
0x0e: 0x43 C
0x0f: 0x41 A
0x10: 0x4d M
0x11: 0x00 .
0x12: 0x52 R
0x13: 0x45 E
0x14: 0x56 V
0x15: 0x00 .
0x16: 0x32 2
0x17: 0x2e .
0x18: 0x32 2
0x19: 0x00 .
0x1a: 0xff .
TUPLE type:0x20 length:4
0x00: 0xc9 .
0x01: 0x02 .
0x02: 0x01 .
0x03: 0x01 .
TUPLE type:0x1a length:21
0x00: 0x01 .
0x01: 0x39 9
0x02: 0x00 .
0x03: 0x02 .
0x04: 0x03 .
0x05: 0xc0 .
0x06: 0x0e .
0x07: 0x41 A
0x08: 0x02 .
0x09: 0x44 D
0x0a: 0x56 V
0x0b: 0x42 B
0x0c: 0x5f _
0x0d: 0x43 C
0x0e: 0x49 I
0x0f: 0x5f _
0x10: 0x56 V
0x11: 0x31 1
0x12: 0x2e .
0x13: 0x30 0
0x14: 0x30 0
TUPLE type:0x1b length:42
0x00: 0xf9 .
0x01: 0x04 .
0x02: 0x09 .
0x03: 0x7f .
0x04: 0x55 U
0x05: 0xcd .
0x06: 0x19 .
0x07: 0xd5 .
0x08: 0x19 .
0x09: 0x3d =
0x0a: 0x9e .
0x0b: 0x25 %
0x0c: 0x26 &
0x0d: 0x54 T
0x0e: 0x22 "
0x0f: 0xc0 .
0x10: 0x09 .
0x11: 0x44 D
0x12: 0x56 V
0x13: 0x42 B
0x14: 0x5f _
0x15: 0x48 H
0x16: 0x4f O
0x17: 0x53 S
0x18: 0x54 T
0x19: 0x00 .
0x1a: 0xc1 .
0x1b: 0x0e .
0x1c: 0x44 D
0x1d: 0x56 V
0x1e: 0x42 B
0x1f: 0x5f _
0x20: 0x43 C
0x21: 0x49 I
0x22: 0x5f _
0x23: 0x4d M
0x24: 0x4f O
0x25: 0x44 D
0x26: 0x55 U
0x27: 0x4c L
0x28: 0x45 E
0x29: 0x00 .
TUPLE type:0x14 length:0
END OF CHAIN TUPLE type:0xff
Valid DVB CAM detected MANID:2c9 DEVID:101 CONFIGBASE:0x200 CONFIGOPTION:0x39
dvb_ca_en50221_set_configoption
Set configoption 0x39, read configoption 0x39
DVB CAM validated successfully
dvb_ca_en50221_link_init
dvb_ca_en50221_wait_if_status
dvb_ca_en50221_wait_if_status succeeded timeout:0 dvb_ca_en50221_read_data
Received CA packet for slot 0 connection id 0x0 last_frag:0 size:0x2 Chosen link buffer size of 255

Quoted 8 lines

dvb_ca_en50221_wait_if_status dvb_ca_en50221_wait_if_status succeeded timeout:0 dvb_ca_en50221_write_data
Wrote CA packet for slot 0, connection id 0x0 last_frag:0 size:0x2 dvb_ca adapter 0: DVB CAM detected and initialised successfully
stb0899_attach: Attaching STB0899
stb6100_attach: Attaching STB6100
DVB: registering frontend 0 (STB0899 Multistandard)...

That looks perfect.

Werner

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb