[media] saa7134: Add support for Snazio TvPVR PRO
authorGEORGE <geoubuntu@gmail.com>
Sun, 14 Feb 2016 21:23:15 +0000 (19:23 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 3 Mar 2016 12:03:48 +0000 (09:03 -0300)
This board has PCI ID: 1779:13cf

[mchehab@osg.samsung.com: Make scripts/checkpatch.pl happy]
Signed-off-by: Pojar George <geoubuntu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Documentation/video4linux/CARDLIST.saa7134
drivers/media/pci/saa7134/saa7134-cards.c
drivers/media/pci/saa7134/saa7134-input.c
drivers/media/pci/saa7134/saa7134.h

index 282102014bb993017c0a481f1e6f3fe6fb11c60f..335c243388592a5ca3f4037729afa8ae0117a3b5 100644 (file)
 193 -> WIS Voyager or compatible                [1905:7007]
 194 -> AverMedia AverTV/505                     [1461:a10a]
 195 -> Leadtek Winfast TV2100 FM                [107d:6f3a]
+196 -> SnaZio* TVPVR PRO                        [1779:13cf]
index 9a2fdc78eb85ea58470abcf68a7e0a445b6f94d0..c480a7e87593c51af3abc76045b117335ee0ed33 100644 (file)
@@ -5733,7 +5733,36 @@ struct saa7134_board saa7134_boards[] = {
                        .gpio = 0x08,
                },
        },
-
+       [SAA7134_BOARD_SNAZIO_TVPVR_PRO] = {
+               .name           = "SnaZio* TVPVR PRO",
+               .audio_clock    = 0x00187de7,
+               .tuner_type     = TUNER_PHILIPS_TDA8290,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .gpiomask       = 1 << 21,
+               .inputs         = { {
+                       .type = SAA7134_INPUT_TV,
+                       .vmux = 1,
+                       .amux = TV,
+                       .gpio = 0x0000000,
+               }, {
+                       .type = SAA7134_INPUT_COMPOSITE1,
+                       .vmux = 3,
+                       .amux = LINE2,
+                       .gpio = 0x0000000,
+               }, {
+                       .type = SAA7134_INPUT_SVIDEO,
+                       .vmux = 8,
+                       .amux = LINE2,
+                       .gpio = 0x0000000,
+               } },
+               .radio = {
+                       .type = SAA7134_INPUT_RADIO,
+                       .amux = TV,
+                       .gpio = 0x0200000,
+               },
+       },
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -7003,6 +7032,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
                .subvendor    = 0x107d,
                .subdevice    = 0x6f3a,
                .driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM,
+       }, {
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+               .subvendor    = 0x1779, /* V One Multimedia PTE Ltd */
+               .subdevice    = 0x13cf,
+               .driver_data  = SAA7134_BOARD_SNAZIO_TVPVR_PRO,
        }, {
                /* --- boards without eeprom + subsystem ID --- */
                .vendor       = PCI_VENDOR_ID_PHILIPS,
@@ -7534,6 +7569,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
        case SAA7134_BOARD_BEHOLD_H7:
        case SAA7134_BOARD_BEHOLD_A7:
        case SAA7134_BOARD_KWORLD_PC150U:
+       case SAA7134_BOARD_SNAZIO_TVPVR_PRO:
                dev->has_remote = SAA7134_REMOTE_I2C;
                break;
        case SAA7134_BOARD_AVERMEDIA_A169_B:
index 69d32d3fa32ca214f35bf68217122ee7bb6f2060..c8042c3888cd1e9d441d259665f31c496c315134 100644 (file)
@@ -975,6 +975,27 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
                        msg_msi.addr, dev->i2c_adap.name,
                        (1 == rc) ? "yes" : "no");
                break;
+       case SAA7134_BOARD_SNAZIO_TVPVR_PRO:
+               dev->init_data.name = "SnaZio* TVPVR PRO";
+               dev->init_data.get_key = get_key_msi_tvanywhere_plus;
+               dev->init_data.ir_codes = RC_MAP_MSI_TVANYWHERE_PLUS;
+               /*
+                * MSI TV@nyware Plus requires more frequent polling
+                * otherwise it will miss some keypresses
+                */
+               dev->init_data.polling_interval = 50;
+               info.addr = 0x30;
+               /*
+                * MSI TV@nywhere Plus controller doesn't seem to
+                *  respond to probes unless we read something from
+                *  an existing device. Weird...
+                * REVISIT: might no longer be needed
+                */
+               rc = i2c_transfer(&dev->i2c_adap, &msg_msi, 1);
+               input_dbg("probe 0x%02x @ %s: %s\n",
+                       msg_msi.addr, dev->i2c_adap.name,
+                       (rc == 1) ? "yes" : "no");
+               break;
        case SAA7134_BOARD_KWORLD_PC150U:
                /* copied and modified from MSI TV@nywhere Plus */
                dev->init_data.name = "Kworld PC150-U";
index 8936568fab942a887e50213c43e8a1abf552a06f..69a9bbf22d4da3f297ce4dcddb47abf2a9add8e9 100644 (file)
@@ -343,6 +343,7 @@ struct saa7134_card_ir {
 #define SAA7134_BOARD_WIS_VOYAGER           193
 #define SAA7134_BOARD_AVERMEDIA_505         194
 #define SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM 195
+#define SAA7134_BOARD_SNAZIO_TVPVR_PRO      196
 
 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8