From cfeb88398f004a0e85ee011fd89a01f5d3bf3c81 Mon Sep 17 00:00:00 2001 From: Hartmut Hackmann Date: Fri, 27 Apr 2007 12:31:17 -0300 Subject: V4L/DVB (5323): Updated support for tuner callbacks This change supplies a more generic version of the tuner callback. The tuner struct now has a function pointer int (*tuner_callback) (void *dev, int command, int arg) additionally to a int config parameter. both can be set through the TUNER_SET_TYPE_ADDR client call. Note that the meaning of the parameters depend on the tuner type. Signed-off-by: Hartmut Hackmann Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tda8290.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/media/video/tda8290.c') diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index e6c3e616719..44348f95dd4 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c @@ -211,19 +211,19 @@ static void tda827xa_lna_gain(struct i2c_client *c, int high) case 2: /* turn Vsync on */ if (t->std & V4L2_STD_MN) - arg = 5; + arg = 1; else - arg = 4; - if (t->gpio_func) - t->gpio_func(c->adapter->algo_data, 22, 5); + arg = 0; + if (t->tuner_callback) + t->tuner_callback(c->adapter->algo_data, 1, arg); buf[1] = high ? 0 : 1; if (t->config == 2) buf[1] = high ? 1 : 0; i2c_transfer(c->adapter, &msg, 1); break; case 3: /* switch with GPIO of saa713x */ - if (t->gpio_func) - t->gpio_func(c->adapter->algo_data, 22, high); + if (t->tuner_callback) + t->tuner_callback(c->adapter->algo_data, 0, high); break; } } -- cgit v1.2.3