[PATCH] tuner-core.c improvments and Ymec Tvision TVF8533MF support

tuner-core.c, tuner.h:

- tuner-core changed to support multiple I2C devices used on some
  adapters;

- Kconfig now has an option (CONFIG_TUNER_MULTI_I2C) to enable this new
  behavor;

- By default, even enabling CONFIG_TUNER_MULTI_I2C, tuner-core emulates
  the old behavor, using first I2C device for both FM and TV;

- There is a new i2c command (TUNER_SET_ADDR) to allow tuner clients to
  select I2C address for FM or TV tuner;

- Tuner I2C dettach now generates a warning on syslog if failed.

tuner-simple.c:

- TVision TVF-8531MF and TVF-5533 MF tuner included.  It uses, by
  default, I2C on 0xC2 address for TV and on 0xC0 for Radio.  Both TV and
  FM Radio mode are working.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Mauro Carvalho Chehab
2005-06-23 22:02:43 -07:00
committed by Linus Torvalds
parent 55f51efdb6
commit 391cd727ea
4 changed files with 126 additions and 4 deletions

View File

@@ -98,6 +98,9 @@
#define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */
#define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */
#define TUNER_YMEC_TVF_8531MF 58
#define TUNER_YMEC_TVF_5533MF 59 /* Pixelview Pro Ultra NTSC */
#define NOTUNER 0
#define PAL 1 /* PAL_BG */
#define PAL_I 2
@@ -121,8 +124,10 @@
#define TUNER_SET_TYPE _IOW('t',1,int) /* set tuner type */
#define TUNER_SET_TVFREQ _IOW('t',2,int) /* set tv freq */
#define TUNER_SET_ADDR _IOW('T',3,int) /* Chooses tuner I2C address */
#define TDA9887_SET_CONFIG _IOW('t',5,int)
/* tv card specific */
# define TDA9887_PRESENT (1<<0)
# define TDA9887_PORT1_INACTIVE (1<<1)
@@ -143,6 +148,11 @@
#define I2C_ADDR_TDA8290 0x4b
#define I2C_ADDR_TDA8275 0x61
struct tuner_addr {
enum v4l2_tuner_type type;
unsigned short addr;
};
struct tuner {
/* device */
struct i2c_client i2c;