summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorVladimir Dergachev <volodya@mindspring.com>2004-10-03 15:01:31 +0000
committerVladimir Dergachev <volodya@mindspring.com>2004-10-03 15:01:31 +0000
commit7b27bf869dcf02bccf730706fc451c6f4c72b1f0 (patch)
tree58289c61513ba0d261a8c7590b03db39fd47cd1b /hw/xfree86
parent4046653cb63f4cd752212e7cf65fad5408d8f5b8 (diff)
Modified:
xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Make sure formatting style is consistent within a single function. MT2032 functions are best be in separate file anyway.
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/i2c/fi1236.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/hw/xfree86/i2c/fi1236.c b/hw/xfree86/i2c/fi1236.c
index c94633717..67fb26533 100644
--- a/hw/xfree86/i2c/fi1236.c
+++ b/hw/xfree86/i2c/fi1236.c
@@ -495,13 +495,16 @@ void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency)
f->afc_delta=0;
f->original_frequency=frequency;
- if(f->type==TUNER_TYPE_MT2032){
+ if(f->type==TUNER_TYPE_MT2032)
+ {
MT2032_tune(f, (1.0*frequency)/16.0, 0.0625);
- } else {
+ } else
+ {
FI1236_tune(f, frequency);
}
- if(!f->afc_timer_installed){
+ if(!f->afc_timer_installed)
+ {
f->afc_timer_installed=TRUE;
/* RegisterBlockAndWakeupHandlers(FI1236_BlockHandler, AFCWakeup, f); */
TimerSet(NULL, 0, 300, AFC_TimerCallback, f);
@@ -516,12 +519,14 @@ int FI1236_AFC(FI1236Ptr f)
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "AFC: f=%p f->count=%d f->original_frequency=%d f->afc_delta=%d\n", f, f->afc_count, f->original_frequency, f->afc_delta);
#endif
f->afc_count++;
- if(f->type==TUNER_TYPE_MT2032){
+ if(f->type==TUNER_TYPE_MT2032)
+ {
f->last_afc_hint=MT2032_get_afc_hint(f);
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "AFC: afc_hint=%d\n", f->last_afc_hint);
if(f->last_afc_hint==TUNER_TUNED)return 0;
if(f->afc_count>3)f->last_afc_hint=TUNER_OFF;
- if(f->last_afc_hint==TUNER_OFF){
+ if(f->last_afc_hint==TUNER_OFF)
+ {
f->afc_delta=0;
} else
f->afc_delta+=f->last_afc_hint;
@@ -529,11 +534,13 @@ int FI1236_AFC(FI1236Ptr f)
MT2032_tune(f, (1.0*f->original_frequency+0.5*f->afc_delta)/16.0, 0.03125);
if(f->last_afc_hint==TUNER_OFF)return 0;
return 1; /* call me again */
- } else {
+ } else
+ {
f->last_afc_hint=FI1236_get_afc_hint(f);
if(f->last_afc_hint==TUNER_TUNED)return 0;
if(f->afc_count>3)f->last_afc_hint=TUNER_OFF;
- if(f->last_afc_hint==TUNER_OFF){
+ if(f->last_afc_hint==TUNER_OFF)
+ {
f->afc_delta=0;
} else
f->afc_delta+=f->last_afc_hint;