Lines Matching refs:cx

138 	struct cx18 *cx = id->cx;
139 struct cx18_stream *s = &cx->streams[id->type];
142 pixfmt->width = cx->cxhdl.width;
143 pixfmt->height = cx->cxhdl.height;
161 struct cx18 *cx = fh2id(fh)->cx;
168 vbifmt->start[0] = cx->vbi.start[0];
169 vbifmt->start[1] = cx->vbi.start[1];
170 vbifmt->count[0] = vbifmt->count[1] = cx->vbi.count;
180 struct cx18 *cx = fh2id(fh)->cx;
195 if (v4l2_subdev_call(cx->sd_av, vbi, g_sliced_fmt, &fmt->fmt.sliced))
206 struct cx18 *cx = id->cx;
218 h = min(h, cx->is_50hz ? 576 : 480);
235 struct cx18 *cx = fh2id(fh)->cx;
244 cx18_expand_service_set(vbifmt, cx->is_50hz);
246 if (check_service_set(vbifmt, cx->is_50hz))
255 struct cx18 *cx = id->cx;
259 struct cx18_stream *s = &cx->streams[id->type];
269 if (cx->cxhdl.width == w && cx->cxhdl.height == h &&
273 if (atomic_read(&cx->ana_capturing) > 0)
287 format.format.width = cx->cxhdl.width = w;
288 format.format.height = cx->cxhdl.height = h;
290 v4l2_subdev_call(cx->sd_av, pad, set_fmt, NULL, &format);
298 struct cx18 *cx = id->cx;
305 if (!cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0)
313 ret = v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &fmt->fmt.vbi);
318 cx->vbi.sliced_in->service_set = 0;
319 cx->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE;
328 struct cx18 *cx = id->cx;
338 if (cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0)
346 ret = v4l2_subdev_call(cx->sd_av, vbi, s_sliced_fmt, &fmt->fmt.sliced);
350 cx->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
351 memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in));
359 struct cx18 *cx = fh2id(fh)->cx;
366 reg->val = cx18_read_enc(cx, reg->reg);
373 struct cx18 *cx = fh2id(fh)->cx;
379 cx18_write_enc(cx, reg->val, reg->reg);
388 struct cx18 *cx = id->cx;
391 strscpy(vcap->card, cx->card_name, sizeof(vcap->card));
393 "PCI:%s", pci_name(cx->pci_dev));
394 vcap->capabilities = cx->v4l2_cap | V4L2_CAP_DEVICE_CAPS;
400 struct cx18 *cx = fh2id(fh)->cx;
402 return cx18_get_audio_input(cx, vin->index, vin);
407 struct cx18 *cx = fh2id(fh)->cx;
409 vin->index = cx->audio_input;
410 return cx18_get_audio_input(cx, vin->index, vin);
415 struct cx18 *cx = fh2id(fh)->cx;
417 if (vout->index >= cx->nof_audio_inputs)
419 cx->audio_input = vout->index;
420 cx18_audio_set_io(cx);
426 struct cx18 *cx = fh2id(fh)->cx;
429 return cx18_get_input(cx, vin->index, vin);
435 struct cx18 *cx = fh2id(fh)->cx;
440 f->numerator = cx->is_50hz ? 54 : 11;
441 f->denominator = cx->is_50hz ? 59 : 10;
448 struct cx18 *cx = fh2id(fh)->cx;
457 sel->r.height = cx->is_50hz ? 576 : 480;
498 struct cx18 *cx = fh2id(fh)->cx;
500 *i = cx->active_input;
507 struct cx18 *cx = id->cx;
510 cx->card->video_inputs + inp;
512 if (inp >= cx->nof_inputs)
515 if (inp == cx->active_input) {
521 cx->active_input, inp);
523 cx->active_input = inp;
525 cx->audio_input = cx->card->video_inputs[inp].audio_index;
527 std = cx->tuner_std;
528 cx->streams[CX18_ENC_STREAM_TYPE_MPG].video_dev.tvnorms = std;
529 cx->streams[CX18_ENC_STREAM_TYPE_YUV].video_dev.tvnorms = std;
530 cx->streams[CX18_ENC_STREAM_TYPE_VBI].video_dev.tvnorms = std;
534 cx18_mute(cx);
535 cx18_video_set_io(cx);
536 cx18_audio_set_io(cx);
537 cx18_unmute(cx);
544 struct cx18 *cx = fh2id(fh)->cx;
549 cx18_call_all(cx, tuner, g_frequency, vf);
556 struct cx18 *cx = id->cx;
561 cx18_mute(cx);
563 cx18_call_all(cx, tuner, s_frequency, vf);
564 cx18_unmute(cx);
570 struct cx18 *cx = fh2id(fh)->cx;
572 *std = cx->std;
579 struct cx18 *cx = id->cx;
584 if (std == cx->std)
587 if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ||
588 atomic_read(&cx->ana_capturing) > 0) {
595 cx->std = std;
596 cx->is_60hz = (std & V4L2_STD_525_60) ? 1 : 0;
597 cx->is_50hz = !cx->is_60hz;
598 cx2341x_handler_set_50hz(&cx->cxhdl, cx->is_50hz);
599 cx->cxhdl.width = 720;
600 cx->cxhdl.height = cx->is_50hz ? 576 : 480;
601 cx->vbi.count = cx->is_50hz ? 18 : 12;
602 cx->vbi.start[0] = cx->is_50hz ? 6 : 10;
603 cx->vbi.start[1] = cx->is_50hz ? 318 : 273;
605 (unsigned long long) cx->std);
608 cx18_call_all(cx, video, s_std, cx->std);
615 struct cx18 *cx = id->cx;
620 cx18_call_all(cx, tuner, s_tuner, vt);
626 struct cx18 *cx = fh2id(fh)->cx;
631 cx18_call_all(cx, tuner, g_tuner, vt);
643 struct cx18 *cx = fh2id(fh)->cx;
644 int set = cx->is_50hz ? V4L2_SLICED_VBI_625 : V4L2_SLICED_VBI_525;
653 if (valid_service_line(f, l, cx->is_50hz)) {
764 struct cx18 *cx = fh2id(fh)->cx;
765 struct cx18_stream *s = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
811 struct cx18 *cx = id->cx;
812 struct cx18_stream *s = &cx->streams[id->type];
830 struct cx18 *cx = id->cx;
831 struct cx18_stream *s = &cx->streams[id->type];
851 struct cx18 *cx = id->cx;
852 struct cx18_stream *s = &cx->streams[id->type];
869 struct cx18 *cx = id->cx;
870 struct cx18_stream *s = &cx->streams[id->type];
883 struct cx18 *cx = id->cx;
884 struct cx18_stream *s = &cx->streams[id->type];
896 struct cx18 *cx = id->cx;
897 struct cx18_stream *s = &cx->streams[id->type];
909 struct cx18 *cx = id->cx;
910 struct cx18_stream *s = &cx->streams[id->type];
923 struct cx18 *cx = id->cx;
942 if (!atomic_read(&cx->ana_capturing))
944 if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
946 h = cx18_find_handle(cx);
951 cx18_mute(cx);
952 cx18_vapi(cx, CX18_CPU_CAPTURE_PAUSE, 1, h);
958 if (!atomic_read(&cx->ana_capturing))
960 if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
962 h = cx18_find_handle(cx);
967 cx18_vapi(cx, CX18_CPU_CAPTURE_RESUME, 1, h);
968 cx18_unmute(cx);
981 struct cx18 *cx = fh2id(fh)->cx;
1013 struct cx18 *cx = fh2id(fh)->cx;
1018 CX18_INFO("Version: %s Card: %s\n", CX18_VERSION, cx->card_name);
1019 if (cx->hw_flags & CX18_HW_TVEEPROM) {
1022 cx18_read_eeprom(cx, &tv);
1024 cx18_call_all(cx, core, log_status);
1025 cx18_get_input(cx, cx->active_input, &vidin);
1026 cx18_get_audio_input(cx, cx->audio_input, &audin);
1029 mutex_lock(&cx->gpio_lock);
1031 cx->gpio_dir, cx->gpio_val);
1032 mutex_unlock(&cx->gpio_lock);
1034 test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ? "Radio" : "TV");
1035 v4l2_ctrl_handler_log_status(&cx->cxhdl.hdl, cx->v4l2_dev.name);
1036 CX18_INFO("Status flags: 0x%08lx\n", cx->i_flags);
1038 struct cx18_stream *s = &cx->streams[i];
1049 (long long)cx->mpg_data_received,
1050 (long long)cx->vbi_data_inserted);
1057 struct cx18 *cx = fh2id(fh)->cx;
1064 cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, core, reset,