summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-xc2028-types.h
diff options
context:
space:
mode:
authorChris Pascoe2007-11-19 15:22:03 +0100
committerMauro Carvalho Chehab2008-01-25 22:02:30 +0100
commite0f0b37a3e624440b1b0e8a5978b367895226e75 (patch)
tree98135357e75ca922b093996b3e5a15d68978c8f0 /drivers/media/video/tuner-xc2028-types.h
parentV4L/DVB (6645): xc2028: allow selection of D2633 firmware (diff)
downloadkernel-qcow2-linux-e0f0b37a3e624440b1b0e8a5978b367895226e75.tar.gz
kernel-qcow2-linux-e0f0b37a3e624440b1b0e8a5978b367895226e75.tar.xz
kernel-qcow2-linux-e0f0b37a3e624440b1b0e8a5978b367895226e75.zip
V4L/DVB (6646): xc2028: rework firmware (re)loading process
Define a list of valid "firmware types" for each combination of BASE, DTV and SCODEs. By masking the appropriate firmware bits off we can just use one "type" for the firmware searching and also flag when we are looking for a BASE, DTV or SCODE type firmware. This makes it much easier to track if we need to change device modes or flash an individual firmware part. Add a structure to remember what firmware properties we have. This contains the currently loaded/wanted base firmware (type), video std (id), video std requested (std_req), scode file and number in use. Incorporate said structure into the tuner private data. When checking whether the current firmware needs to be reloaded, first figure out exactly what "type" of firmware we want (base, std and scode), and then proceed to load the appropriate matching base, std-specific and scode records iff there are any changes required. This removes guesswork from the process because we no longer need to individually code a check for every tuning parameter's interactions. Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-xc2028-types.h')
-rw-r--r--drivers/media/video/tuner-xc2028-types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-xc2028-types.h b/drivers/media/video/tuner-xc2028-types.h
index a9e2e0562d99..6cee48193c47 100644
--- a/drivers/media/video/tuner-xc2028-types.h
+++ b/drivers/media/video/tuner-xc2028-types.h
@@ -8,6 +8,7 @@
/* BASE firmware should be loaded before any other firmware */
#define BASE (1<<0)
+#define BASE_TYPES (BASE|F8MHZ|MTS|FM|INPUT1|INPUT2|INIT1)
/* F8MHZ marks BASE firmwares for 8 MHz Bandwidth */
#define F8MHZ (1<<1)
@@ -37,6 +38,8 @@
#define DTV78 (1<<8)
#define DTV8 (1<<9)
+#define DTV_TYPES (D2620|D2633|DTV6|QAM|DTV7|DTV78|DTV8|ATSC)
+
/* There's a FM | BASE firmware + FM specific firmware (std=0) */
#define FM (1<<10)
@@ -60,6 +63,7 @@
/* Old firmwares were broken into init0 and init1 */
#define INIT1 (1<<14)
+/* SCODE firmware selects particular behaviours */
#define MONO (1 << 15)
#define ATSC (1 << 16)
#define IF (1 << 17)
@@ -76,6 +80,10 @@
#define INPUT2 (1 << 28)
#define SCODE (1 << 29)
+#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)
+
/* Newer types to be moved to videodev2.h */
#define V4L2_STD_SECAM_K3 (0x04000000)