From 8573a9e6a8ed724b7e3074dc8762d4117ed0b3aa Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 8 Apr 2007 01:09:11 -0300 Subject: V4L/DVB (5563a): Add experimental support for tea5761 tuner This driver were made based on tea5761 specs. Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 6dcf3c45707d..7861babd4c90 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -124,6 +124,7 @@ extern int tuner_debug; #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ #define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ #define TUNER_TDA9887 74 /* This tuner should be used only internally */ +#define TUNER_TEA5761 75 /* Only FM Radio Tuner */ /* tv card specific */ #define TDA9887_PRESENT (1<<0) @@ -233,11 +234,16 @@ extern int microtune_init(struct i2c_client *c); extern int xc3028_init(struct i2c_client *c); extern int tda8290_init(struct i2c_client *c); extern int tda8290_probe(struct i2c_client *c); -extern int tea5767_tuner_init(struct i2c_client *c); extern int default_tuner_init(struct i2c_client *c); + extern int tea5767_autodetection(struct i2c_client *c); +extern int tea5767_tuner_init(struct i2c_client *c); + extern int tda9887_tuner_init(struct i2c_client *c); +extern int tea5761_tuner_init(struct i2c_client *c); +extern int tea5761_autodetection(struct i2c_client *c); + #define tuner_warn(fmt, arg...) do {\ printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) -- cgit v1.2.2 From b208319993ceff7ebfcc6bb914fe94d29e48a891 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 29 May 2007 22:54:06 -0300 Subject: V4L/DVB (5719): Tuner: Move device-specific private data out of tuner struct Create private data struct for device specific private data. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 7861babd4c90..b901373c6e10 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -199,21 +199,10 @@ struct tuner { v4l2_std_id std; int using_v4l2; + void *priv; /* used by tda9887 */ unsigned int tda9887_config; - unsigned char tda9887_data[4]; - - /* used by MT2032 */ - unsigned int xogc; - unsigned int radio_if2; - - /* used by tda8290 */ - unsigned char tda8290_easy_mode; - unsigned char tda827x_lpsel; - unsigned char tda827x_addr; - unsigned char tda827x_ver; - unsigned int sgIF; unsigned int config; int (*tuner_callback) (void *dev, int command,int arg); -- cgit v1.2.2 From be2b85a13543bbaf1a141b3a54f84c1e3b059e69 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 4 Jun 2007 14:40:27 -0300 Subject: V4L/DVB (5741): Tuner: add release callback Individual tuner drivers are now allocating memory themselves for their own private data structures. This changeset adds a release callback to the tuner operations, so that newer drivers that may require more complex data structures may release this private data themselves. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index b901373c6e10..da821a027e76 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -215,6 +215,7 @@ struct tuner { int (*get_afc)(struct i2c_client *c); void (*tuner_status)(struct i2c_client *c); void (*standby)(struct i2c_client *c); + void (*release)(struct i2c_client *c); }; extern unsigned const int tuner_count; -- cgit v1.2.2 From 7a91a80a0d1a0a83a94e773ec6245b31b7c4ceed Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 6 Jun 2007 16:10:39 -0300 Subject: V4L/DVB (5753): Tuner: create struct tuner_operations Move tuner callback function pointers out of struct tuner, into struct tuner_operations. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index da821a027e76..88eaf8930203 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -183,6 +183,17 @@ struct tuner_setup { int (*tuner_callback) (void *dev, int command,int arg); }; +struct tuner_operations { + void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); + void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); + int (*has_signal)(struct i2c_client *c); + int (*is_stereo)(struct i2c_client *c); + int (*get_afc)(struct i2c_client *c); + void (*tuner_status)(struct i2c_client *c); + void (*standby)(struct i2c_client *c); + void (*release)(struct i2c_client *c); +}; + struct tuner { /* device */ struct i2c_client i2c; @@ -207,15 +218,7 @@ struct tuner { unsigned int config; int (*tuner_callback) (void *dev, int command,int arg); - /* function ptrs */ - void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); - void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); - int (*has_signal)(struct i2c_client *c); - int (*is_stereo)(struct i2c_client *c); - int (*get_afc)(struct i2c_client *c); - void (*tuner_status)(struct i2c_client *c); - void (*standby)(struct i2c_client *c); - void (*release)(struct i2c_client *c); + struct tuner_operations ops; }; extern unsigned const int tuner_count; -- cgit v1.2.2 From 8218b0b2caecf4af55742e12e9986c15605bb197 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 26 Jun 2007 13:12:08 -0300 Subject: V4L/DVB (5793): Tuner: remove hardware-specific info from public header Move internal structures and debug macros to drivers/media/video/tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 68 --------------------------------------------------- 1 file changed, 68 deletions(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 88eaf8930203..160381c72e4b 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -23,8 +23,6 @@ #define _TUNER_H #include -#include -#include extern int tuner_debug; @@ -183,72 +181,6 @@ struct tuner_setup { int (*tuner_callback) (void *dev, int command,int arg); }; -struct tuner_operations { - void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); - void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); - int (*has_signal)(struct i2c_client *c); - int (*is_stereo)(struct i2c_client *c); - int (*get_afc)(struct i2c_client *c); - void (*tuner_status)(struct i2c_client *c); - void (*standby)(struct i2c_client *c); - void (*release)(struct i2c_client *c); -}; - -struct tuner { - /* device */ - struct i2c_client i2c; - - unsigned int type; /* chip type */ - - unsigned int mode; - unsigned int mode_mask; /* Combination of allowable modes */ - - unsigned int tv_freq; /* keep track of the current settings */ - unsigned int radio_freq; - u16 last_div; - unsigned int audmode; - v4l2_std_id std; - - int using_v4l2; - void *priv; - - /* used by tda9887 */ - unsigned int tda9887_config; - - unsigned int config; - int (*tuner_callback) (void *dev, int command,int arg); - - struct tuner_operations ops; -}; - -extern unsigned const int tuner_count; - -extern int microtune_init(struct i2c_client *c); -extern int xc3028_init(struct i2c_client *c); -extern int tda8290_init(struct i2c_client *c); -extern int tda8290_probe(struct i2c_client *c); -extern int default_tuner_init(struct i2c_client *c); - -extern int tea5767_autodetection(struct i2c_client *c); -extern int tea5767_tuner_init(struct i2c_client *c); - -extern int tda9887_tuner_init(struct i2c_client *c); - -extern int tea5761_tuner_init(struct i2c_client *c); -extern int tea5761_autodetection(struct i2c_client *c); - -#define tuner_warn(fmt, arg...) do {\ - printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ - i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) -#define tuner_info(fmt, arg...) do {\ - printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ - i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) -#define tuner_dbg(fmt, arg...) do {\ - extern int tuner_debug; \ - if (tuner_debug) \ - printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ - i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) - #endif /* __KERNEL__ */ #endif /* _TUNER_H */ -- cgit v1.2.2 From 804b4458943f14bf144d3c3ba50097ced9b27b29 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Thu, 12 Jul 2007 20:37:50 -0300 Subject: V4L/DVB (5835): saa7146/dvb-ttpci: Fix signedness warnings (gcc 4.1.1, kernel 2.6.22) Fix signedness warnings (gcc 4.1.1, kernel 2.6.22). Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab --- include/media/saa7146.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/media/saa7146.h b/include/media/saa7146.h index d3f4f5a38214..67703249b245 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h @@ -114,7 +114,7 @@ struct saa7146_dev struct mutex lock; unsigned char __iomem *mem; /* pointer to mapped IO memory */ - int revision; /* chip revision; needed for bug-workarounds*/ + u32 revision; /* chip revision; needed for bug-workarounds*/ /* pci-device & irq stuff*/ char name[32]; @@ -157,8 +157,8 @@ struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt); void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt); int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length ); -char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt); -void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, char *mem, struct saa7146_pgtable *pt); +void *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt); +void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, void *mem, struct saa7146_pgtable *pt); void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data); int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop); -- cgit v1.2.2