Lines Matching refs:cx

56 	struct cx18 *cx = id->cx;
57 struct cx18_stream *s = &cx->streams[id->type];
60 pixfmt->width = cx->cxhdl.width;
61 pixfmt->height = cx->cxhdl.height;
80 struct cx18 *cx = id->cx;
88 h = min(h, cx->is_50hz ? 576 : 480);
89 h = max(h, (cx->is_50hz ? 576 : 480) / 8);
125 struct cx18 *cx = id->cx;
129 struct cx18_stream *s = &cx->streams[id->type];
139 if (cx->cxhdl.width == w && cx->cxhdl.height == h &&
143 if (atomic_read(&cx->ana_capturing) > 0)
150 format.format.width = cx->cxhdl.width = w;
151 format.format.height = cx->cxhdl.height = h;
153 v4l2_subdev_call(cx->sd_av, pad, set_fmt, NULL, &format);
264 struct cx18 *cx = fh2id(fh)->cx;
271 vbifmt->start[0] = cx->vbi.start[0];
272 vbifmt->start[1] = cx->vbi.start[1];
273 vbifmt->count[0] = vbifmt->count[1] = cx->vbi.count;
283 struct cx18 *cx = fh2id(fh)->cx;
298 if (v4l2_subdev_call(cx->sd_av, vbi, g_sliced_fmt, &fmt->fmt.sliced))
314 struct cx18 *cx = fh2id(fh)->cx;
323 cx18_expand_service_set(vbifmt, cx->is_50hz);
325 if (check_service_set(vbifmt, cx->is_50hz))
334 struct cx18 *cx = id->cx;
341 if (!cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0)
349 ret = v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &fmt->fmt.vbi);
354 cx->vbi.sliced_in->service_set = 0;
355 cx->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE;
364 struct cx18 *cx = id->cx;
374 if (cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0)
382 ret = v4l2_subdev_call(cx->sd_av, vbi, s_sliced_fmt, &fmt->fmt.sliced);
386 cx->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
387 memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in));
395 struct cx18 *cx = fh2id(fh)->cx;
402 reg->val = cx18_read_enc(cx, reg->reg);
409 struct cx18 *cx = fh2id(fh)->cx;
415 cx18_write_enc(cx, reg->val, reg->reg);
424 struct cx18 *cx = id->cx;
427 strscpy(vcap->card, cx->card_name, sizeof(vcap->card));
428 vcap->capabilities = cx->v4l2_cap | V4L2_CAP_DEVICE_CAPS;
434 struct cx18 *cx = fh2id(fh)->cx;
436 return cx18_get_audio_input(cx, vin->index, vin);
441 struct cx18 *cx = fh2id(fh)->cx;
443 vin->index = cx->audio_input;
444 return cx18_get_audio_input(cx, vin->index, vin);
449 struct cx18 *cx = fh2id(fh)->cx;
451 if (vout->index >= cx->nof_audio_inputs)
453 cx->audio_input = vout->index;
454 cx18_audio_set_io(cx);
460 struct cx18 *cx = fh2id(fh)->cx;
463 return cx18_get_input(cx, vin->index, vin);
469 struct cx18 *cx = fh2id(fh)->cx;
474 f->numerator = cx->is_50hz ? 54 : 11;
475 f->denominator = cx->is_50hz ? 59 : 10;
482 struct cx18 *cx = fh2id(fh)->cx;
491 sel->r.height = cx->is_50hz ? 576 : 480;
518 struct cx18 *cx = fh2id(fh)->cx;
520 *i = cx->active_input;
527 struct cx18 *cx = id->cx;
530 cx->card->video_inputs + inp;
532 if (inp >= cx->nof_inputs)
535 if (inp == cx->active_input) {
541 cx->active_input, inp);
543 cx->active_input = inp;
545 cx->audio_input = cx->card->video_inputs[inp].audio_index;
547 std = cx->tuner_std;
548 cx->streams[CX18_ENC_STREAM_TYPE_MPG].video_dev.tvnorms = std;
549 cx->streams[CX18_ENC_STREAM_TYPE_YUV].video_dev.tvnorms = std;
550 cx->streams[CX18_ENC_STREAM_TYPE_VBI].video_dev.tvnorms = std;
554 cx18_mute(cx);
555 cx18_video_set_io(cx);
556 cx18_audio_set_io(cx);
557 cx18_unmute(cx);
564 struct cx18 *cx = fh2id(fh)->cx;
569 cx18_call_all(cx, tuner, g_frequency, vf);
576 struct cx18 *cx = id->cx;
581 cx18_mute(cx);
583 cx18_call_all(cx, tuner, s_frequency, vf);
584 cx18_unmute(cx);
590 struct cx18 *cx = fh2id(fh)->cx;
592 *std = cx->std;
599 struct cx18 *cx = id->cx;
604 if (std == cx->std)
607 if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ||
608 atomic_read(&cx->ana_capturing) > 0) {
615 cx->std = std;
616 cx->is_60hz = (std & V4L2_STD_525_60) ? 1 : 0;
617 cx->is_50hz = !cx->is_60hz;
618 cx2341x_handler_set_50hz(&cx->cxhdl, cx->is_50hz);
619 cx->cxhdl.width = 720;
620 cx->cxhdl.height = cx->is_50hz ? 576 : 480;
625 if (cx->streams[CX18_ENC_STREAM_TYPE_YUV].pixelformat == V4L2_PIX_FMT_NV12_16L16) {
626 cx->streams[CX18_ENC_STREAM_TYPE_YUV].vb_bytes_per_frame =
627 cx->cxhdl.height * 720 * 3 / 2;
628 cx->streams[CX18_ENC_STREAM_TYPE_YUV].vb_bytes_per_line = 720;
630 cx->streams[CX18_ENC_STREAM_TYPE_YUV].vb_bytes_per_frame =
631 cx->cxhdl.height * 720 * 2;
632 cx->streams[CX18_ENC_STREAM_TYPE_YUV].vb_bytes_per_line = 1440;
634 cx->vbi.count = cx->is_50hz ? 18 : 12;
635 cx->vbi.start[0] = cx->is_50hz ? 6 : 10;
636 cx->vbi.start[1] = cx->is_50hz ? 318 : 273;
638 (unsigned long long) cx->std);
641 cx18_call_all(cx, video, s_std, cx->std);
648 struct cx18 *cx = id->cx;
653 cx18_call_all(cx, tuner, s_tuner, vt);
659 struct cx18 *cx = fh2id(fh)->cx;
664 cx18_call_all(cx, tuner, g_tuner, vt);
676 struct cx18 *cx = fh2id(fh)->cx;
677 int set = cx->is_50hz ? V4L2_SLICED_VBI_625 : V4L2_SLICED_VBI_525;
686 if (valid_service_line(f, l, cx->is_50hz)) {
797 struct cx18 *cx = fh2id(fh)->cx;
798 struct cx18_stream *s = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
845 struct cx18 *cx = id->cx;
857 cx18_stop_capture(&cx->streams[id->type],
864 if (!atomic_read(&cx->ana_capturing))
866 if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
868 h = cx18_find_handle(cx);
873 cx18_mute(cx);
874 cx18_vapi(cx, CX18_CPU_CAPTURE_PAUSE, 1, h);
880 if (!atomic_read(&cx->ana_capturing))
882 if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
884 h = cx18_find_handle(cx);
889 cx18_vapi(cx, CX18_CPU_CAPTURE_RESUME, 1, h);
890 cx18_unmute(cx);
903 struct cx18 *cx = fh2id(fh)->cx;
935 struct cx18 *cx = fh2id(fh)->cx;
940 CX18_INFO("Version: %s Card: %s\n", CX18_VERSION, cx->card_name);
941 if (cx->hw_flags & CX18_HW_TVEEPROM) {
944 cx18_read_eeprom(cx, &tv);
946 cx18_call_all(cx, core, log_status);
947 cx18_get_input(cx, cx->active_input, &vidin);
948 cx18_get_audio_input(cx, cx->audio_input, &audin);
951 mutex_lock(&cx->gpio_lock);
953 cx->gpio_dir, cx->gpio_val);
954 mutex_unlock(&cx->gpio_lock);
956 test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ? "Radio" : "TV");
957 v4l2_ctrl_handler_log_status(&cx->cxhdl.hdl, cx->v4l2_dev.name);
958 CX18_INFO("Status flags: 0x%08lx\n", cx->i_flags);
960 struct cx18_stream *s = &cx->streams[i];
971 (long long)cx->mpg_data_received,
972 (long long)cx->vbi_data_inserted);
979 struct cx18 *cx = fh2id(fh)->cx;
986 cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, core, reset,