aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@m1k.net>2006-01-13 11:10:25 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-13 11:10:25 -0500
commit7b0ac9cdd42b254ae2ec0f6c1cc6389655e4ba96 (patch)
treec290ba6d44a608feb22e7d7af177a915419f88f3 /include
parentf4efb4dbf21c78939e32d96cad145421c8b5f106 (diff)
V4L/DVB (3359): Redesign tuners struct for maximum flexibility
- Tunertype struct redefined to allow one or more tuner_params structs per tuner definition, one for each video standard. - Each tuner_params struct has an element containing an arbitrary amount of tuner_ranges. (this is needed for dvb tuners - to be handled later) - A tuner_range may be referenced by multiple tuner_params structs. There are many duplicates in here. Reusing tuner_range structs, rather than defining new ones for each tuner, will cut down on memory usage, and is preferred when possible. - tunertype struct contains an element, has_tda988x. We must set this for all tunertypes that contain a tda988x chip, and then we can remove this setting from the various card structs. - Improves tuners array memory usage efficiency. - Right now, all tuners are using the first tuner_params[] array element for analog mode. In the future, we will be merging similar tuner definitions together, such that each tuner definition will have a tuner_params struct for each available video standard. At that point, the tuner_params[] array element will be chosen based on the video standard in use. Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include')
-rw-r--r--include/media/tuner-types.h41
-rw-r--r--include/media/tuner.h1
2 files changed, 42 insertions, 0 deletions
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h
new file mode 100644
index 000000000000..9f6e4a98c40a
--- /dev/null
+++ b/include/media/tuner-types.h
@@ -0,0 +1,41 @@
1/*
2 * descriptions for simple tuners.
3 */
4
5#ifndef __TUNER_TYPES_H__
6#define __TUNER_TYPES_H__
7
8enum param_type {
9 TUNER_PARAM_TYPE_RADIO, \
10 TUNER_PARAM_TYPE_PAL, \
11 TUNER_PARAM_TYPE_SECAM, \
12 TUNER_PARAM_TYPE_NTSC, \
13 TUNER_PARAM_TYPE_ATSC, \
14 TUNER_PARAM_TYPE_DVBT, \
15 TUNER_PARAM_TYPE_DVBS, \
16 TUNER_PARAM_TYPE_DVBC
17};
18
19struct tuner_range {
20 unsigned short limit;
21 unsigned char cb;
22};
23
24struct tuner_params {
25 enum param_type type;
26 unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */
27
28 unsigned int count;
29 struct tuner_range *ranges;
30};
31
32struct tunertype {
33 char *name;
34 unsigned int has_tda988x:1;
35 struct tuner_params *params;
36};
37
38extern struct tunertype tuners[];
39extern unsigned const int tuner_count;
40
41#endif
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 27cbf08c931d..c88b506971cf 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -23,6 +23,7 @@
23#define _TUNER_H 23#define _TUNER_H
24 24
25#include <linux/videodev2.h> 25#include <linux/videodev2.h>
26#include <media/tuner-types.h>
26 27
27#define ADDR_UNSET (255) 28#define ADDR_UNSET (255)
28 29