TerraTec Cinergy T PCIe dual

From LinuxTVWiki
Jump to navigation Jump to search

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.

Terratec Cinergy T Dual PCIe


Overview/Features

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

  • Tuner #1: microtune mt2063
  • Demodulators #1: Micronas drx-3916k DVB-T/Analog TV
  • Tuner #2: microtune mt2063
  • Demodulators #2: Micronas 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).

Dual Tuner Support

This card advertises as being a dual tuner in the sense that you can have two streams active at one frontend at the same time (see package photo below). This is only true for DVB-T so the package is actually misleading. There are two tuners (microtune mt2063) which both can tune to a DVB-C frequency, but since only one demodulator supports DVB-C you can not demodulate the intermediate frequency specific to DVB-C, this is a hardware limitation. It shows itself as two adapters, the first offering DVB-T (and so not usable for DVB-C) and the second offering both DVB-T and DVB-C.

Remote Control support

I got it working, my patch is accepted [1]! The remote is transmitting signals following the NEC IR transmission protocol (32-bits, prefix 28D7*). 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 [2]. After I submit the patch I will also make my keymap available.

Currently (2013-02-20), to make this actually work you have to add the following to /etc/modprobe.d/ because the IR support is disabled by default for the card.

options cx23885 enable_885_ir=1

Patched kernel module output

[   11.274749] cx23885 driver version 0.0.3 loaded
[   11.275254] CORE cx23885[0]: subsystem: 153b:117e, board: TerraTec Cinergy T PCIe Dual [card=34,autodetected]
[   11.741283] cx25840 12-0044: cx23885 A/V decoder found @ 0x88 (cx23885[0])
[   14.190049] cx25840 12-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
[   14.205964] cx23885_dvb_register() allocating 1 frontend(s)
[   14.205969] cx23885[0]: cx23885 based dvb card
[   15.413869] DVB: registering new adapter (cx23885[0])
[   15.414083] cx23885_dvb_register() allocating 1 frontend(s)
[   15.414086] cx23885[0]: cx23885 based dvb card
[   15.530249] DVB: registering new adapter (cx23885[0])
[   15.530634] cx23885_dev_checkrevision() Hardware revision = 0xa5
[   15.530641] cx23885[0]/0: found at 0000:01:00.0, rev: 4, irq: 16, latency: 0, mmio: 0xfe400000
[   15.847212] Registered IR keymap rc-nec-terratec-cinergy-xs
[   15.847298] input: cx23885 IR (TerraTec Cinergy T PCIe Dual) as /devices/pci0000:00/0000:00:01.0/0000:01:00.0/rc/rc0/input11
[   15.850713] rc0: cx23885 IR (TerraTec Cinergy T PCIe Dual) as /devices/pci0000:00/0000:00:01.0/0000:01:00.0/rc/rc0
[   19.055655] input: MCE IR Keyboard/Mouse (cx23885) as /devices/virtual/input/input13
[   19.055742] IR MCE Keyboard/mouse protocol handler initialized
[   19.099013] init: Failed to spawn samba4 main process: unable to execute: No such file or directory
[   19.347470] lirc_dev: IR Remote Control driver registered, major 250 
[   19.354994] rc rc0: lirc_dev: driver ir-lirc-codec (cx23885) registered at minor = 0
[   19.354998] IR LIRC bridge handler initialized
[   50.603375] mt2063: detected a mt2063 B3
[   50.642691] mt2063: detected a mt2063 B3

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

Kernels loaded on 3.5.0:

uname -a
Linux riley 3.5.0-gentoo #4 SMP Mon Jul 30 21:38:32 CEST 2012 x86_64 AMD Phenom(tm) II X4 905e Processor AuthenticAMD GNU/Linux

lsmod
Module                  Size  Used by
cx25840                93604  1 
cx23885               134569  14 
rc_core                18280  1 cx23885
videobuf_dma_sg        13184  1 cx23885
cx2341x                21454  1 cx23885
videobuf_dvb           12762  1 cx23885
dvb_core               82025  2 cx23885,videobuf_dvb
videobuf_core          17729  3 cx23885,videobuf_dma_sg,videobuf_dvb
v4l2_common            13094  3 cx25840,cx23885,cx2341x
videodev               83897  4 cx25840,cx23885,cx2341x,v4l2_common
btcx_risc              12555  1 cx23885
tveeprom               20593  1 cx23885
mt2063                 21557  2 
drxk                   51250  2 

Besides the obvious v4l stuff, need are: CONFIG_VIDEO_CX23885 CONFIG_DVB_DRXK CONFIG_MEDIA_TUNER_MT2063

Also, the firmware for the cx23885 is needed.

Known Issues

The cx25840 driver does not work after suspend/hibernate. To fix this issue you should unload the following modules before suspend and load it after wake up. And automated way to do this are the pm-utils hooks or systemctls sleep hooks for systemd systems.

cx23885 cx25840

Other Images

External Links