[linux-dvb] SAA7146 short delay flag and budget cards
Oliver Endriss
o.endriss at gmx.de
Mon Sep 26 16:54:18 CEST 2005
Johannes Stezenbach wrote:
> On Mon, Sep 26, 2005 Oliver Endriss wrote:
> > hunold at linuxtv.org wrote:
> > >
> > > First of all, I did not add "short_delay" to that code. ;-)
> >
> > I did, see below.
>
> Did you? Or do you confuse short_delay with SAA7146_I2C_SHORT_DELAY?
Correct, I did not add short_delay. ;-)
short_delay was added by Holger in rev 1.20.
udelay(10) was added by Holger in 1.19.
schedule_timeout() was introduced by Michael in 1.8.
> It's pretty clear why SAA7146_I2C_SHORT_DELAY exists and waht it does,
> but I don't get why short_delay exists, i.e. why using udelay(10)
> instead of msleep(1) isn't the default.
>
> > Sorry, this is not correct. SAA7146_I2C_SHORT_DELAY turns on polling for
> > _all_ transfers. (That's the reason why it had been added.)
> >
> > | if ( count > 3 || 0 != (SAA7146_I2C_SHORT_DELAY & dev->ext->flags) )
> > | short_delay = 1;
> >
> > SAA7146_I2C_SHORT_DELAY was introduced by me because tuning with FF
> > cards was rather slow. From Changelog:
> >
> > | 2003-11-25 20:13 endriss
> > | * linux/: drivers/media/common/saa7146_i2c.c,
> > | drivers/media/dvb/ttpci/av7110.c, include/media/saa7146.h:
> > | introduced flag SAA7146_I2C_SHORT_DELAY to speed up I2C access
> >
> > Before that, only larger transfers used polling. Since DVB cards use a
> > lot of small i2c transfers there was noticeable delay during tuning.
>
> This is incorrect, the driver always uses polling, just one time
> with msleep(1) (i.e. sleep at least one scheduler tick) and the other
> with udelay(1) (busy loop for 10 usecs).
You are right. s/polling/sleeping/.
> > Imho the flag SAA7146_I2C_SHORT_DELAY should be added for all
> > saa7146-based cards.
>
> Unless someone can explain why short_delay==0 is necessary I vote
> for removing this altogether and making the use of udelay(10)
> the default.
Ack.
Oliver
--
--------------------------------------------------------
VDR Remote Plugin available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------
More information about the linux-dvb
mailing list