Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61355
b: refs/heads/master
c: ac7dc84
h: refs/heads/master
i:
  61353: bc9b3ca
  61351: 944fb27
v: v3
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent 8454308 commit c5e8747
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27cb786f4ec5fe85e9e2deffa4d33eed2f588cb0
refs/heads/master: ac7dc84584310a836d13236767d71545f5b695b3
28 changes: 14 additions & 14 deletions trunk/drivers/media/video/bt8xx/bttv-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -3370,10 +3370,9 @@ void __devinit bttv_init_card1(struct bttv *btv)
/* initialization part two -- after registering i2c bus */
void __devinit bttv_init_card2(struct bttv *btv)
{
int tda9887;
int addr=ADDR_UNSET;

btv->tuner_type = -1;
btv->tuner_type = UNSET;

if (BTTV_BOARD_UNKNOWN == btv->c.type) {
bttv_readee(btv,eeprom_data,0xa0);
Expand Down Expand Up @@ -3521,7 +3520,15 @@ void __devinit bttv_init_card2(struct bttv *btv)
btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
if (UNSET != tuner[btv->c.nr])
btv->tuner_type = tuner[btv->c.nr];
printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type);

if (btv->tuner_type == TUNER_ABSENT ||
bttv_tvcards[btv->c.type].tuner == UNSET)
printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
else if(btv->tuner_type == UNSET)
printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
else
printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
btv->tuner_type);

if (btv->tuner_type != UNSET) {
struct tuner_setup tun_setup;
Expand Down Expand Up @@ -3563,6 +3570,9 @@ void __devinit bttv_init_card2(struct bttv *btv)
if (!autoload)
return;

if (bttv_tvcards[btv->c.type].tuner == UNSET)
return; /* no tuner or related drivers to load */

/* try to detect audio/fader chips */
if (!bttv_tvcards[btv->c.type].no_msp34xx &&
bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Expand All @@ -3583,17 +3593,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
if (bttv_tvcards[btv->c.type].needs_tvaudio)
request_module("tvaudio");

/* tuner modules */
tda9887 = 0;
if (btv->tda9887_conf)
tda9887 = 1;
if (0 == tda9887 && 0 == bttv_tvcards[btv->c.type].has_dvb &&
bttv_I2CRead(btv, I2C_ADDR_TDA9887, "TDA9887") >=0)
tda9887 = 1;
/* Hybrid DVB card, DOES have a tda9887 */
if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE)
tda9887 = 1;
if (btv->tuner_type != UNSET)
if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
request_module("tuner");
}

Expand Down

0 comments on commit c5e8747

Please sign in to comment.