aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/av7110_v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110_v4l.c')
-rw-r--r--drivers/media/dvb/ttpci/av7110_v4l.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c
index eb84fb08d95c..e65fc36e2ce8 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -46,13 +46,13 @@ int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val)
46 46
47 if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) { 47 if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) {
48 dprintk(1, "dvb-ttpci: failed @ card %d, %u = %u\n", 48 dprintk(1, "dvb-ttpci: failed @ card %d, %u = %u\n",
49 av7110->dvb_adapter->num, reg, val); 49 av7110->dvb_adapter.num, reg, val);
50 return -EIO; 50 return -EIO;
51 } 51 }
52 return 0; 52 return 0;
53} 53}
54 54
55int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val) 55static int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
56{ 56{
57 u8 msg1[3] = { dev, reg >> 8, reg & 0xff }; 57 u8 msg1[3] = { dev, reg >> 8, reg & 0xff };
58 u8 msg2[2]; 58 u8 msg2[2];
@@ -63,7 +63,7 @@ int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
63 63
64 if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) { 64 if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) {
65 dprintk(1, "dvb-ttpci: failed @ card %d, %u\n", 65 dprintk(1, "dvb-ttpci: failed @ card %d, %u\n",
66 av7110->dvb_adapter->num, reg); 66 av7110->dvb_adapter.num, reg);
67 return -EIO; 67 return -EIO;
68 } 68 }
69 *val = (msg2[0] << 8) | msg2[1]; 69 *val = (msg2[0] << 8) | msg2[1];
@@ -552,13 +552,13 @@ int av7110_init_analog_module(struct av7110 *av7110)
552 return -ENODEV; 552 return -ENODEV;
553 553
554 printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n", 554 printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n",
555 av7110->dvb_adapter->num); 555 av7110->dvb_adapter.num);
556 av7110->adac_type = DVB_ADAC_MSP; 556 av7110->adac_type = DVB_ADAC_MSP;
557 msleep(100); // the probing above resets the msp... 557 msleep(100); // the probing above resets the msp...
558 msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); 558 msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1);
559 msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); 559 msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2);
560 dprintk(1, "dvb-ttpci: @ card %d MSP3400 version 0x%04x 0x%04x\n", 560 dprintk(1, "dvb-ttpci: @ card %d MSP3400 version 0x%04x 0x%04x\n",
561 av7110->dvb_adapter->num, version1, version2); 561 av7110->dvb_adapter.num, version1, version2);
562 msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00); 562 msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00);
563 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone 563 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone
564 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source 564 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source
@@ -596,7 +596,7 @@ int av7110_init_analog_module(struct av7110 *av7110)
596 /* init the saa7113 */ 596 /* init the saa7113 */
597 while (*i != 0xff) { 597 while (*i != 0xff) {
598 if (i2c_writereg(av7110, 0x48, i[0], i[1]) != 1) { 598 if (i2c_writereg(av7110, 0x48, i[0], i[1]) != 1) {
599 dprintk(1, "saa7113 initialization failed @ card %d", av7110->dvb_adapter->num); 599 dprintk(1, "saa7113 initialization failed @ card %d", av7110->dvb_adapter.num);
600 break; 600 break;
601 } 601 }
602 i += 2; 602 i += 2;
@@ -726,11 +726,11 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
726{ 726{
727 struct av7110 *av7110 = (struct av7110*) dev->ext_priv; 727 struct av7110 *av7110 = (struct av7110*) dev->ext_priv;
728 728
729 if (std->id == V4L2_STD_PAL) { 729 if (std->id & V4L2_STD_PAL) {
730 av7110->vidmode = VIDEO_MODE_PAL; 730 av7110->vidmode = VIDEO_MODE_PAL;
731 av7110_set_vidmode(av7110, av7110->vidmode); 731 av7110_set_vidmode(av7110, av7110->vidmode);
732 } 732 }
733 else if (std->id == V4L2_STD_NTSC) { 733 else if (std->id & V4L2_STD_NTSC) {
734 av7110->vidmode = VIDEO_MODE_NTSC; 734 av7110->vidmode = VIDEO_MODE_NTSC;
735 av7110_set_vidmode(av7110, av7110->vidmode); 735 av7110_set_vidmode(av7110, av7110->vidmode);
736 } 736 }