]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts input
authorMichael Krufky <mkrufky@kernellabs.com>
Wed, 4 Nov 2009 17:19:35 +0000 (14:19 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 7 Nov 2009 14:55:15 +0000 (12:55 -0200)
When FORCE_TS_VALID mode is enabled, the saa713x will accept MPEG TS input
without requiring TS_VALID set high.  This is required for some new boards
to function properly, due to the hardware design implementation.

The configuration is toggled within the board setup configuration.  Boards
that do not have this bit set will function as before with no change.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7134/saa7134-ts.c
drivers/media/video/saa7134/saa7134.h

index 3fa652279ac091bcbc464766ea42da38982bae2e..03488ba4c99c07f66a15e989414b700054ae1281 100644 (file)
@@ -262,11 +262,13 @@ int saa7134_ts_start(struct saa7134_dev *dev)
        switch (saa7134_boards[dev->board].ts_type) {
        case SAA7134_MPEG_TS_PARALLEL:
                saa_writeb(SAA7134_TS_SERIAL0, 0x40);
-               saa_writeb(SAA7134_TS_PARALLEL, 0xec);
+               saa_writeb(SAA7134_TS_PARALLEL, 0xec |
+                       (saa7134_boards[dev->board].ts_force_val << 4));
                break;
        case SAA7134_MPEG_TS_SERIAL:
                saa_writeb(SAA7134_TS_SERIAL0, 0xd8);
-               saa_writeb(SAA7134_TS_PARALLEL, 0x6c);
+               saa_writeb(SAA7134_TS_PARALLEL, 0x6c |
+                       (saa7134_boards[dev->board].ts_force_val << 4));
                saa_writeb(SAA7134_TS_PARALLEL_SERIAL, 0xbc);
                saa_writeb(SAA7134_TS_SERIAL1, 0x02);
                break;
index 6ee3e9b7769e06e12c30069c99254bd4d6bb95e2..f8697d46ff5fe079228be34f14785d1c604deb05 100644 (file)
@@ -360,6 +360,7 @@ struct saa7134_board {
        enum saa7134_mpeg_type  mpeg;
        enum saa7134_mpeg_ts_type ts_type;
        unsigned int            vid_port_opts;
+       unsigned int            ts_force_val:1;
 };
 
 #define card_has_radio(dev)   (NULL != saa7134_boards[dev->board].radio.name)