• Home
  • Raw
  • Download

Lines Matching refs:itv

114 void ivtv_set_osd_alpha(struct ivtv *itv)  in ivtv_set_osd_alpha()  argument
116 ivtv_vapi(itv, CX2341X_OSD_SET_GLOBAL_ALPHA, 3, in ivtv_set_osd_alpha()
117 itv->osd_global_alpha_state, itv->osd_global_alpha, !itv->osd_local_alpha_state); in ivtv_set_osd_alpha()
118 ivtv_vapi(itv, CX2341X_OSD_SET_CHROMA_KEY, 2, itv->osd_chroma_key_state, itv->osd_chroma_key); in ivtv_set_osd_alpha()
121 int ivtv_set_speed(struct ivtv *itv, int speed) in ivtv_set_speed() argument
130 if (speed == itv->speed && !single_step) in ivtv_set_speed()
133 if (single_step && (speed < 0) == (itv->speed < 0)) { in ivtv_set_speed()
135 ivtv_vapi(itv, CX2341X_DEC_STEP_VIDEO, 1, 0); in ivtv_set_speed()
136 itv->speed = speed; in ivtv_set_speed()
147 data[3] = v4l2_ctrl_g_ctrl(itv->cxhdl.video_b_frames); in ivtv_set_speed()
148 data[4] = (speed == 1500 || speed == 500) ? itv->speed_mute_audio : 0; in ivtv_set_speed()
158 if (atomic_read(&itv->decoding) > 0) { in ivtv_set_speed()
162 ivtv_vapi(itv, CX2341X_DEC_PAUSE_PLAYBACK, 1, 0); in ivtv_set_speed()
165 mutex_unlock(&itv->serialize_lock); in ivtv_set_speed()
166 prepare_to_wait(&itv->dma_waitq, &wait, TASK_INTERRUPTIBLE); in ivtv_set_speed()
167 while (test_bit(IVTV_F_I_DMA, &itv->i_flags)) { in ivtv_set_speed()
174 finish_wait(&itv->dma_waitq, &wait); in ivtv_set_speed()
175 mutex_lock(&itv->serialize_lock); in ivtv_set_speed()
180 ivtv_api(itv, CX2341X_DEC_SET_PLAYBACK_SPEED, 7, data); in ivtv_set_speed()
186 ivtv_vapi(itv, CX2341X_DEC_STEP_VIDEO, 1, 0); in ivtv_set_speed()
188 itv->speed = speed; in ivtv_set_speed()
231 static int ivtv_video_command(struct ivtv *itv, struct ivtv_open_id *id, in ivtv_video_command() argument
234 struct ivtv_stream *s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG]; in ivtv_video_command()
236 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_video_command()
242 dc->start.speed = ivtv_validate_speed(itv->speed, dc->start.speed); in ivtv_video_command()
252 itv->speed_mute_audio = dc->flags & V4L2_DEC_CMD_START_MUTE_AUDIO; in ivtv_video_command()
253 if (ivtv_set_output_mode(itv, OUT_MPG) != OUT_MPG) in ivtv_video_command()
255 if (test_and_clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags)) { in ivtv_video_command()
257 itv->speed = 0; in ivtv_video_command()
267 if (atomic_read(&itv->decoding) == 0) in ivtv_video_command()
269 if (itv->output_mode != OUT_MPG) in ivtv_video_command()
272 itv->output_mode = OUT_NONE; in ivtv_video_command()
278 if (!atomic_read(&itv->decoding)) in ivtv_video_command()
280 if (itv->output_mode != OUT_MPG) in ivtv_video_command()
282 if (atomic_read(&itv->decoding) > 0) { in ivtv_video_command()
283 ivtv_vapi(itv, CX2341X_DEC_PAUSE_PLAYBACK, 1, in ivtv_video_command()
285 set_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags); in ivtv_video_command()
292 if (!atomic_read(&itv->decoding)) in ivtv_video_command()
294 if (itv->output_mode != OUT_MPG) in ivtv_video_command()
296 if (test_and_clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags)) { in ivtv_video_command()
297 int speed = itv->speed; in ivtv_video_command()
298 itv->speed = 0; in ivtv_video_command()
311 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_fmt_sliced_vbi_out() local
316 if (!(itv->v4l2_cap & V4L2_CAP_SLICED_VBI_OUTPUT)) in ivtv_g_fmt_sliced_vbi_out()
320 if (itv->is_60hz) { in ivtv_g_fmt_sliced_vbi_out()
334 struct ivtv *itv = id->itv; in ivtv_g_fmt_vid_cap() local
337 pixfmt->width = itv->cxhdl.width; in ivtv_g_fmt_vid_cap()
338 pixfmt->height = itv->cxhdl.height; in ivtv_g_fmt_vid_cap()
356 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_fmt_vbi_cap() local
361 vbifmt->samples_per_line = itv->vbi.raw_decoder_line_size - 4; in ivtv_g_fmt_vbi_cap()
363 vbifmt->start[0] = itv->vbi.start[0]; in ivtv_g_fmt_vbi_cap()
364 vbifmt->start[1] = itv->vbi.start[1]; in ivtv_g_fmt_vbi_cap()
365 vbifmt->count[0] = vbifmt->count[1] = itv->vbi.count; in ivtv_g_fmt_vbi_cap()
376 struct ivtv *itv = id->itv; in ivtv_g_fmt_sliced_vbi_cap() local
383 vbifmt->service_set = itv->is_50hz ? V4L2_SLICED_VBI_625 : in ivtv_g_fmt_sliced_vbi_cap()
385 ivtv_expand_service_set(vbifmt, itv->is_50hz); in ivtv_g_fmt_sliced_vbi_cap()
390 v4l2_subdev_call(itv->sd_video, vbi, g_sliced_fmt, vbifmt); in ivtv_g_fmt_sliced_vbi_cap()
398 struct ivtv *itv = id->itv; in ivtv_g_fmt_vid_out() local
401 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_g_fmt_vid_out()
403 pixfmt->width = itv->main_rect.width; in ivtv_g_fmt_vid_out()
404 pixfmt->height = itv->main_rect.height; in ivtv_g_fmt_vid_out()
408 switch (itv->yuv_info.lace_mode & IVTV_YUV_MODE_MASK) { in ivtv_g_fmt_vid_out()
410 pixfmt->field = (itv->yuv_info.lace_mode & IVTV_YUV_SYNC_MASK) ? in ivtv_g_fmt_vid_out()
422 pixfmt->width = itv->yuv_info.v4l2_src_w; in ivtv_g_fmt_vid_out()
423 pixfmt->height = itv->yuv_info.v4l2_src_h; in ivtv_g_fmt_vid_out()
437 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_fmt_vid_out_overlay() local
438 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_g_fmt_vid_out_overlay()
443 if (!itv->osd_video_pbase) in ivtv_g_fmt_vid_out_overlay()
445 winfmt->chromakey = itv->osd_chroma_key; in ivtv_g_fmt_vid_out_overlay()
446 winfmt->global_alpha = itv->osd_global_alpha; in ivtv_g_fmt_vid_out_overlay()
452 winfmt->w.width = itv->osd_rect.width; in ivtv_g_fmt_vid_out_overlay()
453 winfmt->w.height = itv->osd_rect.height; in ivtv_g_fmt_vid_out_overlay()
465 struct ivtv *itv = id->itv; in ivtv_try_fmt_vid_cap() local
477 h = min(h, itv->is_50hz ? 576 : 480); in ivtv_try_fmt_vid_cap()
494 struct ivtv *itv = id->itv; in ivtv_try_fmt_sliced_vbi_cap() local
505 ivtv_expand_service_set(vbifmt, itv->is_50hz); in ivtv_try_fmt_sliced_vbi_cap()
506 check_service_set(vbifmt, itv->is_50hz); in ivtv_try_fmt_sliced_vbi_cap()
547 struct ivtv *itv = fh2id(fh)->itv; in ivtv_try_fmt_vid_out_overlay() local
548 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_try_fmt_vid_out_overlay()
554 if (!itv->osd_video_pbase) in ivtv_try_fmt_vid_out_overlay()
570 struct ivtv *itv = id->itv; in ivtv_s_fmt_vid_cap() local
581 if (itv->cxhdl.width == w && itv->cxhdl.height == h) in ivtv_s_fmt_vid_cap()
584 if (atomic_read(&itv->capturing) > 0) in ivtv_s_fmt_vid_cap()
587 itv->cxhdl.width = w; in ivtv_s_fmt_vid_cap()
588 itv->cxhdl.height = h; in ivtv_s_fmt_vid_cap()
589 if (v4l2_ctrl_g_ctrl(itv->cxhdl.video_encoding) == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) in ivtv_s_fmt_vid_cap()
594 v4l2_subdev_call(itv->sd_video, pad, set_fmt, NULL, &format); in ivtv_s_fmt_vid_cap()
600 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_fmt_vbi_cap() local
602 if (!ivtv_raw_vbi(itv) && atomic_read(&itv->capturing) > 0) in ivtv_s_fmt_vbi_cap()
604 itv->vbi.sliced_in->service_set = 0; in ivtv_s_fmt_vbi_cap()
605 itv->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE; in ivtv_s_fmt_vbi_cap()
606 v4l2_subdev_call(itv->sd_video, vbi, s_raw_fmt, &fmt->fmt.vbi); in ivtv_s_fmt_vbi_cap()
614 struct ivtv *itv = id->itv; in ivtv_s_fmt_sliced_vbi_cap() local
620 check_service_set(vbifmt, itv->is_50hz); in ivtv_s_fmt_sliced_vbi_cap()
621 if (ivtv_raw_vbi(itv) && atomic_read(&itv->capturing) > 0) in ivtv_s_fmt_sliced_vbi_cap()
623 itv->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; in ivtv_s_fmt_sliced_vbi_cap()
624 v4l2_subdev_call(itv->sd_video, vbi, s_sliced_fmt, vbifmt); in ivtv_s_fmt_sliced_vbi_cap()
625 memcpy(itv->vbi.sliced_in, vbifmt, sizeof(*itv->vbi.sliced_in)); in ivtv_s_fmt_sliced_vbi_cap()
632 struct ivtv *itv = id->itv; in ivtv_s_fmt_vid_out() local
633 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_s_fmt_vid_out()
667 if (test_bit(IVTV_F_I_DEC_YUV, &itv->i_flags)) in ivtv_s_fmt_vid_out()
668 itv->dma_data_req_size = in ivtv_s_fmt_vid_out()
676 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_fmt_vid_out_overlay() local
680 itv->osd_chroma_key = fmt->fmt.win.chromakey; in ivtv_s_fmt_vid_out_overlay()
681 itv->osd_global_alpha = fmt->fmt.win.global_alpha; in ivtv_s_fmt_vid_out_overlay()
682 ivtv_set_osd_alpha(itv); in ivtv_s_fmt_vid_out_overlay()
688 static int ivtv_itvc(struct ivtv *itv, bool get, u64 reg, u64 *val) in ivtv_itvc() argument
695 reg_start = itv->reg_mem - IVTV_REG_OFFSET; in ivtv_itvc()
696 else if (itv->has_cx23415 && reg >= IVTV_DECODER_OFFSET && in ivtv_itvc()
698 reg_start = itv->dec_mem - IVTV_DECODER_OFFSET; in ivtv_itvc()
700 reg_start = itv->enc_mem; in ivtv_itvc()
713 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_register() local
716 return ivtv_itvc(itv, true, reg->reg, &reg->val); in ivtv_g_register()
721 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_register() local
724 return ivtv_itvc(itv, false, reg->reg, &val); in ivtv_s_register()
731 struct ivtv *itv = id->itv; in ivtv_querycap() local
734 strscpy(vcap->card, itv->card_name, sizeof(vcap->card)); in ivtv_querycap()
735 vcap->capabilities = itv->v4l2_cap | V4L2_CAP_DEVICE_CAPS; in ivtv_querycap()
741 struct ivtv *itv = fh2id(fh)->itv; in ivtv_enumaudio() local
743 return ivtv_get_audio_input(itv, vin->index, vin); in ivtv_enumaudio()
748 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_audio() local
750 vin->index = itv->audio_input; in ivtv_g_audio()
751 return ivtv_get_audio_input(itv, vin->index, vin); in ivtv_g_audio()
756 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_audio() local
758 if (vout->index >= itv->nof_audio_inputs) in ivtv_s_audio()
761 itv->audio_input = vout->index; in ivtv_s_audio()
762 ivtv_audio_set_io(itv); in ivtv_s_audio()
769 struct ivtv *itv = fh2id(fh)->itv; in ivtv_enumaudout() local
772 return ivtv_get_audio_output(itv, vin->index, vin); in ivtv_enumaudout()
777 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_audout() local
780 return ivtv_get_audio_output(itv, vin->index, vin); in ivtv_g_audout()
785 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_audout() local
787 if (itv->card->video_outputs == NULL || vout->index != 0) in ivtv_s_audout()
794 struct ivtv *itv = fh2id(fh)->itv; in ivtv_enum_input() local
797 return ivtv_get_input(itv, vin->index, vin); in ivtv_enum_input()
802 struct ivtv *itv = fh2id(fh)->itv; in ivtv_enum_output() local
804 return ivtv_get_output(itv, vout->index, vout); in ivtv_enum_output()
811 struct ivtv *itv = id->itv; in ivtv_g_pixelaspect() local
814 f->numerator = itv->is_50hz ? 54 : 11; in ivtv_g_pixelaspect()
815 f->denominator = itv->is_50hz ? 59 : 10; in ivtv_g_pixelaspect()
817 f->numerator = itv->is_out_50hz ? 54 : 11; in ivtv_g_pixelaspect()
818 f->denominator = itv->is_out_50hz ? 59 : 10; in ivtv_g_pixelaspect()
829 struct ivtv *itv = id->itv; in ivtv_s_selection() local
830 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_s_selection()
835 !(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_s_selection()
843 !(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_s_selection()
846 r.height = itv->is_out_50hz ? 576 : 480; in ivtv_s_selection()
860 if (!ivtv_vapi(itv, CX2341X_OSD_SET_FRAMEBUFFER_WINDOW, 4, in ivtv_s_selection()
862 itv->main_rect = sel->r; in ivtv_s_selection()
872 struct ivtv *itv = id->itv; in ivtv_g_selection() local
873 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_g_selection()
883 sel->r.height = itv->is_50hz ? 576 : 480; in ivtv_g_selection()
891 !(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_g_selection()
899 sel->r = itv->main_rect; in ivtv_g_selection()
903 r.height = itv->is_out_50hz ? 576 : 480; in ivtv_g_selection()
927 struct ivtv *itv = fh2id(fh)->itv; in ivtv_enum_fmt_vid_cap() local
928 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_enum_fmt_vid_cap()
954 struct ivtv *itv = fh2id(fh)->itv; in ivtv_enum_fmt_vid_out() local
955 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_enum_fmt_vid_out()
970 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_input() local
972 *i = itv->active_input; in ivtv_g_input()
979 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_input() local
983 if (inp >= itv->nof_inputs) in ivtv_s_input()
986 if (inp == itv->active_input) { in ivtv_s_input()
991 if (atomic_read(&itv->capturing) > 0) { in ivtv_s_input()
996 itv->active_input, inp); in ivtv_s_input()
998 itv->active_input = inp; in ivtv_s_input()
1001 itv->audio_input = itv->card->video_inputs[inp].audio_index; in ivtv_s_input()
1003 if (itv->card->video_inputs[inp].video_type == IVTV_CARD_INPUT_VID_TUNER) in ivtv_s_input()
1004 std = itv->tuner_std; in ivtv_s_input()
1008 itv->streams[i].vdev.tvnorms = std; in ivtv_s_input()
1012 ivtv_mute(itv); in ivtv_s_input()
1013 ivtv_video_set_io(itv); in ivtv_s_input()
1014 ivtv_audio_set_io(itv); in ivtv_s_input()
1015 ivtv_unmute(itv); in ivtv_s_input()
1022 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_output() local
1024 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_g_output()
1027 *i = itv->active_output; in ivtv_g_output()
1034 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_output() local
1036 if (outp >= itv->card->nof_outputs) in ivtv_s_output()
1039 if (outp == itv->active_output) { in ivtv_s_output()
1044 itv->active_output, outp); in ivtv_s_output()
1046 itv->active_output = outp; in ivtv_s_output()
1047 ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_routing, in ivtv_s_output()
1049 itv->card->video_outputs[outp].video_output, 0); in ivtv_s_output()
1056 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_frequency() local
1057 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_g_frequency()
1064 ivtv_call_all(itv, tuner, g_frequency, vf); in ivtv_g_frequency()
1070 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_frequency() local
1071 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_s_frequency()
1078 ivtv_mute(itv); in ivtv_s_frequency()
1080 ivtv_call_all(itv, tuner, s_frequency, vf); in ivtv_s_frequency()
1081 ivtv_unmute(itv); in ivtv_s_frequency()
1087 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_std() local
1089 *std = itv->std; in ivtv_g_std()
1093 void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id std) in ivtv_s_std_enc() argument
1095 itv->std = std; in ivtv_s_std_enc()
1096 itv->is_60hz = (std & V4L2_STD_525_60) ? 1 : 0; in ivtv_s_std_enc()
1097 itv->is_50hz = !itv->is_60hz; in ivtv_s_std_enc()
1098 cx2341x_handler_set_50hz(&itv->cxhdl, itv->is_50hz); in ivtv_s_std_enc()
1099 itv->cxhdl.width = 720; in ivtv_s_std_enc()
1100 itv->cxhdl.height = itv->is_50hz ? 576 : 480; in ivtv_s_std_enc()
1101 itv->vbi.count = itv->is_50hz ? 18 : 12; in ivtv_s_std_enc()
1102 itv->vbi.start[0] = itv->is_50hz ? 6 : 10; in ivtv_s_std_enc()
1103 itv->vbi.start[1] = itv->is_50hz ? 318 : 273; in ivtv_s_std_enc()
1105 if (itv->hw_flags & IVTV_HW_CX25840) in ivtv_s_std_enc()
1106 itv->vbi.sliced_decoder_line_size = itv->is_60hz ? 272 : 284; in ivtv_s_std_enc()
1109 ivtv_call_all(itv, video, s_std, itv->std); in ivtv_s_std_enc()
1112 void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id std) in ivtv_s_std_dec() argument
1114 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_s_std_dec()
1119 itv->std_out = std; in ivtv_s_std_dec()
1120 itv->is_out_60hz = (std & V4L2_STD_525_60) ? 1 : 0; in ivtv_s_std_dec()
1121 itv->is_out_50hz = !itv->is_out_60hz; in ivtv_s_std_dec()
1122 ivtv_call_all(itv, video, s_std_output, itv->std_out); in ivtv_s_std_dec()
1130 mutex_unlock(&itv->serialize_lock); in ivtv_s_std_dec()
1132 prepare_to_wait(&itv->vsync_waitq, &wait, in ivtv_s_std_dec()
1138 finish_wait(&itv->vsync_waitq, &wait); in ivtv_s_std_dec()
1139 mutex_lock(&itv->serialize_lock); in ivtv_s_std_dec()
1144 ivtv_vapi(itv, CX2341X_DEC_SET_STANDARD, 1, itv->is_out_50hz); in ivtv_s_std_dec()
1145 itv->main_rect.left = 0; in ivtv_s_std_dec()
1146 itv->main_rect.top = 0; in ivtv_s_std_dec()
1147 itv->main_rect.width = 720; in ivtv_s_std_dec()
1148 itv->main_rect.height = itv->is_out_50hz ? 576 : 480; in ivtv_s_std_dec()
1149 ivtv_vapi(itv, CX2341X_OSD_SET_FRAMEBUFFER_WINDOW, 4, in ivtv_s_std_dec()
1150 720, itv->main_rect.height, 0, 0); in ivtv_s_std_dec()
1151 yi->main_rect = itv->main_rect; in ivtv_s_std_dec()
1152 if (!itv->osd_info) { in ivtv_s_std_dec()
1154 yi->osd_full_h = itv->is_out_50hz ? 576 : 480; in ivtv_s_std_dec()
1160 struct ivtv *itv = fh2id(fh)->itv; in ivtv_s_std() local
1165 if (std == itv->std) in ivtv_s_std()
1168 if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) || in ivtv_s_std()
1169 atomic_read(&itv->capturing) > 0 || in ivtv_s_std()
1170 atomic_read(&itv->decoding) > 0) { in ivtv_s_std()
1177 (unsigned long long)itv->std); in ivtv_s_std()
1179 ivtv_s_std_enc(itv, std); in ivtv_s_std()
1180 if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) in ivtv_s_std()
1181 ivtv_s_std_dec(itv, std); in ivtv_s_std()
1189 struct ivtv *itv = id->itv; in ivtv_s_tuner() local
1194 ivtv_call_all(itv, tuner, s_tuner, vt); in ivtv_s_tuner()
1201 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_tuner() local
1206 ivtv_call_all(itv, tuner, g_tuner, vt); in ivtv_g_tuner()
1217 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_sliced_vbi_cap() local
1218 int set = itv->is_50hz ? V4L2_SLICED_VBI_625 : V4L2_SLICED_VBI_525; in ivtv_g_sliced_vbi_cap()
1224 if (valid_service_line(f, l, itv->is_50hz)) in ivtv_g_sliced_vbi_cap()
1229 if (!(itv->v4l2_cap & V4L2_CAP_SLICED_VBI_OUTPUT)) in ivtv_g_sliced_vbi_cap()
1231 if (itv->is_60hz) { in ivtv_g_sliced_vbi_cap()
1252 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_enc_index() local
1257 entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % in ivtv_g_enc_index()
1263 if (!atomic_read(&itv->capturing)) in ivtv_g_enc_index()
1266 *e = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; in ivtv_g_enc_index()
1272 itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX; in ivtv_g_enc_index()
1279 struct ivtv *itv = id->itv; in ivtv_encoder_cmd() local
1298 if (!atomic_read(&itv->capturing)) in ivtv_encoder_cmd()
1300 if (test_and_set_bit(IVTV_F_I_ENC_PAUSED, &itv->i_flags)) in ivtv_encoder_cmd()
1303 ivtv_mute(itv); in ivtv_encoder_cmd()
1304 ivtv_vapi(itv, CX2341X_ENC_PAUSE_ENCODER, 1, 0); in ivtv_encoder_cmd()
1311 if (!atomic_read(&itv->capturing)) in ivtv_encoder_cmd()
1314 if (!test_and_clear_bit(IVTV_F_I_ENC_PAUSED, &itv->i_flags)) in ivtv_encoder_cmd()
1317 ivtv_vapi(itv, CX2341X_ENC_PAUSE_ENCODER, 1, 1); in ivtv_encoder_cmd()
1318 ivtv_unmute(itv); in ivtv_encoder_cmd()
1330 struct ivtv *itv = fh2id(fh)->itv; in ivtv_try_encoder_cmd() local
1360 struct ivtv *itv = fh2id(fh)->itv; in ivtv_g_fbuf() local
1361 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_g_fbuf()
1363 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_g_fbuf()
1387 if (!itv->osd_video_pbase) in ivtv_g_fbuf()
1393 ivtv_vapi_result(itv, data, CX2341X_OSD_GET_STATE, 0); in ivtv_g_fbuf()
1398 fb->fmt.width = itv->osd_rect.width; in ivtv_g_fbuf()
1399 fb->fmt.height = itv->osd_rect.height; in ivtv_g_fbuf()
1410 fb->base = (void *)itv->osd_video_pbase; in ivtv_g_fbuf()
1413 if (itv->osd_chroma_key_state) in ivtv_g_fbuf()
1416 if (itv->osd_global_alpha_state) in ivtv_g_fbuf()
1434 if (itv->osd_local_alpha_state) { in ivtv_g_fbuf()
1448 struct ivtv *itv = id->itv; in ivtv_s_fbuf() local
1449 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_s_fbuf()
1450 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_s_fbuf()
1454 if (!itv->osd_video_pbase) in ivtv_s_fbuf()
1457 itv->osd_global_alpha_state = (fb->flags & V4L2_FBUF_FLAG_GLOBAL_ALPHA) != 0; in ivtv_s_fbuf()
1458 itv->osd_local_alpha_state = in ivtv_s_fbuf()
1460 itv->osd_chroma_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0; in ivtv_s_fbuf()
1461 ivtv_set_osd_alpha(itv); in ivtv_s_fbuf()
1469 struct ivtv *itv = id->itv; in ivtv_overlay() local
1470 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; in ivtv_overlay()
1474 if (!itv->osd_video_pbase) in ivtv_overlay()
1477 ivtv_vapi(itv, CX2341X_OSD_SET_STATE, 1, on != 0); in ivtv_overlay()
1495 struct ivtv *itv = fh2id(fh)->itv; in ivtv_log_status() local
1498 int has_output = itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT; in ivtv_log_status()
1503 IVTV_INFO("Version: %s Card: %s\n", IVTV_VERSION, itv->card_name); in ivtv_log_status()
1504 if (itv->hw_flags & IVTV_HW_TVEEPROM) { in ivtv_log_status()
1507 ivtv_read_eeprom(itv, &tv); in ivtv_log_status()
1509 ivtv_call_all(itv, core, log_status); in ivtv_log_status()
1510 ivtv_get_input(itv, itv->active_input, &vidin); in ivtv_log_status()
1511 ivtv_get_audio_input(itv, itv->audio_input, &audin); in ivtv_log_status()
1514 itv->dualwatch_stereo_mode == V4L2_MPEG_AUDIO_MODE_DUAL ? in ivtv_log_status()
1519 int mode = itv->output_mode; in ivtv_log_status()
1552 ivtv_get_output(itv, itv->active_output, &vidout); in ivtv_log_status()
1553 ivtv_get_audio_output(itv, 0, &audout); in ivtv_log_status()
1558 ivtv_vapi_result(itv, data, CX2341X_OSD_GET_STATE, 0); in ivtv_log_status()
1566 test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) ? "Radio" : "TV"); in ivtv_log_status()
1567 v4l2_ctrl_handler_log_status(&itv->cxhdl.hdl, itv->v4l2_dev.name); in ivtv_log_status()
1568 IVTV_INFO("Status flags: 0x%08lx\n", itv->i_flags); in ivtv_log_status()
1570 struct ivtv_stream *s = &itv->streams[i]; in ivtv_log_status()
1580 (long long)itv->mpg_data_received, in ivtv_log_status()
1581 (long long)itv->vbi_data_inserted); in ivtv_log_status()
1588 struct ivtv *itv = id->itv; in ivtv_decoder_cmd() local
1591 return ivtv_video_command(itv, id, dec, false); in ivtv_decoder_cmd()
1597 struct ivtv *itv = id->itv; in ivtv_try_decoder_cmd() local
1600 return ivtv_video_command(itv, id, dec, true); in ivtv_try_decoder_cmd()
1606 struct ivtv *itv = id->itv; in ivtv_decoder_ioctls() local
1607 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_decoder_ioctls()
1614 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_decoder_ioctls()
1618 if (itv->output_mode == OUT_UDMA_YUV && args->y_source == NULL) in ivtv_decoder_ioctls()
1623 if (ivtv_set_output_mode(itv, OUT_UDMA_YUV) != OUT_UDMA_YUV) { in ivtv_decoder_ioctls()
1631 return ivtv_yuv_prep_frame(itv, args); in ivtv_decoder_ioctls()
1636 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_decoder_ioctls()
1638 return ivtv_passthrough_mode(itv, *(int *)arg != 0); in ivtv_decoder_ioctls()
1648 struct ivtv *itv = fh2id(fh)->itv; in ivtv_default() local
1661 if ((val == 0 && itv->options.newi2c) || (val & 0x01)) in ivtv_default()
1662 ivtv_reset_ir_gpio(itv); in ivtv_default()
1664 v4l2_subdev_call(itv->sd_video, core, reset, 0); in ivtv_default()