aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt20xx.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-01-15 12:04:52 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-15 18:25:32 -0500
commit27487d44712aaa37710cc508d5bd6119f5e9f976 (patch)
tree474acfb51469cc730cd76ebdf6f34680b3809442 /drivers/media/video/mt20xx.c
parent8f0bb9c069fc487dadebe4cdd1e03f0df5ebf0e6 (diff)
V4L/DVB (3384): Separate tv & radio freqs, fix cb/freq transmit order for tuners that need this.
- Moved MSP_SET_MATRIX to v4l2-common.h - Fix typos and integer overflows in tea5767.c - Split old freq field into a tv_freq and a radio_freq. Prevents that a radio tuner is initialized with a tv frequency or vice versa. - When switching to radio mode initialize the tuner with the last used radio frequency (this was already done for the TV mode). As a result of these changes the tuner module now remembers the last set radio and TV frequencies, which is what you would expect to happen. - Move out of range frequencies to the closest valid frequency as per v4l2 API spec. - Fix incorrect initial radio frequency (multiplier is 16000, not 16) - Add boundary check for out of range frequencies. - Use new flag to check if the order of the CB and freq. depends on the last set frequency. That is needed for some tuners or you can get static as a result. The flag is added for those tuners where I know that the datasheet indicates that this is necessary. - For this new check use the last set div value, not the last frequency as radio frequencies are always much higher due to the 16000 multiplier. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/mt20xx.c')
-rw-r--r--drivers/media/video/mt20xx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/mt20xx.c b/drivers/media/video/mt20xx.c
index 0bf1caac5887..c7c9f3f8715c 100644
--- a/drivers/media/video/mt20xx.c
+++ b/drivers/media/video/mt20xx.c
@@ -353,8 +353,8 @@ static int mt2032_init(struct i2c_client *c)
353 } while (xok != 1 ); 353 } while (xok != 1 );
354 t->xogc=xogc; 354 t->xogc=xogc;
355 355
356 t->tv_freq = mt2032_set_tv_freq; 356 t->set_tv_freq = mt2032_set_tv_freq;
357 t->radio_freq = mt2032_set_radio_freq; 357 t->set_radio_freq = mt2032_set_radio_freq;
358 return(1); 358 return(1);
359} 359}
360 360
@@ -481,8 +481,8 @@ static int mt2050_init(struct i2c_client *c)
481 i2c_master_recv(c,buf,1); 481 i2c_master_recv(c,buf,1);
482 482
483 tuner_dbg("mt2050: sro is %x\n",buf[0]); 483 tuner_dbg("mt2050: sro is %x\n",buf[0]);
484 t->tv_freq = mt2050_set_tv_freq; 484 t->set_tv_freq = mt2050_set_tv_freq;
485 t->radio_freq = mt2050_set_radio_freq; 485 t->set_radio_freq = mt2050_set_radio_freq;
486 return 0; 486 return 0;
487} 487}
488 488
@@ -494,8 +494,8 @@ int microtune_init(struct i2c_client *c)
494 int company_code; 494 int company_code;
495 495
496 memset(buf,0,sizeof(buf)); 496 memset(buf,0,sizeof(buf));
497 t->tv_freq = NULL; 497 t->set_tv_freq = NULL;
498 t->radio_freq = NULL; 498 t->set_radio_freq = NULL;
499 t->standby = NULL; 499 t->standby = NULL;
500 if (t->std & V4L2_STD_525_60) { 500 if (t->std & V4L2_STD_525_60) {
501 tuner_dbg("pinnacle ntsc\n"); 501 tuner_dbg("pinnacle ntsc\n");