aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/extract_xc3028.pl46
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c3
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c3
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c3
-rw-r--r--drivers/media/video/tuner-xc2028-types.h18
-rw-r--r--drivers/media/video/tuner-xc2028.c21
-rw-r--r--drivers/media/video/tuner-xc2028.h4
7 files changed, 54 insertions, 44 deletions
diff --git a/Documentation/video4linux/extract_xc3028.pl b/Documentation/video4linux/extract_xc3028.pl
index cced8ac5c543..2cb816047fc1 100644
--- a/Documentation/video4linux/extract_xc3028.pl
+++ b/Documentation/video4linux/extract_xc3028.pl
@@ -686,11 +686,11 @@ sub main_firmware($$$$)
686 write_hunk(812664, 192); 686 write_hunk(812664, 192);
687 687
688 # 688 #
689 # Firmware 58, type: SCODE FW HAS IF (0x60000000), IF = 4.50 MHz id: NTSC/M Jp (0000000000002000), size: 192 689 # Firmware 58, type: SCODE FW MTS LCD NOGD MONO IF HAS IF (0x6002b004), IF = 4.50 MHz id: NTSC PAL/M PAL/N (000000000000b700), size: 192
690 # 690 #
691 691
692 write_le32(0x60000000); # Type 692 write_le32(0x6002b004); # Type
693 write_le64(0x00000000, 0x00002000); # ID 693 write_le64(0x00000000, 0x0000b700); # ID
694 write_le16(4500); # IF 694 write_le16(4500); # IF
695 write_le32(192); # Size 695 write_le32(192); # Size
696 write_hunk(807672, 192); 696 write_hunk(807672, 192);
@@ -706,10 +706,10 @@ sub main_firmware($$$$)
706 write_hunk(807864, 192); 706 write_hunk(807864, 192);
707 707
708 # 708 #
709 # Firmware 60, type: SCODE FW DTV78 ZARLINK456 HAS IF (0x62000100), IF = 4.76 MHz id: (0000000000000000), size: 192 709 # Firmware 60, type: SCODE FW DTV6 QAM DTV7 DTV78 DTV8 ZARLINK456 HAS IF (0x620003e0), IF = 4.76 MHz id: (0000000000000000), size: 192
710 # 710 #
711 711
712 write_le32(0x62000100); # Type 712 write_le32(0x620003e0); # Type
713 write_le64(0x00000000, 0x00000000); # ID 713 write_le64(0x00000000, 0x00000000); # ID
714 write_le16(4760); # IF 714 write_le16(4760); # IF
715 write_le32(192); # Size 715 write_le32(192); # Size
@@ -726,30 +726,30 @@ sub main_firmware($$$$)
726 write_hunk(811512, 192); 726 write_hunk(811512, 192);
727 727
728 # 728 #
729 # Firmware 62, type: SCODE FW DTV7 ZARLINK456 HAS IF (0x62000080), IF = 5.26 MHz id: (0000000000000000), size: 192 729 # Firmware 62, type: SCODE FW HAS IF (0x60000000), IF = 5.26 MHz id: (0000000000000000), size: 192
730 # 730 #
731 731
732 write_le32(0x62000080); # Type 732 write_le32(0x60000000); # Type
733 write_le64(0x00000000, 0x00000000); # ID 733 write_le64(0x00000000, 0x00000000); # ID
734 write_le16(5260); # IF 734 write_le16(5260); # IF
735 write_le32(192); # Size 735 write_le32(192); # Size
736 write_hunk(810552, 192); 736 write_hunk(810552, 192);
737 737
738 # 738 #
739 # Firmware 63, type: SCODE FW MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192 739 # Firmware 63, type: SCODE FW MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG A2 NICAM (0000000f00000007), size: 192
740 # 740 #
741 741
742 write_le32(0x60008000); # Type 742 write_le32(0x60008000); # Type
743 write_le64(0x00000008, 0x00000007); # ID 743 write_le64(0x0000000f, 0x00000007); # ID
744 write_le16(5320); # IF 744 write_le16(5320); # IF
745 write_le32(192); # Size 745 write_le32(192); # Size
746 write_hunk(810744, 192); 746 write_hunk(810744, 192);
747 747
748 # 748 #
749 # Firmware 64, type: SCODE FW DTV8 CHINA HAS IF (0x64000200), IF = 5.40 MHz id: (0000000000000000), size: 192 749 # Firmware 64, type: SCODE FW DTV7 DTV78 DTV8 DIBCOM52 CHINA HAS IF (0x65000380), IF = 5.40 MHz id: (0000000000000000), size: 192
750 # 750 #
751 751
752 write_le32(0x64000200); # Type 752 write_le32(0x65000380); # Type
753 write_le64(0x00000000, 0x00000000); # ID 753 write_le64(0x00000000, 0x00000000); # ID
754 write_le16(5400); # IF 754 write_le16(5400); # IF
755 write_le32(192); # Size 755 write_le32(192); # Size
@@ -766,50 +766,50 @@ sub main_firmware($$$$)
766 write_hunk(809592, 192); 766 write_hunk(809592, 192);
767 767
768 # 768 #
769 # Firmware 66, type: SCODE FW HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2/B (0000000200000007), size: 192 769 # Firmware 66, type: SCODE FW HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2 (0000000300000007), size: 192
770 # 770 #
771 771
772 write_le32(0x60000000); # Type 772 write_le32(0x60000000); # Type
773 write_le64(0x00000002, 0x00000007); # ID 773 write_le64(0x00000003, 0x00000007); # ID
774 write_le16(5640); # IF 774 write_le16(5640); # IF
775 write_le32(192); # Size 775 write_le32(192); # Size
776 write_hunk(808440, 192); 776 write_hunk(808440, 192);
777 777
778 # 778 #
779 # Firmware 67, type: SCODE FW HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192 779 # Firmware 67, type: SCODE FW HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM (0000000c00000007), size: 192
780 # 780 #
781 781
782 write_le32(0x60000000); # Type 782 write_le32(0x60000000); # Type
783 write_le64(0x00000008, 0x00000007); # ID 783 write_le64(0x0000000c, 0x00000007); # ID
784 write_le16(5740); # IF 784 write_le16(5740); # IF
785 write_le32(192); # Size 785 write_le32(192); # Size
786 write_hunk(808632, 192); 786 write_hunk(808632, 192);
787 787
788 # 788 #
789 # Firmware 68, type: SCODE FW DTV7 DIBCOM52 HAS IF (0x61000080), IF = 5.90 MHz id: (0000000000000000), size: 192 789 # Firmware 68, type: SCODE FW HAS IF (0x60000000), IF = 5.90 MHz id: (0000000000000000), size: 192
790 # 790 #
791 791
792 write_le32(0x61000080); # Type 792 write_le32(0x60000000); # Type
793 write_le64(0x00000000, 0x00000000); # ID 793 write_le64(0x00000000, 0x00000000); # ID
794 write_le16(5900); # IF 794 write_le16(5900); # IF
795 write_le32(192); # Size 795 write_le32(192); # Size
796 write_hunk(810360, 192); 796 write_hunk(810360, 192);
797 797
798 # 798 #
799 # Firmware 69, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/I (0000000000000010), size: 192 799 # Firmware 69, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/DK PAL/I SECAM/K3 SECAM/L SECAM/Lc NICAM (0000000c04c000f0), size: 192
800 # 800 #
801 801
802 write_le32(0x60008000); # Type 802 write_le32(0x60008000); # Type
803 write_le64(0x00000000, 0x00000010); # ID 803 write_le64(0x0000000c, 0x04c000f0); # ID
804 write_le16(6000); # IF 804 write_le16(6000); # IF
805 write_le32(192); # Size 805 write_le32(192); # Size
806 write_hunk(808824, 192); 806 write_hunk(808824, 192);
807 807
808 # 808 #
809 # Firmware 70, type: SCODE FW DTV6 QAM F6MHZ HAS IF (0x68000060), IF = 6.20 MHz id: (0000000000000000), size: 192 809 # Firmware 70, type: SCODE FW DTV6 QAM ATSC LG60 F6MHZ HAS IF (0x68050060), IF = 6.20 MHz id: (0000000000000000), size: 192
810 # 810 #
811 811
812 write_le32(0x68000060); # Type 812 write_le32(0x68050060); # Type
813 write_le64(0x00000000, 0x00000000); # ID 813 write_le64(0x00000000, 0x00000000); # ID
814 write_le16(6200); # IF 814 write_le16(6200); # IF
815 write_le32(192); # Size 815 write_le32(192); # Size
@@ -846,11 +846,11 @@ sub main_firmware($$$$)
846 write_hunk(809208, 192); 846 write_hunk(809208, 192);
847 847
848 # 848 #
849 # Firmware 74, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.50 MHz id: SECAM/K3 (0000000004000000), size: 192 849 # Firmware 74, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.50 MHz id: PAL/DK SECAM/K3 SECAM/L NICAM (0000000c044000e0), size: 192
850 # 850 #
851 851
852 write_le32(0x60008000); # Type 852 write_le32(0x60008000); # Type
853 write_le64(0x00000000, 0x04000000); # ID 853 write_le64(0x0000000c, 0x044000e0); # ID
854 write_le16(6500); # IF 854 write_le16(6500); # IF
855 write_le32(192); # Size 855 write_le32(192); # Size
856 write_hunk(811128, 192); 856 write_hunk(811128, 192);
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index c4b00660c65f..720fcd1c3c1d 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -33,7 +33,6 @@
33#include "mt352_priv.h" 33#include "mt352_priv.h"
34#include "zl10353.h" 34#include "zl10353.h"
35#include "tuner-xc2028.h" 35#include "tuner-xc2028.h"
36#include "tuner-xc2028-types.h"
37#include "tuner-simple.h" 36#include "tuner-simple.h"
38 37
39/* debug */ 38/* debug */
@@ -521,7 +520,7 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
521 static struct xc2028_ctrl ctl = { 520 static struct xc2028_ctrl ctl = {
522 .fname = "xc3028-dvico-au-01.fw", 521 .fname = "xc3028-dvico-au-01.fw",
523 .max_len = 64, 522 .max_len = 64,
524 .scode_table = ZARLINK456, 523 .scode_table = XC3028_FE_ZARLINK456,
525 }; 524 };
526 525
527 fe = dvb_attach(xc2028_attach, adap->fe, &cfg); 526 fe = dvb_attach(xc2028_attach, adap->fe, &cfg);
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index a1086c8b66ee..1b9a85e43d44 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -39,7 +39,6 @@
39#include "tda10048.h" 39#include "tda10048.h"
40#include "dvb-pll.h" 40#include "dvb-pll.h"
41#include "tuner-xc2028.h" 41#include "tuner-xc2028.h"
42#include "tuner-xc2028-types.h"
43#include "tuner-simple.h" 42#include "tuner-simple.h"
44 43
45static unsigned int debug; 44static unsigned int debug;
@@ -320,7 +319,7 @@ static int dvb_register(struct cx23885_tsport *port)
320 static struct xc2028_ctrl ctl = { 319 static struct xc2028_ctrl ctl = {
321 .fname = "xc3028-v27.fw", 320 .fname = "xc3028-v27.fw",
322 .max_len = 64, 321 .max_len = 64,
323 .scode_table = OREN538, 322 .scode_table = XC3028_FE_OREN538,
324 }; 323 };
325 324
326 fe = dvb_attach(xc2028_attach, 325 fe = dvb_attach(xc2028_attach,
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index fda7334d934b..f1251b844e08 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -45,7 +45,6 @@
45#include "nxt200x.h" 45#include "nxt200x.h"
46#include "cx24123.h" 46#include "cx24123.h"
47#include "isl6421.h" 47#include "isl6421.h"
48#include "tuner-xc2028-types.h"
49#include "tuner-simple.h" 48#include "tuner-simple.h"
50#include "tda9887.h" 49#include "tda9887.h"
51 50
@@ -813,7 +812,7 @@ static int dvb_register(struct cx8802_dev *dev)
813 static struct xc2028_ctrl ctl = { 812 static struct xc2028_ctrl ctl = {
814 .fname = "xc3028-v27.fw", 813 .fname = "xc3028-v27.fw",
815 .max_len = 64, 814 .max_len = 64,
816 .scode_table = OREN538, 815 .scode_table = XC3028_FE_OREN538,
817 }; 816 };
818 817
819 fe = dvb_attach(xc2028_attach, 818 fe = dvb_attach(xc2028_attach,
diff --git a/drivers/media/video/tuner-xc2028-types.h b/drivers/media/video/tuner-xc2028-types.h
index d0057fbf0ec7..17633c316c28 100644
--- a/drivers/media/video/tuner-xc2028-types.h
+++ b/drivers/media/video/tuner-xc2028-types.h
@@ -1,6 +1,9 @@
1/* tuner-xc2028_types 1/* tuner-xc2028_types
2 * 2 *
3 * Copyright (c) 2007 Mauro Carvalho Chehab (mchehab@infradead.org) 3 * This file includes internal tipes to be used inside tuner-xc2028.
4 * Shouldn't be included outside tuner-xc2028
5 *
6 * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
4 * This code is placed under the terms of the GNU General Public License v2 7 * This code is placed under the terms of the GNU General Public License v2
5 */ 8 */
6 9
@@ -85,11 +88,16 @@
85/* This flag identifies that the scode table has a new format */ 88/* This flag identifies that the scode table has a new format */
86#define HAS_IF (1 << 30) 89#define HAS_IF (1 << 30)
87 90
88#define SCODE_TYPES (MTS|DTV6|QAM|DTV7|DTV78|DTV8|LCD|NOGD|MONO|ATSC|IF| \ 91#define SCODE_TYPES SCODE
89 LG60|ATI638|OREN538|OREN36|TOYOTA388|TOYOTA794| \ 92
90 DIBCOM52|ZARLINK456|CHINA|F6MHZ|SCODE)
91 93
92/* Newer types to be moved to videodev2.h */ 94/* Newer types not defined on videodev2.h.
95 The original idea were to move all those types to videodev2.h, but
96 it seemed overkill, since, with the exception of SECAM/K3, the other
97 types seem to be autodetected.
98 It is not clear where secam/k3 is used, nor we have a feedback of this
99 working or being autodetected by the standard secam firmware.
100 */
93 101
94#define V4L2_STD_SECAM_K3 (0x04000000) 102#define V4L2_STD_SECAM_K3 (0x04000000)
95 103
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c
index 9dd688ec3cff..0e580bcd0e09 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -1,6 +1,6 @@
1/* tuner-xc2028 1/* tuner-xc2028
2 * 2 *
3 * Copyright (c) 2007 Mauro Carvalho Chehab (mchehab@infradead.org) 3 * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
4 * 4 *
5 * Copyright (c) 2007 Michel Ludwig (michel.ludwig@gmail.com) 5 * Copyright (c) 2007 Michel Ludwig (michel.ludwig@gmail.com)
6 * - frontend interface 6 * - frontend interface
@@ -404,7 +404,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
404{ 404{
405 struct xc2028_data *priv = fe->tuner_priv; 405 struct xc2028_data *priv = fe->tuner_priv;
406 int i, best_i = -1, best_nr_matches = 0; 406 int i, best_i = -1, best_nr_matches = 0;
407 unsigned int ign_firm_type_mask = 0; 407 unsigned int type_mask = 0;
408 408
409 tuner_dbg("%s called, want type=", __func__); 409 tuner_dbg("%s called, want type=", __func__);
410 if (debug) { 410 if (debug) {
@@ -421,18 +421,23 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
421 *id = V4L2_STD_PAL; 421 *id = V4L2_STD_PAL;
422 422
423 if (type & BASE) 423 if (type & BASE)
424 type &= BASE_TYPES; 424 type_mask = BASE_TYPES;
425 else if (type & SCODE) { 425 else if (type & SCODE) {
426 type &= SCODE_TYPES; 426 type &= SCODE_TYPES;
427 ign_firm_type_mask = HAS_IF; 427 type_mask = SCODE_TYPES & ~HAS_IF;
428 } else if (type & DTV_TYPES) 428 } else if (type & DTV_TYPES)
429 type &= DTV_TYPES; 429 type_mask = DTV_TYPES;
430 else if (type & STD_SPECIFIC_TYPES) 430 else if (type & STD_SPECIFIC_TYPES)
431 type &= STD_SPECIFIC_TYPES; 431 type_mask = STD_SPECIFIC_TYPES;
432
433 type &= type_mask;
434
435 if (!type & SCODE)
436 type_mask = ~0;
432 437
433 /* Seek for exact match */ 438 /* Seek for exact match */
434 for (i = 0; i < priv->firm_size; i++) { 439 for (i = 0; i < priv->firm_size; i++) {
435 if ((type == (priv->firm[i].type & ~ign_firm_type_mask)) && 440 if ((type == (priv->firm[i].type & type_mask)) &&
436 (*id == priv->firm[i].id)) 441 (*id == priv->firm[i].id))
437 goto found; 442 goto found;
438 } 443 }
@@ -442,7 +447,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
442 v4l2_std_id match_mask; 447 v4l2_std_id match_mask;
443 int nr_matches; 448 int nr_matches;
444 449
445 if (type != (priv->firm[i].type & ~ign_firm_type_mask)) 450 if (type != (priv->firm[i].type & type_mask))
446 continue; 451 continue;
447 452
448 match_mask = *id & priv->firm[i].id; 453 match_mask = *id & priv->firm[i].id;
diff --git a/drivers/media/video/tuner-xc2028.h b/drivers/media/video/tuner-xc2028.h
index 612e490634d0..fc2f132a5541 100644
--- a/drivers/media/video/tuner-xc2028.h
+++ b/drivers/media/video/tuner-xc2028.h
@@ -1,6 +1,6 @@
1/* tuner-xc2028 1/* tuner-xc2028
2 * 2 *
3 * Copyright (c) 2007 Mauro Carvalho Chehab (mchehab@infradead.org) 3 * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
4 * This code is placed under the terms of the GNU General Public License v2 4 * This code is placed under the terms of the GNU General Public License v2
5 */ 5 */
6 6
@@ -12,7 +12,7 @@
12#define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw" 12#define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
13 13
14/* Dmoduler IF (kHz) */ 14/* Dmoduler IF (kHz) */
15#define XC3028_FE_DEFAULT 0 15#define XC3028_FE_DEFAULT 0 /* Don't load SCODE */
16#define XC3028_FE_LG60 6000 16#define XC3028_FE_LG60 6000
17#define XC3028_FE_ATI638 6380 17#define XC3028_FE_ATI638 6380
18#define XC3028_FE_OREN538 5380 18#define XC3028_FE_OREN538 5380