diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-09 00:38:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:27 -0500 |
commit | f3b512fd42b4ed6ff47a8afb4f42ac3cc325ddad (patch) | |
tree | 5c3d79670b5823ad1f9bf8baf2ccec292522903e /drivers/media/video/bttv-cards.c | |
parent | 50c8640725453f2487da9267844a962108c8418e (diff) |
[PATCH] v4l: 875: some cleanups at i2c stuff and fixing when tuner addr is set
- Some cleanups at I2C stuff and fixing when tuner addr is set.
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>
Diffstat (limited to 'drivers/media/video/bttv-cards.c')
-rw-r--r-- | drivers/media/video/bttv-cards.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c index 89aa5cbb8b9e..d81672acdaad 100644 --- a/drivers/media/video/bttv-cards.c +++ b/drivers/media/video/bttv-cards.c | |||
@@ -3188,7 +3188,7 @@ void __devinit bttv_init_card1(struct bttv *btv) | |||
3188 | void __devinit bttv_init_card2(struct bttv *btv) | 3188 | void __devinit bttv_init_card2(struct bttv *btv) |
3189 | { | 3189 | { |
3190 | int tda9887; | 3190 | int tda9887; |
3191 | int addr=ADDR_UNSET, radio_addr=ADDR_UNSET; | 3191 | int addr=ADDR_UNSET; |
3192 | 3192 | ||
3193 | btv->tuner_type = -1; | 3193 | btv->tuner_type = -1; |
3194 | 3194 | ||
@@ -3333,31 +3333,28 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3333 | if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr) | 3333 | if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr) |
3334 | addr = bttv_tvcards[btv->c.type].tuner_addr; | 3334 | addr = bttv_tvcards[btv->c.type].tuner_addr; |
3335 | 3335 | ||
3336 | if (ADDR_UNSET != bttv_tvcards[btv->c.type].radio_addr) | ||
3337 | radio_addr = bttv_tvcards[btv->c.type].radio_addr; | ||
3338 | |||
3339 | if (UNSET != bttv_tvcards[btv->c.type].tuner_type) | 3336 | if (UNSET != bttv_tvcards[btv->c.type].tuner_type) |
3340 | if(UNSET == btv->tuner_type) | 3337 | if(UNSET == btv->tuner_type) |
3341 | btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; | 3338 | btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; |
3342 | if (UNSET != tuner[btv->c.nr]) | 3339 | if (UNSET != tuner[btv->c.nr]) |
3343 | btv->tuner_type = tuner[btv->c.nr]; | 3340 | btv->tuner_type = tuner[btv->c.nr]; |
3344 | printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type); | 3341 | printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type); |
3345 | if (btv->pinnacle_id != UNSET) | 3342 | |
3346 | bttv_call_i2c_clients(btv, AUDC_CONFIG_PINNACLE, | ||
3347 | &btv->pinnacle_id); | ||
3348 | if (btv->tuner_type != UNSET) { | 3343 | if (btv->tuner_type != UNSET) { |
3349 | struct tuner_setup tun_setup; | 3344 | struct tuner_setup tun_setup; |
3350 | 3345 | ||
3351 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; | 3346 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; |
3352 | tun_setup.type = btv->tuner_type; | 3347 | tun_setup.type = btv->tuner_type; |
3353 | tun_setup.addr = addr; | 3348 | tun_setup.addr = addr; |
3354 | 3349 | ||
3355 | if (addr == radio_addr) | ||
3356 | tun_setup.mode_mask = T_RADIO; | ||
3357 | |||
3358 | bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup); | 3350 | bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup); |
3359 | } | 3351 | } |
3360 | 3352 | ||
3353 | if (btv->pinnacle_id != UNSET) { | ||
3354 | bttv_call_i2c_clients(btv, AUDC_CONFIG_PINNACLE, | ||
3355 | &btv->pinnacle_id); | ||
3356 | } | ||
3357 | |||
3361 | btv->svhs = bttv_tvcards[btv->c.type].svhs; | 3358 | btv->svhs = bttv_tvcards[btv->c.type].svhs; |
3362 | if (svhs[btv->c.nr] != UNSET) | 3359 | if (svhs[btv->c.nr] != UNSET) |
3363 | btv->svhs = svhs[btv->c.nr]; | 3360 | btv->svhs = svhs[btv->c.nr]; |