Lines Matching +full:0 +full:x77
29 u8 msg[5] = { dev, reg >> 8, reg & 0xff, val >> 8 , val & 0xff }; in msp_writereg()
30 struct i2c_msg msgs = { .flags = 0, .len = 5, .buf = msg }; in msp_writereg()
34 msgs.addr = 0x40; in msp_writereg()
37 msgs.addr = 0x42; in msp_writereg()
40 return 0; in msp_writereg()
48 return 0; in msp_writereg()
53 u8 msg1[3] = { dev, reg >> 8, reg & 0xff }; in msp_readreg()
56 { .flags = 0 , .len = 3, .buf = msg1 }, in msp_readreg()
62 msgs[0].addr = 0x40; in msp_readreg()
63 msgs[1].addr = 0x40; in msp_readreg()
66 msgs[0].addr = 0x42; in msp_readreg()
67 msgs[1].addr = 0x42; in msp_readreg()
70 return 0; in msp_readreg()
73 if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) { in msp_readreg()
78 *val = (msg2[0] << 8) | msg2[1]; in msp_readreg()
79 return 0; in msp_readreg()
84 .index = 0,
88 .tuner = 0, /* ignored */
90 .status = 0,
97 .tuner = 0,
99 .status = 0,
105 .audioset = 0,
106 .tuner = 0,
108 .status = 0,
114 .audioset = 0,
115 .tuner = 0,
117 .status = 0,
125 u8 buf[] = { 0x00, reg, data }; in ves1820_writereg()
126 struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 }; in ves1820_writereg()
132 return 0; in ves1820_writereg()
138 struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 }; in tuner_write()
144 return 0; in tuner_write()
153 dprintk(4, "freq: 0x%08x\n", freq); in ves1820_set_tv_freq()
159 buf[0] = (div >> 8) & 0x7f; in ves1820_set_tv_freq()
160 buf[1] = div & 0xff; in ves1820_set_tv_freq()
161 buf[2] = 0x8e; in ves1820_set_tv_freq()
164 config = 0xa0; in ves1820_set_tv_freq()
166 config = 0x90; in ves1820_set_tv_freq()
168 config = 0x30; in ves1820_set_tv_freq()
169 config &= ~0x02; in ves1820_set_tv_freq()
173 return tuner_write(dev, 0x61, buf); in ves1820_set_tv_freq()
184 data[0] = (div >> 8) & 0x7f; in stv0297_set_tv_freq()
185 data[1] = div & 0xff; in stv0297_set_tv_freq()
186 data[2] = 0xce; in stv0297_set_tv_freq()
191 data[3] = 0x01; in stv0297_set_tv_freq()
193 data[3] = 0x02; in stv0297_set_tv_freq()
195 data[3] = 0x04; in stv0297_set_tv_freq()
201 return tuner_write(dev, 0x63, data); in stv0297_set_tv_freq()
211 .index = 0,
226 if ((vv->video_status & STATUS_OVERLAY) != 0) { in av7110_dvb_c_switch()
228 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in av7110_dvb_c_switch()
229 if (err != 0) { in av7110_dvb_c_switch()
235 if (0 != av7110->current_input) { in av7110_dvb_c_switch()
245 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source in av7110_dvb_c_switch()
246 msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source in av7110_dvb_c_switch()
247 msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source in av7110_dvb_c_switch()
248 msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono in av7110_dvb_c_switch()
249 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); // loudspeaker + headphone in av7110_dvb_c_switch()
250 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); // SCART 1 volume in av7110_dvb_c_switch()
253 if (ves1820_writereg(dev, 0x09, 0x0f, 0x60)) in av7110_dvb_c_switch()
259 if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1) in av7110_dvb_c_switch()
264 if (i2c_writereg(av7110, 0x48, 0x02, 0xd2) != 1) in av7110_dvb_c_switch()
269 if (i2c_writereg(av7110, 0x48, 0x02, 0xd9) != 1) in av7110_dvb_c_switch()
276 adswitch = 0; in av7110_dvb_c_switch()
281 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source in av7110_dvb_c_switch()
282 msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source in av7110_dvb_c_switch()
283 msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source in av7110_dvb_c_switch()
284 msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono in av7110_dvb_c_switch()
285 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone in av7110_dvb_c_switch()
286 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume in av7110_dvb_c_switch()
289 if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) in av7110_dvb_c_switch()
308 return 0; in av7110_dvb_c_switch()
320 if (!av7110->analog_tuner_flags || t->index != 0) in vidioc_g_tuner()
323 memset(t, 0, sizeof(*t)); in vidioc_g_tuner()
332 t->signal = 0xffff; in vidioc_g_tuner()
333 t->afc = 0; in vidioc_g_tuner()
336 msp_readreg(av7110, MSP_RD_DEM, 0x007e, &stereo_det); in vidioc_g_tuner()
337 dprintk(1, "VIDIOC_G_TUNER: msp3400 TV standard detection: 0x%04x\n", stereo_det); in vidioc_g_tuner()
338 msp_readreg(av7110, MSP_RD_DSP, 0x0018, &stereo_det); in vidioc_g_tuner()
339 dprintk(1, "VIDIOC_G_TUNER: msp3400 stereo detection: 0x%04x\n", stereo_det); in vidioc_g_tuner()
341 if (stereo > 0x10) { in vidioc_g_tuner()
345 } else if (stereo < -0x10) { in vidioc_g_tuner()
352 return 0; in vidioc_g_tuner()
368 fm_matrix = 0x3001; /* stereo */ in vidioc_s_tuner()
369 src = 0x0020; in vidioc_s_tuner()
373 fm_matrix = 0x3000; /* bilingual */ in vidioc_s_tuner()
374 src = 0x0020; in vidioc_s_tuner()
378 fm_matrix = 0x3000; /* mono */ in vidioc_s_tuner()
379 src = 0x0000; in vidioc_s_tuner()
383 fm_matrix = 0x3000; /* mono */ in vidioc_s_tuner()
384 src = 0x0010; in vidioc_s_tuner()
388 fm_matrix = 0x3000; /* mono */ in vidioc_s_tuner()
389 src = 0x0030; in vidioc_s_tuner()
392 msp_writereg(av7110, MSP_WR_DSP, 0x000e, fm_matrix); in vidioc_s_tuner()
393 msp_writereg(av7110, MSP_WR_DSP, 0x0008, src); in vidioc_s_tuner()
394 msp_writereg(av7110, MSP_WR_DSP, 0x0009, src); in vidioc_s_tuner()
395 msp_writereg(av7110, MSP_WR_DSP, 0x000a, src); in vidioc_s_tuner()
396 return 0; in vidioc_s_tuner()
404 dprintk(2, "VIDIOC_G_FREQ: freq:0x%08x\n", f->frequency); in vidioc_g_frequency()
409 memset(f, 0, sizeof(*f)); in vidioc_g_frequency()
412 return 0; in vidioc_g_frequency()
420 dprintk(2, "VIDIOC_S_FREQUENCY: freq:0x%08x\n", f->frequency); in vidioc_s_frequency()
428 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0xffe0); /* fast mute */ in vidioc_s_frequency()
429 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0xffe0); in vidioc_s_frequency()
438 msp_writereg(av7110, MSP_WR_DSP, 0x0015, 0x003f); /* start stereo detection */ in vidioc_s_frequency()
439 msp_writereg(av7110, MSP_WR_DSP, 0x0015, 0x0000); in vidioc_s_frequency()
440 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); /* loudspeaker + headphone */ in vidioc_s_frequency()
441 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); /* SCART 1 volume */ in vidioc_s_frequency()
442 return 0; in vidioc_s_frequency()
456 if (i->index != 0) in vidioc_enum_input()
462 return 0; in vidioc_enum_input()
472 return 0; in vidioc_g_input()
483 return input ? -EINVAL : 0; in vidioc_s_input()
495 if (a->index != 0) in vidioc_enumaudio()
498 return 0; in vidioc_enumaudio()
507 if (a->index != 0) in vidioc_g_audio()
512 return 0; in vidioc_g_audio()
523 return a->index ? -EINVAL : 0; in vidioc_s_audio()
535 if (FW_VERSION(av7110->arm_app) >= 0x2623) { in vidioc_g_sliced_vbi_cap()
537 cap->service_lines[0][23] = V4L2_SLICED_WSS_625; in vidioc_g_sliced_vbi_cap()
539 return 0; in vidioc_g_sliced_vbi_cap()
549 if (FW_VERSION(av7110->arm_app) < 0x2623) in vidioc_g_fmt_sliced_vbi_out()
551 memset(&f->fmt.sliced, 0, sizeof f->fmt.sliced); in vidioc_g_fmt_sliced_vbi_out()
554 f->fmt.sliced.service_lines[0][23] = V4L2_SLICED_WSS_625; in vidioc_g_fmt_sliced_vbi_out()
557 return 0; in vidioc_g_fmt_sliced_vbi_out()
567 if (FW_VERSION(av7110->arm_app) < 0x2623) in vidioc_s_fmt_sliced_vbi_out()
570 f->fmt.sliced.service_lines[0][23] != V4L2_SLICED_WSS_625) { in vidioc_s_fmt_sliced_vbi_out()
571 memset(&f->fmt.sliced, 0, sizeof(f->fmt.sliced)); in vidioc_s_fmt_sliced_vbi_out()
573 av7110->wssMode = 0; in vidioc_s_fmt_sliced_vbi_out()
574 av7110->wssData = 0; in vidioc_s_fmt_sliced_vbi_out()
576 SetWSSConfig, 1, 0); in vidioc_s_fmt_sliced_vbi_out()
578 memset(&f->fmt.sliced, 0, sizeof(f->fmt.sliced)); in vidioc_s_fmt_sliced_vbi_out()
580 f->fmt.sliced.service_lines[0][23] = V4L2_SLICED_WSS_625; in vidioc_s_fmt_sliced_vbi_out()
584 av7110->wssData = 0; in vidioc_s_fmt_sliced_vbi_out()
586 return 0; in vidioc_s_fmt_sliced_vbi_out()
596 av7110->wssMode = 0; in av7110_vbi_reset()
597 av7110->wssData = 0; in av7110_vbi_reset()
598 if (FW_VERSION(av7110->arm_app) < 0x2623) in av7110_vbi_reset()
599 return 0; in av7110_vbi_reset()
601 return av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 1, 0); in av7110_vbi_reset()
613 if (FW_VERSION(av7110->arm_app) < 0x2623 || !av7110->wssMode || count != sizeof d) in av7110_vbi_write()
617 if ((d.id != 0 && d.id != V4L2_SLICED_WSS_625) || d.field != 0 || d.line != 23) in av7110_vbi_write()
620 av7110->wssData = ((d.data[1] << 8) & 0x3f00) | d.data[0]; in av7110_vbi_write()
622 av7110->wssData = 0x8000; in av7110_vbi_write()
624 return (rc < 0) ? rc : count; in av7110_vbi_write()
632 0x02, 0xd0,
633 0x03, 0x23,
634 0x04, 0x00,
635 0x05, 0x00,
636 0x06, 0xe9,
637 0x07, 0x0d,
638 0x08, 0x98,
639 0x09, 0x02,
640 0x0a, 0x80,
641 0x0b, 0x40,
642 0x0c, 0x40,
643 0x0d, 0x00,
644 0x0e, 0x01,
645 0x0f, 0x7c,
646 0x10, 0x48,
647 0x11, 0x0c,
648 0x12, 0x8b,
649 0x13, 0x1a,
650 0x14, 0x00,
651 0x15, 0x00,
652 0x16, 0x00,
653 0x17, 0x00,
654 0x18, 0x00,
655 0x19, 0x00,
656 0x1a, 0x00,
657 0x1b, 0x00,
658 0x1c, 0x00,
659 0x1d, 0x00,
660 0x1e, 0x00,
662 0x41, 0x77,
663 0x42, 0x77,
664 0x43, 0x77,
665 0x44, 0x77,
666 0x45, 0x77,
667 0x46, 0x77,
668 0x47, 0x77,
669 0x48, 0x77,
670 0x49, 0x77,
671 0x4a, 0x77,
672 0x4b, 0x77,
673 0x4c, 0x77,
674 0x4d, 0x77,
675 0x4e, 0x77,
676 0x4f, 0x77,
677 0x50, 0x77,
678 0x51, 0x77,
679 0x52, 0x77,
680 0x53, 0x77,
681 0x54, 0x77,
682 0x55, 0x77,
683 0x56, 0x77,
684 0x57, 0xff,
686 0xff
697 if (i2c_writereg(av7110, 0x80, 0x0, 0x80) == 1 && in av7110_init_analog_module()
698 i2c_writereg(av7110, 0x80, 0x0, 0) == 1) { in av7110_init_analog_module()
702 } else if (i2c_writereg(av7110, 0x84, 0x0, 0x80) == 1 && in av7110_init_analog_module()
703 i2c_writereg(av7110, 0x84, 0x0, 0) == 1) { in av7110_init_analog_module()
711 msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); in av7110_init_analog_module()
712 msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); in av7110_init_analog_module()
713 dprintk(1, "dvb-ttpci: @ card %d MSP34xx version 0x%04x 0x%04x\n", in av7110_init_analog_module()
715 msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00); in av7110_init_analog_module()
716 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone in av7110_init_analog_module()
717 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source in av7110_init_analog_module()
718 msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source in av7110_init_analog_module()
719 msp_writereg(av7110, MSP_WR_DSP, 0x0004, 0x7f00); // loudspeaker volume in av7110_init_analog_module()
720 msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source in av7110_init_analog_module()
721 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume in av7110_init_analog_module()
722 msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART in av7110_init_analog_module()
724 if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) { in av7110_init_analog_module()
729 …if ((av7110->dev->pci->subsystem_vendor == 0x110a) && (av7110->dev->pci->subsystem_device == 0x000… in av7110_init_analog_module()
732 …} else if ((av7110->dev->pci->subsystem_vendor == 0x13c2) && (av7110->dev->pci->subsystem_device =… in av7110_init_analog_module()
735 …} else if ((av7110->dev->pci->subsystem_vendor == 0x13c2) && (av7110->dev->pci->subsystem_device =… in av7110_init_analog_module()
742 if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) in av7110_init_analog_module()
750 while (*i != 0xff) { in av7110_init_analog_module()
751 if (i2c_writereg(av7110, 0x48, i[0], i[1]) != 1) { in av7110_init_analog_module()
758 msp_writereg(av7110, MSP_WR_DEM, 0x00bb, 0x02d0); // AD_CV in av7110_init_analog_module()
759 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 3); // FIR1 in av7110_init_analog_module()
760 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 18); // FIR1 in av7110_init_analog_module()
761 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 27); // FIR1 in av7110_init_analog_module()
762 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 48); // FIR1 in av7110_init_analog_module()
763 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 66); // FIR1 in av7110_init_analog_module()
764 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 72); // FIR1 in av7110_init_analog_module()
765 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 4); // FIR2 in av7110_init_analog_module()
766 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 64); // FIR2 in av7110_init_analog_module()
767 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 0); // FIR2 in av7110_init_analog_module()
768 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 3); // FIR2 in av7110_init_analog_module()
769 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 18); // FIR2 in av7110_init_analog_module()
770 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 27); // FIR2 in av7110_init_analog_module()
771 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 48); // FIR2 in av7110_init_analog_module()
772 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 66); // FIR2 in av7110_init_analog_module()
773 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 72); // FIR2 in av7110_init_analog_module()
774 msp_writereg(av7110, MSP_WR_DEM, 0x0083, 0xa000); // MODE_REG in av7110_init_analog_module()
775 msp_writereg(av7110, MSP_WR_DEM, 0x0093, 0x00aa); // DCO1_LO 5.74MHz in av7110_init_analog_module()
776 msp_writereg(av7110, MSP_WR_DEM, 0x009b, 0x04fc); // DCO1_HI in av7110_init_analog_module()
777 msp_writereg(av7110, MSP_WR_DEM, 0x00a3, 0x038e); // DCO2_LO 5.5MHz in av7110_init_analog_module()
778 msp_writereg(av7110, MSP_WR_DEM, 0x00ab, 0x04c6); // DCO2_HI in av7110_init_analog_module()
779 msp_writereg(av7110, MSP_WR_DEM, 0x0056, 0); // LOAD_REG 1/2 in av7110_init_analog_module()
784 saa7146_write(av7110->dev, DD1_STREAM_B, 0x00000000); in av7110_init_analog_module()
785 saa7146_write(av7110->dev, DD1_INIT, 0x03000700); in av7110_init_analog_module()
788 return 0; in av7110_init_analog_module()
831 if (FW_VERSION(av7110->arm_app) < 0x2623) in av7110_init_v4l()
839 if (FW_VERSION(av7110->arm_app) >= 0x2623) { in av7110_init_v4l()
843 return 0; in av7110_init_v4l()
855 return 0; in av7110_exit_v4l()
865 .v_offset = 0x15, .v_field = 288,
866 .h_offset = 0x48, .h_pixels = 708,
870 .v_offset = 0x10, .v_field = 244,
871 .h_offset = 0x40, .h_pixels = 708,
879 .v_offset = 0x1b, .v_field = 288,
880 .h_offset = 0x08, .h_pixels = 708,
884 .v_offset = 0x10, .v_field = 244,
885 .h_offset = 0x40, .h_pixels = 708,
893 .v_offset = 0x14, .v_field = 288,
894 .h_offset = 0x48, .h_pixels = 708,
898 .v_offset = 0x10, .v_field = 244,
899 .h_offset = 0x40, .h_pixels = 708,
919 return 0; in std_callback()
927 .flags = 0,
929 .stds = &standard[0],
944 .stds = &standard[0],