aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/cpia.h
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-03-02 19:42:21 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 15:44:09 -0300
commitd9e54324d03add27990ac27fcb34a1ae7a0f97ef (patch)
treee13d27678b2c33464266f23fd1ae085eb9eb0afd /drivers/media/video/cpia.h
parent387e69adff3d441616b45002ff85c5b36001be9e (diff)
V4L/DVB (5374): Or51132: refactor i2c code, improve error resilience
The code the i2c transactions was leftover from the old V4L-based ATSC driver. It did too little with too much code. It is re-written to remove unnecessary parameters and be more efficient. A demod register can now be read with one function call, instead of repeating a dozen line block of code each time. There were msleep()'s, which appear to be unnecessary, spread around all the I2C transactions. These have been removed. Reading SNR used to take about 130 ms, now it's down to 1.8 ms. Reads from the demodulator's registers do not return correct results sometimes. Adding or removing the delays in the I2C transactions did not appear to effect the probability of failure. If anything, the transactions without delays were less likely to fail, but since far more transactions could be made per second the number of failures per hour was greater. To increase reliability, the SNR and get_params functions will now retry once if they get bad data back. This appears to have reduced the probability of failure to effectively zero. Some error messages are cleaned up or given KERN_* levels when they were missing. or51132_setmode() wasn't returning correct error codes, which is fixed as well. CC: Rusty Scott <rustys@ieee.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cpia.h')
0 files changed, 0 insertions, 0 deletions