Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Busy waiting in i2c_busy_rise_and_fall (was: Re: Re: full featured card without signal and required video memory investigation)



Robert Schlabbach writes:
 > From: "Ralph Metzler" <rjkm@metzlerbros.de>
 > > Btw., on one PC (Duron 1200, KT7) here the faster I2C timing
 > > breaks tuning. Anything below BUS_BIT_RATE_3200 does not work
 > > reliably. On a different board (Athlon XP2400+, KT400) with
 > > the same DVB card type it works fine.
 > 
 > Hmmm, how could this happen? It shouldn't be an issue with the speed at
 > which the CPU is feeding the I2C registers. Is it possible that this
 > motherboard (or the power supply) has such "dirty" supply voltages on the
 > PCI bus that those disturb the I2C lines...?
 > 
 > BTW, you didn't mention what _card_ you were using. Do all SAA7146A-based
 > DVB cards fail in this machine at higher I2C data rates, or only a specific
 > one?
 > 

The problem does not seem to be the tuning. I do a status check after
each tuning, i.e.
        ioctl(fefd, FE_READ_STATUS, &status);
        ioctl(fefd, FE_READ_SNR, &snr);
        ioctl(fefd, FE_READ_SIGNAL_STRENGTH, &strength);
        ioctl(fefd, FE_READ_BER, &ber);
        ioctl(fefd, FE_READ_UNCORRECTED_BLOCKS, &u_blocks);
        if (status & FE_HAS_LOCK)
                 return 1;


This seems to give a FE_HAS_LOCK directly after tuning, but fails if I
check it a second time.

If I change my tuning call from the following (where check_frontend is
in essence the function described above)


       time_t count = time(0)+3;

        while(!check_frontend() && count > time(0));

        if (!check_frontend()){
                cerr << "Tuning failed" << endl;
                return -1;
        }

into

      
       time_t count = time(0)+3;
       int chk=0;

        while(!(chk=check_frontend()) && count > time(0));

        if (!chk){
                cerr << "Tuning failed" << endl;
                return -1;
        }

it works.

It seems that the additional usage of the i2c bus by the checking
calls somehow results in a loss of lock or maybe just a faulty return
value.
Anyway, tuning seems to work now and the previous error only occurs on the
slower machine.

Marcus

-- 
/--------------------------------------------------------------------\
| Dr. Marcus O.C. Metzler        |                                   |
|--------------------------------|-----------------------------------|
| mocm@metzlerbros.de            | http://www.metzlerbros.de/        |
\--------------------------------------------------------------------/




-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index