Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bc37caa authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (6196): cx23885: add support for DViCO FusionHDTV 5 Express



This patch adds digital ATSC / QAM support for the DViCO FusionHDTV5 Express.
Remote control is supported by ir-kbd-i2c, RTC is supported by rtc-isl1208.

Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarSteven Toth <stoth@hauppauge.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 579f1163
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -109,6 +109,10 @@ struct cx23885_board cx23885_boards[] = {
			.gpio0  = 0xff02,
		}},
	},
	[CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = {
		.name		= "DViCO FusionHDTV5 Express",
		.portc		= CX23885_MPEG_DVB,
	},
};
const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);

@@ -136,6 +140,10 @@ struct cx23885_subid cx23885_subids[] = {
		.subvendor = 0x0070,
		.subdevice = 0x7911,
		.card      = CX23885_BOARD_HAUPPAUGE_HVR1250,
	},{
		.subvendor = 0x18ac,
		.subdevice = 0xd500,
		.card      = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP,
	},
};
const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
+26 −0
Original line number Diff line number Diff line
@@ -793,6 +793,32 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
	cx23885_ir_init(dev);

	switch (dev->board) {
	case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
		dev->ts2.reg_gpcnt          = VID_B_GPCNT;
		dev->ts2.reg_gpcnt_ctl      = VID_B_GPCNT_CTL;
		dev->ts2.reg_dma_ctl        = VID_B_DMA_CTL;
		dev->ts2.reg_lngth          = VID_B_LNGTH;
		dev->ts2.reg_hw_sop_ctrl    = VID_B_HW_SOP_CTL;
		dev->ts2.reg_gen_ctrl       = VID_B_GEN_CTL;
		dev->ts2.reg_bd_pkt_status  = VID_B_BD_PKT_STATUS;
		dev->ts2.reg_sop_status     = VID_B_SOP_STATUS;
		dev->ts2.reg_fifo_ovfl_stat = VID_B_FIFO_OVFL_STAT;
		dev->ts2.reg_vld_misc       = VID_B_VLD_MISC;
		dev->ts2.reg_ts_clk_en      = VID_B_TS_CLK_EN;
		dev->ts2.reg_ts_int_msk     = VID_B_INT_MSK;
		dev->ts2.reg_src_sel        = VID_B_SRC_SEL;

		// FIXME: Make this board specific
		dev->ts2.pci_irqmask = 0x02; /* TS Port 2 bit */
		dev->ts2.dma_ctl_val = 0x11; /* Enable RISC controller and Fifo */
		dev->ts2.ts_int_msk_val = 0x1111; /* TS port bits for RISC */
		dev->ts2.gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
		dev->ts2.ts_clk_en_val = 0x1; /* Enable TS_CLK */
		dev->ts2.src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;

		// Drive this from cards.c (portb/c) and move it outside of this switch
		dev->ts2.sram_chno = SRAM_CH03;
		break;
	default:
		dev->ts2.reg_gpcnt          = VID_C_GPCNT;
		dev->ts2.reg_gpcnt_ctl      = VID_C_GPCNT_CTL;
+18 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@

#include "s5h1409.h"
#include "mt2131.h"
#include "lgdt330x.h"
#include "dvb-pll.h"

static unsigned int debug = 0;

@@ -101,6 +103,12 @@ static struct mt2131_config hauppauge_generic_tunerconfig = {
	0x61
};

static struct lgdt330x_config fusionhdtv_5_express = {
	.demod_address = 0x0e,
	.demod_chip = LGDT3303,
	.serial_mpeg = 0x40,
};

static int dvb_register(struct cx23885_tsport *port)
{
	struct cx23885_dev *dev = port->dev;
@@ -131,6 +139,16 @@ static int dvb_register(struct cx23885_tsport *port)
				   &hauppauge_generic_tunerconfig, 0);
		}
		break;
	case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
		port->dvb.frontend = dvb_attach(lgdt330x_attach,
						&fusionhdtv_5_express,
						&dev->i2c_bus[0].i2c_adap);
		if (port->dvb.frontend != NULL) {
			dvb_attach(dvb_pll_attach, port->dvb.frontend,
				   0x61, &dev->i2c_bus[0].i2c_adap,
				   DVB_PLL_LG_TDVS_H06XF);
		}
		break;
	default:
		printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
		       dev->name);
+4 −2
Original line number Diff line number Diff line
@@ -305,12 +305,14 @@ static struct i2c_client cx23885_i2c_client_template = {
};

static char *i2c_devs[128] = {
	[ 0x1c >> 1 ] = "lgdt3303",
	[ 0x86 >> 1 ] = "tda9887",
	[ 0x32 >> 1 ] = "cx24227",
	[ 0x88 >> 1 ] = "cx25837",
	[ 0x84 >> 1 ] = "tda8295",
	[ 0xa0 >> 1 ] = "eeprom",
	[ 0xc0 >> 1 ] = "mt2131/tda8275",
	[ 0xc2 >> 1 ] = "mt2131/tda8275",
	[ 0xc0 >> 1 ] = "tuner/mt2131/tda8275",
	[ 0xc2 >> 1 ] = "tuner/mt2131/tda8275",
};

static void do_i2c_scan(char *name, struct i2c_client *c)
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
#define CX23885_BOARD_HAUPPAUGE_HVR1800lp      1
#define CX23885_BOARD_HAUPPAUGE_HVR1800        2
#define CX23885_BOARD_HAUPPAUGE_HVR1250        3
#define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP   4

enum cx23885_itype {
	CX23885_VMUX_COMPOSITE1 = 1,
Loading