TerraTec Cinergy T PCIe dual: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
(Found out some more information about the remote)
(Got the remote working!)
Line 38: Line 38:
== Remote Control support ==
== Remote Control support ==


I got it working, a patch is in the making! The remote is transmitting signals following the NEC IR transmission protocol. The remote is used for several Terratec TV products (e.g. Terratec Cinergy S2 PCI HD).
The supplied IR remote is not supported yet, there is generic support in the kernel module for cx23885-based DVB-cards but this does not work for this card. (modprobe cx23885 enable_885_ir=1).
Processing of the signals is a little different than the other chipsets so you need another keymap than already available in the LIRC database at [http://lirc.sourceforge.net/remotes/terratec/]. After I submit the patch I will also make my keymap available.
Another card that has the same PCIe bridge does work, see http://www.linuxtv.org/wiki/index.php/TeVii_S470


I think it's the Conexant cx23885 chipset IR receiver and transmitter logic that has to be used, see the product sheet on [http://www.conexant.com/products/entry.jsp?id=393].

The remote control appears to transmit signals following the NEC IR transmission protocol, just like the TeVii S470. The remote is also used with other Terratec Cinergy cards, so the keymap is already defined in file '''v4l/rc-nec-terratec-cinergy-xs.c''', an LIRC keymap can be found on [http://lirc.sourceforge.net/remotes/terratec/Cinergy_S2_PCI_HD] (you can compare the remote with my image below and [http://lirc.sourceforge.net/remotes/terratec/Cinergy_S2_PCI_HD.jpg]).

I modified the source code (most of it are switch statements in cx23884-cards.c and cx23884-input.c), compiled it and ran it with modprobe cx23885 enable_885_ir=1 and got the following output:
<pre>
<pre>
Jul 27 17:38:31 tvserver kernel: [ 1241.125398] cx23885 driver version 0.0.3 loaded
Jul 27 17:38:31 tvserver kernel: [ 1241.125398] cx23885 driver version 0.0.3 loaded
Line 84: Line 79:
Jul 27 17:38:32 tvserver kernel: [ 1242.166244] rc rc0: lirc_dev: driver ir-lirc-codec (cx23885) registered at minor = 0
Jul 27 17:38:32 tvserver kernel: [ 1242.166244] rc rc0: lirc_dev: driver ir-lirc-codec (cx23885) registered at minor = 0
Jul 27 17:38:32 tvserver kernel: [ 1242.166247] IR LIRC bridge handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.166247] IR LIRC bridge handler initialized
</pre>

Unfortunately it did not work yet, I think it has something to do with the vendor specific frequency defined in cx23885-input.c around line 167:
<pre>
case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: // added this line myself
case CX23885_BOARD_TEVII_S470:
/*
* The IR controller on this board only returns pulse widths.
* Any other mode setting will fail to set up the device.
*/
params.mode = V4L2_SUBDEV_IR_MODE_PULSE_WIDTH;
params.enable = true;
params.interrupt_enable = true;
params.shutdown = false;

/* Setup for a standard NEC protocol */
params.carrier_freq = 37917; /* Hz, 455 kHz/12 for NEC */
params.carrier_range_lower = 33000; /* Hz */
params.carrier_range_upper = 43000; /* Hz */
params.duty_cycle = 33; /* percent, 33 percent for NEC */

/*
* NEC max pulse width: (64/3)/(455 kHz/12) * 16 nec_units
* (64/3)/(455 kHz/12) * 16 nec_units * 1.375 = 12378022 ns
*/
params.max_pulse_width = 12378022; /* ns */

/*
* NEC noise filter min width: (64/3)/(455 kHz/12) * 1 nec_unit
* (64/3)/(455 kHz/12) * 1 nec_units * 0.625 = 351648 ns
*/
params.noise_filter_min_width = 351648; /* ns */

params.modulation = false;
params.invert_level = true;
break;
</pre>

Turning i2c_scan on in the kernel modul (modprobe cx23885 i2c_scan=1) gave me this output:
<pre>
[149688.088680] cx23885[0]: scan bus 0:
[149688.094389] cx23885[0]: i2c scan: found device @ 0x52 [???]
[149688.099654] cx23885[0]: i2c scan: found device @ 0xa0 [eeprom]
[149688.106237] cx23885[0]: scan bus 1:
[149688.119350] cx23885[0]: i2c scan: found device @ 0xc0 [tuner/mt2131/tda8275] <-- this entry could be from another USB TV card
[149688.120302] cx23885[0]: i2c scan: found device @ 0xce [???]
[149688.123748] cx23885[0]: scan bus 2:
[149688.125622] cx23885[0]: i2c scan: found device @ 0x66 [???]
[149688.126235] cx23885[0]: i2c scan: found device @ 0x88 [cx25837]
[149688.126525] cx23885[0]: i2c scan: found device @ 0x98 [flatiron]
</pre>
</pre>



Revision as of 18:29, 27 July 2012

A dual-tuner DVB-T PCIe card sold by TerraTec. This card appears to be supported from kernel 3.3 by LinuxTV drivers (not confirmed). Testing on 3.3.0 did not appear to work, while 3.4.3 works (DVB-T/C no analog). In 3.4.6 it works quite well, also tested watching two channels at the same same on DVB-C and this works.

Overview/Features

This is technically a very interesting card. The hardware is as follows:

  • Tuner #1: microtune mt2063
  • Demodulators #1: drx-3916k DVB-T/Analoge TV
  • Tuner #2: microtune mt2063
  • Demodulators #2: drx-3913k DVB-T/DVB-C
  • PCI Express x1 Bridge: Conexant cx23885

Inputs:

  • 1x Antenna (Coax)
  • 1x Remote (2,5 mm jack)

Package contents:

  • Card
  • Low profile bracket
  • Remote (+ AAA batteries)
  • DVB-T antenna
  • IR receiver
  • Windows Software & Installation DVD
  • Quick setup guide

Support

This card is supported from kernel version 3.3 (?). The microtune tuner was merged in kernel version 3.3 (see first submission).

The card itself was added upstream on LinuxTV's git repository on 2011-12-17 and may have been merged upstream.

The first frontend supports only DVB-T, but support for analogue TV is planned for kernel 3.4 or 3.5. The second frontend supports both DVB-T and DVB-C in a multifrontend device (spec's DVB v5 API).


Also, this card is a dual tuner in the sense that you can have two streams active at one frontend at the same time. This works for watching/recording two different channels at the same time or record one and watch another (So two times DVB-C or DVB-T, I only tried DVB-C myself).

Remote Control support

I got it working, a patch is in the making! The remote is transmitting signals following the NEC IR transmission protocol. The remote is used for several Terratec TV products (e.g. Terratec Cinergy S2 PCI HD). Processing of the signals is a little different than the other chipsets so you need another keymap than already available in the LIRC database at [1]. After I submit the patch I will also make my keymap available.

Jul 27 17:38:31 tvserver kernel: [ 1241.125398] cx23885 driver version 0.0.3 loaded
Jul 27 17:38:31 tvserver kernel: [ 1241.126162] CORE cx23885[0]: subsystem: 153b:117e, board: TerraTec Cinergy T PCIe Dual [card=34,autodetected]
Jul 27 17:38:31 tvserver kernel: [ 1241.254676] cx25840 12-0044: cx23885 A/V decoder found @ 0x88 (cx23885[0])
Jul 27 17:38:31 tvserver kernel: [ 1241.873747] cx25840 12-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
Jul 27 17:38:31 tvserver kernel: [ 1241.889685] cx23885_dvb_register() allocating 1 frontend(s)
Jul 27 17:38:31 tvserver kernel: [ 1241.889688] cx23885[0]: cx23885 based dvb card
Jul 27 17:38:31 tvserver kernel: [ 1241.908415] drxk: status = 0x639160d9
Jul 27 17:38:31 tvserver kernel: [ 1241.908419] drxk: detected a drx-3916k, spin A3, xtal 20.250 MHz
Jul 27 17:38:31 tvserver kernel: [ 1241.983992] DRXK driver version 0.9.4300
Jul 27 17:38:32 tvserver kernel: [ 1242.007350] drxk: frontend initialized.
Jul 27 17:38:32 tvserver kernel: [ 1242.007368] mt2063_attach: Attaching MT2063
Jul 27 17:38:32 tvserver kernel: [ 1242.007374] DVB: registering new adapter (cx23885[0])
Jul 27 17:38:32 tvserver kernel: [ 1242.007378] DVB: registering adapter 0 frontend 0 (DRXK DVB-T)...
Jul 27 17:38:32 tvserver kernel: [ 1242.007713] cx23885_dvb_register() allocating 1 frontend(s)
Jul 27 17:38:32 tvserver kernel: [ 1242.007716] cx23885[0]: cx23885 based dvb card
Jul 27 17:38:32 tvserver kernel: [ 1242.024246] drxk: status = 0x639130d9
Jul 27 17:38:32 tvserver kernel: [ 1242.024250] drxk: detected a drx-3913k, spin A3, xtal 20.250 MHz
Jul 27 17:38:32 tvserver kernel: [ 1242.099813] DRXK driver version 0.9.4300
Jul 27 17:38:32 tvserver kernel: [ 1242.123131] drxk: frontend initialized.
Jul 27 17:38:32 tvserver kernel: [ 1242.123150] mt2063_attach: Attaching MT2063
Jul 27 17:38:32 tvserver kernel: [ 1242.123156] DVB: registering new adapter (cx23885[0])
Jul 27 17:38:32 tvserver kernel: [ 1242.123160] DVB: registering adapter 1 frontend 0 (DRXK DVB-C DVB-T)...
Jul 27 17:38:32 tvserver kernel: [ 1242.123613] cx23885_dev_checkrevision() Hardware revision = 0xa5
Jul 27 17:38:32 tvserver kernel: [ 1242.123622] cx23885[0]/0: found at 0000:01:00.0, rev: 4, irq: 16, latency: 0, mmio: 0xfe400000
Jul 27 17:38:32 tvserver kernel: [ 1242.148519] Registered IR keymap rc-nec-terratec-cinergy-xs
Jul 27 17:38:32 tvserver kernel: [ 1242.148626] input: cx23885 IR (TerraTec Cinergy T PCIe Dual) as /devices/pci0000:00/0000:00:01.0/0000:01:00.0/rc/rc0/input17
Jul 27 17:38:32 tvserver kernel: [ 1242.152069] rc0: cx23885 IR (TerraTec Cinergy T PCIe Dual) as /devices/pci0000:00/0000:00:01.0/0000:01:00.0/rc/rc0
Jul 27 17:38:32 tvserver kernel: [ 1242.154638] IR NEC protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.156086] IR RC5(x) protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.157704] IR RC6 protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.159158] IR JVC protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.160578] IR Sony protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.162044] IR SANYO protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.163500] input: MCE IR Keyboard/Mouse (cx23885) as /devices/virtual/input/input18
Jul 27 17:38:32 tvserver kernel: [ 1242.164135] IR MCE Keyboard/mouse protocol handler initialized
Jul 27 17:38:32 tvserver kernel: [ 1242.166244] rc rc0: lirc_dev: driver ir-lirc-codec (cx23885) registered at minor = 0
Jul 27 17:38:32 tvserver kernel: [ 1242.166247] IR LIRC bridge handler initialized

lspci output

Kernel 3.4.6

01:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder [14f1:8852] (rev 04)
	Subsystem: TERRATEC Electronic GmbH Device [153b:117e]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at fe400000 (64-bit, non-prefetchable) [size=2M]
	Capabilities: [40] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <2us, L1 <4us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [80] 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-
	Capabilities: [90] Vital Product Data
		Product Name: "
		End
	Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		AERCap:	First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
	Capabilities: [200 v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed+ WRR32+ WRR64+ WRR128-
		Ctrl:	ArbSelect=WRR64
		Status:	InProgress-
		Port Arbitration Table [240] <?>
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=01
			Status:	NegoPending- InProgress-
	Kernel driver in use: cx23885
	Kernel modules: cx23885

dmesg output

Jul 25 20:18:32 tvserver kernel: [   25.884176] cx25840 12-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
Jul 25 20:18:32 tvserver kernel: [   25.916206] cx23885_dvb_register() allocating 1 frontend(s)
Jul 25 20:18:32 tvserver kernel: [   25.916209] cx23885[0]: cx23885 based dvb card
...
Jul 25 20:18:32 tvserver kernel: [   26.182648] drxk: status = 0x639160d9
Jul 25 20:18:32 tvserver kernel: [   26.182674] drxk: detected a drx-3916k, spin A3, xtal 20.250 MHz
Jul 25 20:18:32 tvserver kernel: [   26.258198] DRXK driver version 0.9.4300
Jul 25 20:18:32 tvserver kernel: [   26.281462] drxk: frontend initialized.
Jul 25 20:18:32 tvserver kernel: [   26.320861] mt2063_attach: Attaching MT2063
Jul 25 20:18:32 tvserver kernel: [   26.320865] DVB: registering new adapter (cx23885[0])
Jul 25 20:18:32 tvserver kernel: [   26.320869] DVB: registering adapter 0 frontend 0 (DRXK DVB-T)...
Jul 25 20:18:32 tvserver kernel: [   26.321292] cx23885_dvb_register() allocating 1 frontend(s)
Jul 25 20:18:32 tvserver kernel: [   26.321295] cx23885[0]: cx23885 based dvb card
Jul 25 20:18:32 tvserver kernel: [   26.338405] drxk: status = 0x639130d9
Jul 25 20:18:32 tvserver kernel: [   26.338431] drxk: detected a drx-3913k, spin A3, xtal 20.250 MHz
Jul 25 20:18:32 tvserver kernel: [   26.413948] DRXK driver version 0.9.4300
Jul 25 20:18:32 tvserver kernel: [   26.437218] drxk: frontend initialized.
Jul 25 20:18:32 tvserver kernel: [   26.437225] mt2063_attach: Attaching MT2063
Jul 25 20:18:32 tvserver kernel: [   26.437228] DVB: registering new adapter (cx23885[0])
Jul 25 20:18:32 tvserver kernel: [   26.437231] DVB: registering adapter 1 frontend 0 (DRXK DVB-C DVB-T)...
Jul 25 20:18:32 tvserver kernel: [   26.437612] cx23885_dev_checkrevision() Hardware revision = 0xa5
Jul 25 20:18:32 tvserver kernel: [   26.437617] cx23885[0]/0: found at 0000:01:00.0, rev: 4, irq: 16, latency: 0, mmio: 0xfe400000
..
Jul 25 20:24:47 tvserver kernel: [  400.894466] drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params:
Jul 25 20:24:47 tvserver kernel: [  400.894472] drxk: 02 00 00 00 10 00 07 00 03 02                    ..........
(last two lines keeps repeating every 20 seconds. Works perfectly though)

user@tvserver:~$ uname -ar
Linux tvserver 3.4.6-030406-generic #201207191609 SMP Thu Jul 19 20:11:13 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Other Images

External Links