[media] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board...
authorIgor M. Liplianin <liplianin@me.by>
Tue, 25 Jan 2011 20:06:00 +0000 (17:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:32:18 +0000 (20:32 -0300)
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: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885.h

index fb2045af499f11089c3f86a1cc76756a56a1e947..ea88722cb4ab3250ce7719961610e3857057e41e 100644 (file)
@@ -344,6 +344,8 @@ struct cx23885_board cx23885_boards[] = {
                .porta          = CX23885_ANALOG_VIDEO,
                .portb          = CX23885_MPEG_DVB,
                .portc          = CX23885_MPEG_DVB,
+               .num_fds_portb  = 2,
+               .num_fds_portc  = 2,
                .tuner_type     = TUNER_XC5000,
                .tuner_addr     = 0x64,
                .input          = { {
index d621d76f3a9a3479932f0a65fdebd3d664eb986a..d778b1ae921735703dd3d1db857be95e04d6ad18 100644 (file)
@@ -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].num_fds_portb)
+                       dev->ts1.num_frontends =
+                               cx23885_boards[dev->board].num_fds_portb;
                if (cx23885_dvb_register(&dev->ts1) < 0) {
                        printk(KERN_ERR "%s() Failed to register dvb adapters on VID_B\n",
                               __func__);
@@ -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].num_fds_portc)
+                       dev->ts2.num_frontends =
+                               cx23885_boards[dev->board].num_fds_portc;
                if (cx23885_dvb_register(&dev->ts2) < 0) {
                        printk(KERN_ERR
                                "%s() Failed to register dvb on VID_C\n",
index d8c76b05e4d7c0736c50b5992b51992c75de035a..8db2797bc7c34892cd4bdd01b9ef966260d62e58 100644 (file)
@@ -205,6 +205,7 @@ typedef enum {
 struct cx23885_board {
        char                    *name;
        port_t                  porta, portb, portc;
+       int             num_fds_portb, num_fds_portc;
        unsigned int            tuner_type;
        unsigned int            radio_type;
        unsigned char           tuner_addr;