Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33e53161 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB (7651): tuner-xc2028: Several fixes to SCODE



This patch fixes several issues on SCODE:

1) The extracting tool weren't generating the proper tags for SCODE. This
   has almost no effect, since those tags shouldn't be used;

2) DIBCOM52 were using a wrong IF. It should be 5200, instead of 5700;

3) seek_firmware were wanting an exact match for firmware type. This is
   wrong. As result, no SCODE firmware were loaded;

4) A few files were including the wrong file for seeking demod firmwares;

5) XC3028_FE_DEFAULT can be used, if user doesn't want to load a firmware.
   However, this weren't documentated. This feature require more testing.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent d1e0b571
Loading
Loading
Loading
Loading
+23 −23
Original line number Diff line number Diff line
@@ -686,11 +686,11 @@ sub main_firmware($$$$)
	write_hunk(812664, 192);

	#
	# Firmware 58, type: SCODE FW  HAS IF (0x60000000), IF = 4.50 MHz id: NTSC/M Jp (0000000000002000), size: 192
	# 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
	#

	write_le32(0x60000000);			# Type
	write_le64(0x00000000, 0x00002000);	# ID
	write_le32(0x6002b004);			# Type
	write_le64(0x00000000, 0x0000b700);	# ID
	write_le16(4500);			# IF
	write_le32(192);			# Size
	write_hunk(807672, 192);
@@ -706,10 +706,10 @@ sub main_firmware($$$$)
	write_hunk(807864, 192);

	#
	# Firmware 60, type: SCODE FW  DTV78 ZARLINK456 HAS IF (0x62000100), IF = 4.76 MHz id: (0000000000000000), size: 192
	# Firmware 60, type: SCODE FW  DTV6 QAM DTV7 DTV78 DTV8 ZARLINK456 HAS IF (0x620003e0), IF = 4.76 MHz id: (0000000000000000), size: 192
	#

	write_le32(0x62000100);			# Type
	write_le32(0x620003e0);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le16(4760);			# IF
	write_le32(192);			# Size
@@ -726,30 +726,30 @@ sub main_firmware($$$$)
	write_hunk(811512, 192);

	#
	# Firmware 62, type: SCODE FW  DTV7 ZARLINK456 HAS IF (0x62000080), IF = 5.26 MHz id: (0000000000000000), size: 192
	# Firmware 62, type: SCODE FW  HAS IF (0x60000000), IF = 5.26 MHz id: (0000000000000000), size: 192
	#

	write_le32(0x62000080);			# Type
	write_le32(0x60000000);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le16(5260);			# IF
	write_le32(192);			# Size
	write_hunk(810552, 192);

	#
	# Firmware 63, type: SCODE FW  MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192
	# Firmware 63, type: SCODE FW  MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG A2 NICAM (0000000f00000007), size: 192
	#

	write_le32(0x60008000);			# Type
	write_le64(0x00000008, 0x00000007);	# ID
	write_le64(0x0000000f, 0x00000007);	# ID
	write_le16(5320);			# IF
	write_le32(192);			# Size
	write_hunk(810744, 192);

	#
	# Firmware 64, type: SCODE FW  DTV8 CHINA HAS IF (0x64000200), IF = 5.40 MHz id: (0000000000000000), size: 192
	# Firmware 64, type: SCODE FW  DTV7 DTV78 DTV8 DIBCOM52 CHINA HAS IF (0x65000380), IF = 5.40 MHz id: (0000000000000000), size: 192
	#

	write_le32(0x64000200);			# Type
	write_le32(0x65000380);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le16(5400);			# IF
	write_le32(192);			# Size
@@ -766,50 +766,50 @@ sub main_firmware($$$$)
	write_hunk(809592, 192);

	#
	# Firmware 66, type: SCODE FW  HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2/B (0000000200000007), size: 192
	# Firmware 66, type: SCODE FW  HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2 (0000000300000007), size: 192
	#

	write_le32(0x60000000);			# Type
	write_le64(0x00000002, 0x00000007);	# ID
	write_le64(0x00000003, 0x00000007);	# ID
	write_le16(5640);			# IF
	write_le32(192);			# Size
	write_hunk(808440, 192);

	#
	# Firmware 67, type: SCODE FW  HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192
	# Firmware 67, type: SCODE FW  HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM (0000000c00000007), size: 192
	#

	write_le32(0x60000000);			# Type
	write_le64(0x00000008, 0x00000007);	# ID
	write_le64(0x0000000c, 0x00000007);	# ID
	write_le16(5740);			# IF
	write_le32(192);			# Size
	write_hunk(808632, 192);

	#
	# Firmware 68, type: SCODE FW  DTV7 DIBCOM52 HAS IF (0x61000080), IF = 5.90 MHz id: (0000000000000000), size: 192
	# Firmware 68, type: SCODE FW  HAS IF (0x60000000), IF = 5.90 MHz id: (0000000000000000), size: 192
	#

	write_le32(0x61000080);			# Type
	write_le32(0x60000000);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le16(5900);			# IF
	write_le32(192);			# Size
	write_hunk(810360, 192);

	#
	# Firmware 69, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/I (0000000000000010), size: 192
	# 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
	#

	write_le32(0x60008000);			# Type
	write_le64(0x00000000, 0x00000010);	# ID
	write_le64(0x0000000c, 0x04c000f0);	# ID
	write_le16(6000);			# IF
	write_le32(192);			# Size
	write_hunk(808824, 192);

	#
	# Firmware 70, type: SCODE FW  DTV6 QAM F6MHZ HAS IF (0x68000060), IF = 6.20 MHz id: (0000000000000000), size: 192
	# Firmware 70, type: SCODE FW  DTV6 QAM ATSC LG60 F6MHZ HAS IF (0x68050060), IF = 6.20 MHz id: (0000000000000000), size: 192
	#

	write_le32(0x68000060);			# Type
	write_le32(0x68050060);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le16(6200);			# IF
	write_le32(192);			# Size
@@ -846,11 +846,11 @@ sub main_firmware($$$$)
	write_hunk(809208, 192);

	#
	# Firmware 74, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.50 MHz id: SECAM/K3 (0000000004000000), size: 192
	# Firmware 74, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.50 MHz id: PAL/DK SECAM/K3 SECAM/L NICAM (0000000c044000e0), size: 192
	#

	write_le32(0x60008000);			# Type
	write_le64(0x00000000, 0x04000000);	# ID
	write_le64(0x0000000c, 0x044000e0);	# ID
	write_le16(6500);			# IF
	write_le32(192);			# Size
	write_hunk(811128, 192);
+1 −2
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#include "mt352_priv.h"
#include "zl10353.h"
#include "tuner-xc2028.h"
#include "tuner-xc2028-types.h"
#include "tuner-simple.h"

/* debug */
@@ -521,7 +520,7 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
	static struct xc2028_ctrl ctl = {
		.fname       = "xc3028-dvico-au-01.fw",
		.max_len     = 64,
		.scode_table = ZARLINK456,
		.scode_table = XC3028_FE_ZARLINK456,
	};

	fe = dvb_attach(xc2028_attach, adap->fe, &cfg);
+1 −2
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@
#include "tda10048.h"
#include "dvb-pll.h"
#include "tuner-xc2028.h"
#include "tuner-xc2028-types.h"
#include "tuner-simple.h"

static unsigned int debug;
@@ -320,7 +319,7 @@ static int dvb_register(struct cx23885_tsport *port)
			static struct xc2028_ctrl ctl = {
				.fname       = "xc3028-v27.fw",
				.max_len     = 64,
				.scode_table = OREN538,
				.scode_table = XC3028_FE_OREN538,
			};

			fe = dvb_attach(xc2028_attach,
+1 −2
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#include "nxt200x.h"
#include "cx24123.h"
#include "isl6421.h"
#include "tuner-xc2028-types.h"
#include "tuner-simple.h"
#include "tda9887.h"

@@ -813,7 +812,7 @@ static int dvb_register(struct cx8802_dev *dev)
			static struct xc2028_ctrl ctl = {
				.fname       = "xc3028-v27.fw",
				.max_len     = 64,
				.scode_table = OREN538,
				.scode_table = XC3028_FE_OREN538,
			};

			fe = dvb_attach(xc2028_attach,
+13 −5
Original line number Diff line number Diff line
/* tuner-xc2028_types
 *
 * Copyright (c) 2007 Mauro Carvalho Chehab (mchehab@infradead.org)
 * This file includes internal tipes to be used inside tuner-xc2028.
 * Shouldn't be included outside tuner-xc2028
 *
 * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
 * This code is placed under the terms of the GNU General Public License v2
 */

@@ -85,11 +88,16 @@
/* This flag identifies that the scode table has a new format */
#define HAS_IF         (1 << 30)

#define SCODE_TYPES	(MTS|DTV6|QAM|DTV7|DTV78|DTV8|LCD|NOGD|MONO|ATSC|IF| \
			 LG60|ATI638|OREN538|OREN36|TOYOTA388|TOYOTA794|     \
			 DIBCOM52|ZARLINK456|CHINA|F6MHZ|SCODE)
#define SCODE_TYPES SCODE


/* Newer types to be moved to videodev2.h */
/* Newer types not defined on videodev2.h.
   The original idea were to move all those types to videodev2.h, but
   it seemed overkill, since, with the exception of SECAM/K3, the other
   types seem to be autodetected.
   It is not clear where secam/k3 is used, nor we have a feedback of this
   working or being autodetected by the standard secam firmware.
 */

#define V4L2_STD_SECAM_K3	(0x04000000)

Loading