From 6cb45879dca84c667996d65a12880db6705a2b0e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 2 Oct 2007 11:57:03 -0300 Subject: V4L/DVB (6423): Add tuner-xc2028 driver Add support for Xceive XC2028/XC3028 tuner driver Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 28a10da76d1..5e733bc8362 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -70,6 +70,8 @@ struct tuner { struct tuner_operations ops; }; +extern int xc2028_tuner_init(struct i2c_client *c); + /* ------------------------------------------------------------------------ */ extern int tda9887_tuner_init(struct tuner *t); -- cgit v1.2.3 From 215b95baf969c6f895969f0a4ae0479954fba7cd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 23 Oct 2007 15:24:06 -0300 Subject: V4L/DVB (6430): Convert tuner-xc2028 driver to the newer hybrid approach This changeset converts tuner-xc2028 to the newer hybrid approach. It also prevents creating twice the xc3028 private struct by both DVB and V4L parts. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 5e733bc8362..28a10da76d1 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -70,8 +70,6 @@ struct tuner { struct tuner_operations ops; }; -extern int xc2028_tuner_init(struct i2c_client *c); - /* ------------------------------------------------------------------------ */ extern int tda9887_tuner_init(struct tuner *t); -- cgit v1.2.3 From 1dde7a4fa2b197d298c3f1b97a7f78fd1c3a1bda Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 21 Oct 2007 13:40:56 -0300 Subject: V4L/DVB (6436): tuner: move analog_tuner_ops into dvb_frontend_ops Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 28a10da76d1..f2a9c29f1f0 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -31,7 +31,7 @@ extern unsigned const int tuner_count; struct tuner; -struct tuner_operations { +struct analog_tuner_ops { void (*set_tv_freq)(struct tuner *t, unsigned int freq); void (*set_radio_freq)(struct tuner *t, unsigned int freq); int (*has_signal)(struct tuner *t); @@ -66,8 +66,6 @@ struct tuner { unsigned int config; int (*tuner_callback) (void *dev, int command,int arg); - - struct tuner_operations ops; }; /* ------------------------------------------------------------------------ */ -- cgit v1.2.3 From 16f291684c50497cc92e83f01d354fae187d1f18 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 21 Oct 2007 15:22:25 -0300 Subject: V4L/DVB (6438): tuner: move analog_demod_priv into struct dvb_frontend Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index f2a9c29f1f0..fffacb378fd 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -57,7 +57,6 @@ struct tuner { v4l2_std_id std; int using_v4l2; - void *priv; struct dvb_frontend fe; -- cgit v1.2.3 From 4e9154b8a77d0f0f8f06857162823905612a50d7 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 21 Oct 2007 19:39:50 -0300 Subject: V4L/DVB (6440): tuner: convert analog tuner demod sub-modules to dvb_frontend interface Convert tda9887 and tda8290/5 to dvb_frontend interface Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index fffacb378fd..cc9c1c74117 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -32,14 +32,14 @@ extern unsigned const int tuner_count; struct tuner; struct analog_tuner_ops { - void (*set_tv_freq)(struct tuner *t, unsigned int freq); - void (*set_radio_freq)(struct tuner *t, unsigned int freq); - int (*has_signal)(struct tuner *t); - int (*is_stereo)(struct tuner *t); - int (*get_afc)(struct tuner *t); - void (*tuner_status)(struct tuner *t); - void (*standby)(struct tuner *t); - void (*release)(struct tuner *t); + void (*set_tv_freq)(struct dvb_frontend *fe, unsigned int freq); + void (*set_radio_freq)(struct dvb_frontend *fe, unsigned int freq); + int (*has_signal)(struct dvb_frontend *fe); + int (*is_stereo)(struct dvb_frontend *fe); + int (*get_afc)(struct dvb_frontend *fe); + void (*tuner_status)(struct dvb_frontend *fe); + void (*standby)(struct dvb_frontend *fe); + void (*release)(struct dvb_frontend *fe); }; struct tuner { -- cgit v1.2.3 From 31c9584c0b071dfa7a75db6e21cc727f728f97b0 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 21 Oct 2007 20:48:48 -0300 Subject: V4L/DVB (6443): make tda9887 build selectable via Kconfig Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index cc9c1c74117..c03d08cd832 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -69,10 +69,6 @@ struct tuner { /* ------------------------------------------------------------------------ */ -extern int tda9887_tuner_init(struct tuner *t); - -/* ------------------------------------------------------------------------ */ - #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.3 From 2be1b48fd27a3b6878db034288ed571b03df3a5c Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 24 Oct 2007 09:23:17 -0300 Subject: V4L/DVB (6447): tuner: add i2c_gate_ctrl function to struct analog_tuner_ops In some designs, the tuner silicon may be on an i2c bus behind an i2c gate, controlled by the analog demodulator. We already have a method to control such i2c gates when they are controlled by the digital demodulator, but in some hybrid designs, there may be an i2c gate controlled by each demodulator. For example, when in analog tuning mode, one would access the tuner by opening the i2c gate controlled by the analog demodulator, while when in digital tuning mode, one would access the tuner by opening the i2c gate controlled by the digital demodulator. We must add this callback function to analog_tuner_ops in order to handle such configurations. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index c03d08cd832..728cacd2168 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -40,6 +40,7 @@ struct analog_tuner_ops { void (*tuner_status)(struct dvb_frontend *fe); void (*standby)(struct dvb_frontend *fe); void (*release)(struct dvb_frontend *fe); + int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable); }; struct tuner { -- cgit v1.2.3 From 1cba97d71dca1a3c22b4d7f97893249817036215 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 14 Sep 2007 05:13:54 -0300 Subject: V4L/DVB (6471): tuner: i2c_client cannot be part of the tuner struct The bus-based I2C subsystem allocates the i2c_client struct. So if in order to be able to convert the tuner to the bus-based I2C API the embedded i2c_client struct must be removed from the tuner struct and replaced with a pointer. Signed-off-by: Hans Verkuil Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 728cacd2168..0df136e58eb 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -45,7 +45,7 @@ struct analog_tuner_ops { struct tuner { /* device */ - struct i2c_client i2c; + struct i2c_client *i2c; unsigned int type; /* chip type */ @@ -71,16 +71,16 @@ struct tuner { /* ------------------------------------------------------------------------ */ #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) + 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) + 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) + 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 /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From 241020d19ee9da29171d989ff876c657e4b938b5 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 30 Oct 2007 09:46:10 -0300 Subject: V4L/DVB (6492): tuner: improve tuner_foo printk macros consistency Alter the tuner_foo printk macros to indicate which module is generating the message. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 0df136e58eb..1c60229dcd0 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -71,15 +71,15 @@ struct tuner { /* ------------------------------------------------------------------------ */ #define tuner_warn(fmt, arg...) do {\ - printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c->driver->driver.name, \ + printk(KERN_WARNING PREFIX "%d-%04x: " fmt, \ 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, \ + printk(KERN_INFO PREFIX "%d-%04x: " fmt, \ 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, \ + printk(KERN_DEBUG PREFIX "%d-%04x: " fmt, \ i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0) #endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From 159ffe77cd9b1cd7c80c416b5635bdad7e3d7d55 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 4 Nov 2007 10:42:42 -0300 Subject: V4L/DVB (6553): tuner: replace default_mode_mask The default_mode_mask global is replaced by a list of tuner structs. The tuner driver now walks that list to see which radio and/or tv tuner devices are registered to a given i2c adapter. The default_mode_mask global had to go since this is no longer supported with the new bus-based I2C API. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 1c60229dcd0..3ff2943ecc1 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -46,6 +46,7 @@ struct analog_tuner_ops { struct tuner { /* device */ struct i2c_client *i2c; + struct list_head list; /* list of tuners */ unsigned int type; /* chip type */ -- cgit v1.2.3 From 9dd659de9fbd1687c6175053c6453db5b932f152 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 4 Nov 2007 11:03:36 -0300 Subject: V4L/DVB (6556): tuner: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 3ff2943ecc1..d6e5afdaa82 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -72,15 +72,15 @@ struct tuner { /* ------------------------------------------------------------------------ */ #define tuner_warn(fmt, arg...) do {\ - printk(KERN_WARNING PREFIX "%d-%04x: " fmt, \ + printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \ i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0) #define tuner_info(fmt, arg...) do {\ - printk(KERN_INFO PREFIX "%d-%04x: " fmt, \ + printk(KERN_INFO "%s %d-%04x: " fmt, PREFIX, \ 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 PREFIX "%d-%04x: " fmt, \ + printk(KERN_DEBUG "%s %d-%04x: " fmt, PREFIX, \ i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0) #endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From 98883cdcb5884bd0f7a89ac36b7170404127b3ea Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 15 Nov 2007 09:35:44 -0300 Subject: V4L/DVB (6594): Add tuner_err macro Some tuners, like xc3028, need to print error messages. Instead of declaring local macros, create a tuner global macro for printing tuner errors. To preserve CodingStyle on all tuner_macros, a few CodingStyle violations were fixed at the other macros: - lines with more than 80 columns - two statements at the same line The patch also removes the CodingStyle violation of having emacs declarations inside de source code (CodingStyle chapter 18). Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 40 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index d6e5afdaa82..a4db32d97a1 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -71,24 +71,26 @@ struct tuner { /* ------------------------------------------------------------------------ */ -#define tuner_warn(fmt, arg...) do {\ - printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \ - 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, PREFIX, \ - 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, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0) +#define tuner_warn(fmt, arg...) do { \ + printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \ + 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, PREFIX, \ + i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ + } while (0) + +#define tuner_err(fmt, arg...) do { \ + printk(KERN_ERR "%s %d-%04x: " fmt, PREFIX, \ + 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, PREFIX, \ + i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ + } while (0) #endif /* __TUNER_DRIVER_H__ */ - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * --------------------------------------------------------------------------- - * Local variables: - * c-basic-offset: 8 - * End: - */ -- cgit v1.2.3 From c7919d520f4c9a064ae14bc4dd170c4c12ead2af Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 8 Dec 2007 17:06:30 -0300 Subject: V4L/DVB (6783): tuner: combine set_tv_freq and set_radio_freq into a single set_params method We can tell whether we are tuning television or radio by testing for struct analog_parameters *params->mode == V4L2_TUNER_RADIO There is no longer any need for separate set_tv_freq and set_radio_freq functions in the analog tuner demodulator modules. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index a4db32d97a1..91913ee08a0 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -32,8 +32,8 @@ extern unsigned const int tuner_count; struct tuner; struct analog_tuner_ops { - void (*set_tv_freq)(struct dvb_frontend *fe, unsigned int freq); - void (*set_radio_freq)(struct dvb_frontend *fe, unsigned int freq); + void (*set_params)(struct dvb_frontend *fe, + struct analog_parameters *params); int (*has_signal)(struct dvb_frontend *fe); int (*is_stereo)(struct dvb_frontend *fe); int (*get_afc)(struct dvb_frontend *fe); -- cgit v1.2.3 From ab1660503ac3af7febfcf987648509b484d4feda Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 9 Dec 2007 02:26:48 -0300 Subject: V4L/DVB (6785): tda8290: remove dependency on struct tuner - remove dependency of tda8290 module on struct tuner - move tuner_foo printk macros from tuner-driver.h into tuner-core.c - clean up #includes of tuner-i2c.h / tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 91913ee08a0..a215161d024 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -24,13 +24,10 @@ #include #include -#include "tuner-i2c.h" #include "dvb_frontend.h" extern unsigned const int tuner_count; -struct tuner; - struct analog_tuner_ops { void (*set_params)(struct dvb_frontend *fe, struct analog_parameters *params); @@ -69,28 +66,4 @@ struct tuner { int (*tuner_callback) (void *dev, int command,int arg); }; -/* ------------------------------------------------------------------------ */ - -#define tuner_warn(fmt, arg...) do { \ - printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \ - 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, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ - } while (0) - -#define tuner_err(fmt, arg...) do { \ - printk(KERN_ERR "%s %d-%04x: " fmt, PREFIX, \ - 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, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ - } while (0) - #endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From a55db8cd7f8a107f3abcb4c803b1873b2be63663 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 9 Dec 2007 13:52:51 -0300 Subject: V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops Store the analog demodulator name in fe.ops.analog_demod_ops.info.name Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index a215161d024..c245f501a31 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -28,7 +28,14 @@ extern unsigned const int tuner_count; +struct analog_demod_info { + char name[128]; +}; + struct analog_tuner_ops { + + struct analog_demod_info info; + void (*set_params)(struct dvb_frontend *fe, struct analog_parameters *params); int (*has_signal)(struct dvb_frontend *fe); -- cgit v1.2.3 From bd2b19a78cb215b67d8d016ea6607f04e48fa523 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 10 Dec 2007 16:08:25 -0300 Subject: V4L/DVB (6789): tuner: use char *name instead of 128 byte fixed array for demod info Don't waste 128 bytes of memory for a name that might not actually need it. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index c245f501a31..65ced435018 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -29,7 +29,7 @@ extern unsigned const int tuner_count; struct analog_demod_info { - char name[128]; + char *name; }; struct analog_tuner_ops { -- cgit v1.2.3 From f1c9a281005f714fdc57c830a23f2b6bd6e2b714 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 16 Dec 2007 19:27:23 -0300 Subject: V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 65ced435018..7f43dc68ab2 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -45,6 +45,9 @@ struct analog_tuner_ops { void (*standby)(struct dvb_frontend *fe); void (*release)(struct dvb_frontend *fe); int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable); + + /** This is to allow setting tuner-specific configuration */ + int (*set_config)(struct dvb_frontend *fe, void *priv_cfg); }; struct tuner { -- cgit v1.2.3 From 710401b837f8849dc9c28385eb5298746b811305 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 16 Dec 2007 19:53:32 -0300 Subject: V4L/DVB (6840): tuner: convert tda9887 to use TUNER_SET_CONFIG Use TUNER_SET_CONFIG to set configuration in tda9887's private state structure, rather than storing tda9887-specific configuration within struct tuner. Update handling of TUNER_SET_CONFIG by tuner-core, to call &t->fe.ops.analog_demod_ops rather than &t->fe.ops.tuner_ops analog_demod_ops.set_config passes the request to tuner_ops.set_config, so this does not break other drivers. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 7f43dc68ab2..417753b7c3f 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -69,9 +69,6 @@ struct tuner { struct dvb_frontend fe; - /* used by tda9887 */ - unsigned int tda9887_config; - unsigned int config; int (*tuner_callback) (void *dev, int command,int arg); }; -- cgit v1.2.3 From f7f427e4cc6078e23078dcd7f321676e0b0f544c Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 16 Dec 2007 22:02:26 -0300 Subject: V4L/DVB (6844): tuner: remove struct tuner from tuner-driver.h struct tuner holds state for tuner-core, only -- move it into tuner-core.c Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 417753b7c3f..7b1adfaf7ac 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -50,27 +50,4 @@ struct analog_tuner_ops { int (*set_config)(struct dvb_frontend *fe, void *priv_cfg); }; -struct tuner { - /* device */ - struct i2c_client *i2c; - struct list_head list; /* list of tuners */ - - 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; - unsigned int audmode; - v4l2_std_id std; - - int using_v4l2; - - struct dvb_frontend fe; - - unsigned int config; - int (*tuner_callback) (void *dev, int command,int arg); -}; - #endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From dabe61565e3b02bc4a841f317896536068f94e63 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 17 Dec 2007 01:21:08 -0300 Subject: V4L/DVB (6845): tuner: remove unneeded #includes from tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 7b1adfaf7ac..5eaa30ccbda 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -22,8 +22,6 @@ #ifndef __TUNER_DRIVER_H__ #define __TUNER_DRIVER_H__ -#include -#include #include "dvb_frontend.h" extern unsigned const int tuner_count; -- cgit v1.2.3 From b624aa86cd92b32d66653609e4896f54c0d6111d Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 20 Dec 2007 23:19:14 -0300 Subject: V4L/DVB (6878): tuner: remove extraneous variable declaration tuner_count is already declared as "extern unsigned const int" in -- Remove it from tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 5eaa30ccbda..999ad7715a0 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -24,8 +24,6 @@ #include "dvb_frontend.h" -extern unsigned const int tuner_count; - struct analog_demod_info { char *name; }; -- cgit v1.2.3 From 807ffe8df23e1977d4e702697a08047f346eb974 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Fri, 21 Dec 2007 02:55:43 -0300 Subject: V4L/DVB (6879): move struct analog_tuner_ops into dvb_frontend.h struct analog_tuner_ops no longer has any dependencies specific to v4l2, so we can move this into dvb_frontend.h with the rest of the tuning structures. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h index 999ad7715a0..79efecc9334 100644 --- a/drivers/media/video/tuner-driver.h +++ b/drivers/media/video/tuner-driver.h @@ -24,26 +24,4 @@ #include "dvb_frontend.h" -struct analog_demod_info { - char *name; -}; - -struct analog_tuner_ops { - - struct analog_demod_info info; - - void (*set_params)(struct dvb_frontend *fe, - struct analog_parameters *params); - int (*has_signal)(struct dvb_frontend *fe); - int (*is_stereo)(struct dvb_frontend *fe); - int (*get_afc)(struct dvb_frontend *fe); - void (*tuner_status)(struct dvb_frontend *fe); - void (*standby)(struct dvb_frontend *fe); - void (*release)(struct dvb_frontend *fe); - int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable); - - /** This is to allow setting tuner-specific configuration */ - int (*set_config)(struct dvb_frontend *fe, void *priv_cfg); -}; - #endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From 9ad89f0104314786138d580ab2c1119e7e470f56 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Fri, 21 Dec 2007 03:00:59 -0300 Subject: V4L/DVB (6880): kill tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tuner-driver.h | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 drivers/media/video/tuner-driver.h (limited to 'drivers/media/video/tuner-driver.h') diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h deleted file mode 100644 index 79efecc9334..00000000000 --- a/drivers/media/video/tuner-driver.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - tuner-driver.h - interface for different tuners - - Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) - minor modifications by Ralph Metzler (rjkm@thp.uni-koeln.de) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __TUNER_DRIVER_H__ -#define __TUNER_DRIVER_H__ - -#include "dvb_frontend.h" - -#endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3