Commit 10d0dcd7 authored by Igor M. Liplianin's avatar Igor M. Liplianin Committed by Mauro Carvalho Chehab

[media] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure

This is needed for multifrontend support.
NetUP Dual DVB-T/C CI RF card has frontends connected to port B & C
Each frontend has two switchable cores - DVB-T & DVB-C
Signed-off-by: default avatarIgor M. Liplianin <liplianin@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 557f48d5
...@@ -344,6 +344,8 @@ struct cx23885_board cx23885_boards[] = { ...@@ -344,6 +344,8 @@ struct cx23885_board cx23885_boards[] = {
.porta = CX23885_ANALOG_VIDEO, .porta = CX23885_ANALOG_VIDEO,
.portb = CX23885_MPEG_DVB, .portb = CX23885_MPEG_DVB,
.portc = CX23885_MPEG_DVB, .portc = CX23885_MPEG_DVB,
.num_fds_portb = 2,
.num_fds_portc = 2,
.tuner_type = TUNER_XC5000, .tuner_type = TUNER_XC5000,
.tuner_addr = 0x64, .tuner_addr = 0x64,
.input = { { .input = { {
......
...@@ -1005,6 +1005,9 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) ...@@ -1005,6 +1005,9 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
} }
if (cx23885_boards[dev->board].portb == CX23885_MPEG_DVB) { if (cx23885_boards[dev->board].portb == CX23885_MPEG_DVB) {
if (cx23885_boards[dev->board].num_fds_portb)
dev->ts1.num_frontends =
cx23885_boards[dev->board].num_fds_portb;
if (cx23885_dvb_register(&dev->ts1) < 0) { if (cx23885_dvb_register(&dev->ts1) < 0) {
printk(KERN_ERR "%s() Failed to register dvb adapters on VID_B\n", printk(KERN_ERR "%s() Failed to register dvb adapters on VID_B\n",
__func__); __func__);
...@@ -1019,6 +1022,9 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) ...@@ -1019,6 +1022,9 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
} }
if (cx23885_boards[dev->board].portc == CX23885_MPEG_DVB) { if (cx23885_boards[dev->board].portc == CX23885_MPEG_DVB) {
if (cx23885_boards[dev->board].num_fds_portc)
dev->ts2.num_frontends =
cx23885_boards[dev->board].num_fds_portc;
if (cx23885_dvb_register(&dev->ts2) < 0) { if (cx23885_dvb_register(&dev->ts2) < 0) {
printk(KERN_ERR printk(KERN_ERR
"%s() Failed to register dvb on VID_C\n", "%s() Failed to register dvb on VID_C\n",
......
...@@ -205,6 +205,7 @@ typedef enum { ...@@ -205,6 +205,7 @@ typedef enum {
struct cx23885_board { struct cx23885_board {
char *name; char *name;
port_t porta, portb, portc; port_t porta, portb, portc;
int num_fds_portb, num_fds_portc;
unsigned int tuner_type; unsigned int tuner_type;
unsigned int radio_type; unsigned int radio_type;
unsigned char tuner_addr; unsigned char tuner_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment