aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c33
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c11
2 files changed, 31 insertions, 13 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index e236df23370e..48a975134ac5 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -45,6 +45,7 @@
45#include "dibx000_common.h" 45#include "dibx000_common.h"
46#include "zl10353.h" 46#include "zl10353.h"
47#include "stv0900.h" 47#include "stv0900.h"
48#include "stv0900_reg.h"
48#include "stv6110.h" 49#include "stv6110.h"
49#include "lnbh24.h" 50#include "lnbh24.h"
50#include "cx24116.h" 51#include "cx24116.h"
@@ -242,12 +243,22 @@ static struct tda18271_std_map hauppauge_tda18271_std_map = {
242 .if_lvl = 6, .rfagc_top = 0x37 }, 243 .if_lvl = 6, .rfagc_top = 0x37 },
243}; 244};
244 245
246static struct tda18271_std_map hauppauge_hvr1200_tda18271_std_map = {
247 .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4,
248 .if_lvl = 1, .rfagc_top = 0x37, },
249 .dvbt_7 = { .if_freq = 3800, .agc_mode = 3, .std = 5,
250 .if_lvl = 1, .rfagc_top = 0x37, },
251 .dvbt_8 = { .if_freq = 4300, .agc_mode = 3, .std = 6,
252 .if_lvl = 1, .rfagc_top = 0x37, },
253};
254
245static struct tda18271_config hauppauge_tda18271_config = { 255static struct tda18271_config hauppauge_tda18271_config = {
246 .std_map = &hauppauge_tda18271_std_map, 256 .std_map = &hauppauge_tda18271_std_map,
247 .gate = TDA18271_GATE_ANALOG, 257 .gate = TDA18271_GATE_ANALOG,
248}; 258};
249 259
250static struct tda18271_config hauppauge_hvr1200_tuner_config = { 260static struct tda18271_config hauppauge_hvr1200_tuner_config = {
261 .std_map = &hauppauge_hvr1200_tda18271_std_map,
251 .gate = TDA18271_GATE_ANALOG, 262 .gate = TDA18271_GATE_ANALOG,
252}; 263};
253 264
@@ -370,13 +381,25 @@ static struct zl10353_config dvico_fusionhdtv_xc3028 = {
370 .disable_i2c_gate_ctrl = 1, 381 .disable_i2c_gate_ctrl = 1,
371}; 382};
372 383
384static struct stv0900_reg stv0900_ts_regs[] = {
385 { R0900_TSGENERAL, 0x00 },
386 { R0900_P1_TSSPEED, 0x40 },
387 { R0900_P2_TSSPEED, 0x40 },
388 { R0900_P1_TSCFGM, 0xc0 },
389 { R0900_P2_TSCFGM, 0xc0 },
390 { R0900_P1_TSCFGH, 0xe0 },
391 { R0900_P2_TSCFGH, 0xe0 },
392 { R0900_P1_TSCFGL, 0x20 },
393 { R0900_P2_TSCFGL, 0x20 },
394 { 0xffff, 0xff }, /* terminate */
395};
396
373static struct stv0900_config netup_stv0900_config = { 397static struct stv0900_config netup_stv0900_config = {
374 .demod_address = 0x68, 398 .demod_address = 0x68,
375 .xtal = 27000000, 399 .xtal = 27000000,
376 .clkmode = 3,/* 0-CLKI, 2-XTALI, else AUTO */ 400 .clkmode = 3,/* 0-CLKI, 2-XTALI, else AUTO */
377 .diseqc_mode = 2,/* 2/3 PWM */ 401 .diseqc_mode = 2,/* 2/3 PWM */
378 .path1_mode = 2,/*Serial continues clock */ 402 .ts_config_regs = stv0900_ts_regs,
379 .path2_mode = 2,/*Serial continues clock */
380 .tun1_maddress = 0,/* 0x60 */ 403 .tun1_maddress = 0,/* 0x60 */
381 .tun2_maddress = 3,/* 0x63 */ 404 .tun2_maddress = 3,/* 0x63 */
382 .tun1_adc = 1,/* 1 Vpp */ 405 .tun1_adc = 1,/* 1 Vpp */
@@ -736,7 +759,8 @@ static int dvb_register(struct cx23885_tsport *port)
736 if (!dvb_attach(lnbh24_attach, 759 if (!dvb_attach(lnbh24_attach,
737 fe0->dvb.frontend, 760 fe0->dvb.frontend,
738 &i2c_bus->i2c_adap, 761 &i2c_bus->i2c_adap,
739 LNBH24_PCL, 0, 0x09)) 762 LNBH24_PCL,
763 LNBH24_TTX, 0x09))
740 printk(KERN_ERR 764 printk(KERN_ERR
741 "No LNBH24 found!\n"); 765 "No LNBH24 found!\n");
742 766
@@ -756,7 +780,8 @@ static int dvb_register(struct cx23885_tsport *port)
756 if (!dvb_attach(lnbh24_attach, 780 if (!dvb_attach(lnbh24_attach,
757 fe0->dvb.frontend, 781 fe0->dvb.frontend,
758 &i2c_bus->i2c_adap, 782 &i2c_bus->i2c_adap,
759 LNBH24_PCL, 0, 0x0a)) 783 LNBH24_PCL,
784 LNBH24_TTX, 0x0a))
760 printk(KERN_ERR 785 printk(KERN_ERR
761 "No LNBH24 found!\n"); 786 "No LNBH24 found!\n");
762 787
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index 66bbd2e71105..70836af3ab48 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -963,15 +963,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
963 } 963 }
964 964
965 f->fmt.pix.field = field; 965 f->fmt.pix.field = field;
966 if (f->fmt.pix.height < 32) 966 v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2,
967 f->fmt.pix.height = 32; 967 &f->fmt.pix.height, 32, maxh, 0, 0);
968 if (f->fmt.pix.height > maxh)
969 f->fmt.pix.height = maxh;
970 if (f->fmt.pix.width < 48)
971 f->fmt.pix.width = 48;
972 if (f->fmt.pix.width > maxw)
973 f->fmt.pix.width = maxw;
974 f->fmt.pix.width &= ~0x03;
975 f->fmt.pix.bytesperline = 968 f->fmt.pix.bytesperline =
976 (f->fmt.pix.width * fmt->depth) >> 3; 969 (f->fmt.pix.width * fmt->depth) >> 3;
977 f->fmt.pix.sizeimage = 970 f->fmt.pix.sizeimage =