aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t\-online.de>2006-03-03 10:09:26 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-03 10:09:26 -0500
commitdf8cf70683ba3109756e20c50e0fefe24736564f (patch)
treeac156d40651bf23f1ff79a347b77ec357afc86a5 /drivers/media/video/saa7134
parent4a287cfeea7056dc71d2bc352ae490a2a5bcceb0 (diff)
V4L/DVB (3395): Fixed Pinnacle 300i DVB-T support
- fixed tda9886 port 2 setting - turned remote control receiver off via saa7134 GPIO to avoid i2c hangs - modified tda9886 client calls to direct i2c access to allow proper return to analog mode - allow mode change to V4L2_TUNER_DIGITAL_TV in tuner VIDIOC_S_FREQUENCY client call Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c9
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c12
2 files changed, 15 insertions, 6 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index ccf7231cde3e..722ebff0f889 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -1003,7 +1003,7 @@ struct saa7134_board saa7134_boards[] = {
1003 .radio_type = UNSET, 1003 .radio_type = UNSET,
1004 .tuner_addr = ADDR_UNSET, 1004 .tuner_addr = ADDR_UNSET,
1005 .radio_addr = ADDR_UNSET, 1005 .radio_addr = ADDR_UNSET,
1006 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE, 1006 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE,
1007 .inputs = {{ 1007 .inputs = {{
1008 .name = name_tv, 1008 .name = name_tv,
1009 .vmux = 3, 1009 .vmux = 3,
@@ -1692,7 +1692,7 @@ struct saa7134_board saa7134_boards[] = {
1692 .radio_type = UNSET, 1692 .radio_type = UNSET,
1693 .tuner_addr = ADDR_UNSET, 1693 .tuner_addr = ADDR_UNSET,
1694 .radio_addr = ADDR_UNSET, 1694 .radio_addr = ADDR_UNSET,
1695 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE, 1695 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE,
1696 .mpeg = SAA7134_MPEG_DVB, 1696 .mpeg = SAA7134_MPEG_DVB,
1697 .inputs = {{ 1697 .inputs = {{
1698 .name = name_tv, 1698 .name = name_tv,
@@ -3375,6 +3375,11 @@ int saa7134_board_init1(struct saa7134_dev *dev)
3375 /* power-up tuner chip */ 3375 /* power-up tuner chip */
3376 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); 3376 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000);
3377 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); 3377 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000);
3378 case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL:
3379 /* this turns the remote control chip off to work around a bug in it */
3380 saa_writeb(SAA7134_GPIO_GPMODE1, 0x80);
3381 saa_writeb(SAA7134_GPIO_GPSTATUS1, 0x80);
3382 break;
3378 case SAA7134_BOARD_MONSTERTV_MOBILE: 3383 case SAA7134_BOARD_MONSTERTV_MOBILE:
3379 /* power-up tuner chip */ 3384 /* power-up tuner chip */
3380 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); 3385 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000);
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 757796259cf9..5969481ed4fb 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -110,6 +110,7 @@ static int mt352_pinnacle_init(struct dvb_frontend* fe)
110 mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); 110 mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg));
111 mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); 111 mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg));
112 mt352_write(fe, irq_cfg, sizeof(irq_cfg)); 112 mt352_write(fe, irq_cfg, sizeof(irq_cfg));
113
113 return 0; 114 return 0;
114} 115}
115 116
@@ -135,8 +136,10 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe,
135 struct dvb_frontend_parameters* params, 136 struct dvb_frontend_parameters* params,
136 u8* pllbuf) 137 u8* pllbuf)
137{ 138{
138 static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE; 139 u8 off[] = { 0x00, 0xf1};
139 static int off = TDA9887_PRESENT | TDA9887_PORT2_ACTIVE; 140 u8 on[] = { 0x00, 0x71};
141 struct i2c_msg msg = {.addr=0x43, .flags=0, .buf=off, .len = sizeof(off)};
142
140 struct saa7134_dev *dev = fe->dvb->priv; 143 struct saa7134_dev *dev = fe->dvb->priv;
141 struct v4l2_frequency f; 144 struct v4l2_frequency f;
142 145
@@ -144,9 +147,10 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe,
144 f.tuner = 0; 147 f.tuner = 0;
145 f.type = V4L2_TUNER_DIGITAL_TV; 148 f.type = V4L2_TUNER_DIGITAL_TV;
146 f.frequency = params->frequency / 1000 * 16 / 1000; 149 f.frequency = params->frequency / 1000 * 16 / 1000;
147 saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on); 150 i2c_transfer(&dev->i2c_adap, &msg, 1);
148 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); 151 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f);
149 saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&off); 152 msg.buf = on;
153 i2c_transfer(&dev->i2c_adap, &msg, 1);
150 154
151 pinnacle_antenna_pwr(dev, antenna_pwr); 155 pinnacle_antenna_pwr(dev, antenna_pwr);
152 156