提交 7b0ac9cd 编写于 作者: M Michael Krufky 提交者: Mauro Carvalho Chehab

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: NMichael Krufky <mkrufky@m1k.net>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 f4efb4db
......@@ -8,7 +8,8 @@ bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \
zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
zr36067-objs := zoran_procfs.o zoran_device.o \
zoran_driver.o zoran_card.o
tuner-objs := tuner-core.o tuner-simple.o mt20xx.o tda8290.o tea5767.o
tuner-objs := tuner-core.o tuner-types.o tuner-simple.o \
mt20xx.o tda8290.o tea5767.o
msp3400-objs := msp3400-driver.o msp3400-kthreads.o
......
此差异已折叠。
此差异已折叠。
/*
* descriptions for simple tuners.
*/
#ifndef __TUNER_TYPES_H__
#define __TUNER_TYPES_H__
enum param_type {
TUNER_PARAM_TYPE_RADIO, \
TUNER_PARAM_TYPE_PAL, \
TUNER_PARAM_TYPE_SECAM, \
TUNER_PARAM_TYPE_NTSC, \
TUNER_PARAM_TYPE_ATSC, \
TUNER_PARAM_TYPE_DVBT, \
TUNER_PARAM_TYPE_DVBS, \
TUNER_PARAM_TYPE_DVBC
};
struct tuner_range {
unsigned short limit;
unsigned char cb;
};
struct tuner_params {
enum param_type type;
unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */
unsigned int count;
struct tuner_range *ranges;
};
struct tunertype {
char *name;
unsigned int has_tda988x:1;
struct tuner_params *params;
};
extern struct tunertype tuners[];
extern unsigned const int tuner_count;
#endif
......@@ -23,6 +23,7 @@
#define _TUNER_H
#include <linux/videodev2.h>
#include <media/tuner-types.h>
#define ADDR_UNSET (255)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册