Diff for /margi2/margi.c between versions 1.18 and 1.19

version 1.18, 2001/10/15 12:40:29 version 1.19, 2002/02/04 12:20:13
Line 59  MODULE_LICENSE("GPL"); Line 59  MODULE_LICENSE("GPL");
 /*====================================================================*/  /*====================================================================*/
   
 /* Parameters that can be set with 'insmod' */  /* Parameters that can be set with 'insmod' */
   static int svhs = 1;
   MODULE_PARM(svhs,"i");
   static int composite = 1;
   MODULE_PARM(composite,"i");
   static int use_zv = 1;
   MODULE_PARM(use_zv,"i");
   
 /* Release IO ports after configuration? */  /* Release IO ports after configuration? */
 static int free_ports = 0;  static int free_ports = 0;
Line 733  void ZV_init(struct cvdv_cards *card) Line 739  void ZV_init(struct cvdv_cards *card)
         write_indexed_register(card, IIO_VIDEO_CONTROL1, reg);          write_indexed_register(card, IIO_VIDEO_CONTROL1, reg);
 }  }
   
   void set_svhs(struct cvdv_cards *card, int onoff)
   {
           uint8_t val;
   
           val =  I2CRead(card, card->i2c_addr, CS_DAC)&0x0f;
           MDEBUG(1, ": --svhs val 0x%02x\n",val);
   
           if (onoff){
                   if (!card->svhs){
                           I2CWrite(card, card->i2c_addr, CS_DAC, val|0x03);
                           card->svhs = 1;
                   }
           } else {
                   if (!card->svhs){
                           I2CWrite(card, card->i2c_addr, CS_DAC, val|0x30);
                           card->svhs = 1;
                   }
           }
   
   }
   
   void set_composite(struct cvdv_cards *card, int onoff)
   {
           uint8_t val;
   
           val =  I2CRead(card, card->i2c_addr, CS_DAC)&0x0f;
           MDEBUG(1, ": --composite val 0x%02x\n",val);
           
   
           if (onoff){
                   if (!card->composite){
                           I2CWrite(card, card->i2c_addr, CS_DAC, val|0x84);
                           card->composite = 1;
                   }
           } else {
                   if (!card->svhs){
                           I2CWrite(card, card->i2c_addr, CS_DAC, val|0xE0);
                           card->composite = 1;
                   }
           }
   
   }
   
   
 int L64014Init(struct cvdv_cards *card)  int L64014Init(struct cvdv_cards *card)
 {  {
         uint16_t testram[16];          uint16_t testram[16];
Line 770  int L64014Init(struct cvdv_cards *card) Line 820  int L64014Init(struct cvdv_cards *card)
         I2CWrite(card, card->i2c_addr, CS_SC_SYNTH2, 0x13);          I2CWrite(card, card->i2c_addr, CS_SC_SYNTH2, 0x13);
         I2CWrite(card, card->i2c_addr, CS_SC_SYNTH3, 0x54);          I2CWrite(card, card->i2c_addr, CS_SC_SYNTH3, 0x54);
   
         I2CWrite(card, card->i2c_addr, CS_DAC, 0x87);  //      I2CWrite(card, card->i2c_addr, CS_DAC, 0x87);
           if (svhs) set_svhs(card, 1);
           if (composite) set_composite(card, 1);
         I2CWrite(card, card->i2c_addr, CS_BKG_COL, 0x03);          I2CWrite(card, card->i2c_addr, CS_BKG_COL, 0x03);
   
         MDEBUG(0,"Decoder Status: %d\n", read_lsi_status(card));          MDEBUG(0,"Decoder Status: %d\n", read_lsi_status(card));
         MDEBUG(0,"lsi stat %d\n", DecoderReadByte(card, 0x005));          MDEBUG(0,"lsi stat %d\n", DecoderReadByte(card, 0x005));
   
 #ifdef USE_ZV  #ifdef USE_ZV
         ZV_init(card);          if (use_zv) ZV_init(card);
 #endif  #endif
         L64021Init(card);          L64021Init(card);
   

Removed from v.1.18  
changed lines
  Added in v.1.19


LinuxTV legacy CVS <linuxtv.org/cvs>