Lines Matching refs:ch
53 static void vpif_calculate_offsets(struct channel_obj *ch);
54 static void vpif_config_addr(struct channel_obj *ch, int muxmode);
73 struct channel_obj *ch = vb2_get_drv_priv(vb->vb2_queue); in vpif_buffer_prepare() local
76 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_buffer_prepare()
117 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_buffer_queue_setup() local
118 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_buffer_queue_setup()
131 vpif_calculate_offsets(ch); in vpif_buffer_queue_setup()
146 struct channel_obj *ch = vb2_get_drv_priv(vb->vb2_queue); in vpif_buffer_queue() local
150 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_buffer_queue()
167 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_start_streaming() local
168 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_start_streaming()
169 struct vpif_params *vpif = &ch->vpifparams; in vpif_start_streaming()
177 ch->field_id = 0; in vpif_start_streaming()
181 ret = vpif_config_data->set_clock(ch->vpifparams.std_info. in vpif_start_streaming()
182 ycmux_mode, ch->vpifparams.std_info.hd_sd); in vpif_start_streaming()
190 ret = vpif_set_video_params(vpif, ch->channel_id + 2); in vpif_start_streaming()
195 vpif_config_addr(ch, ret); in vpif_start_streaming()
214 channel_first_int[VPIF_VIDEO_INDEX][ch->channel_id] = 1; in vpif_start_streaming()
215 if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { in vpif_start_streaming()
223 if (VPIF_CHANNEL3_VIDEO == ch->channel_id || ycmux_mode == 2) { in vpif_start_streaming()
252 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_stop_streaming() local
256 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_stop_streaming()
259 if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { in vpif_stop_streaming()
263 if (VPIF_CHANNEL3_VIDEO == ch->channel_id || ycmux_mode == 2) { in vpif_stop_streaming()
363 struct channel_obj *ch; in vpif_channel_isr() local
372 ch = dev->dev[channel_id]; in vpif_channel_isr()
374 common = &ch->common[i]; in vpif_channel_isr()
377 if (1 == ch->vpifparams.std_info.frm_fmt) { in vpif_channel_isr()
409 ch->field_id ^= 1; in vpif_channel_isr()
411 fid = vpif_channel_getfid(ch->channel_id + 2); in vpif_channel_isr()
413 if (fid != ch->field_id) { in vpif_channel_isr()
416 ch->field_id = fid; in vpif_channel_isr()
428 static int vpif_update_std_info(struct channel_obj *ch) in vpif_update_std_info() argument
430 struct video_obj *vid_ch = &ch->video; in vpif_update_std_info()
431 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_update_std_info()
456 static int vpif_update_resolution(struct channel_obj *ch) in vpif_update_resolution() argument
458 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_update_resolution()
459 struct video_obj *vid_ch = &ch->video; in vpif_update_resolution()
460 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_update_resolution()
467 if (vpif_update_std_info(ch)) in vpif_update_resolution()
487 if (ch->vpifparams.std_info.frm_fmt) in vpif_update_resolution()
499 static void vpif_calculate_offsets(struct channel_obj *ch) in vpif_calculate_offsets() argument
501 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_calculate_offsets()
502 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_calculate_offsets()
504 struct video_obj *vid_ch = &ch->video; in vpif_calculate_offsets()
508 if (ch->vpifparams.std_info.frm_fmt) in vpif_calculate_offsets()
544 if (ch->vpifparams.std_info.frm_fmt == 1) { in vpif_calculate_offsets()
557 ch->vpifparams.video_params.stdid = ch->vpifparams.std_info.stdid; in vpif_calculate_offsets()
560 static void vpif_config_addr(struct channel_obj *ch, int muxmode) in vpif_config_addr() argument
562 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_config_addr()
564 if (VPIF_CHANNEL3_VIDEO == ch->channel_id) { in vpif_config_addr()
614 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_fmt_vid_out() local
615 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_g_fmt_vid_out()
621 if (vpif_update_resolution(ch)) in vpif_g_fmt_vid_out()
631 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_try_fmt_vid_out() local
632 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_try_fmt_vid_out()
642 if (vpif_update_resolution(ch)) in vpif_try_fmt_vid_out()
659 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_fmt_vid_out() local
660 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_fmt_vid_out()
683 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_std() local
684 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_std()
689 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_s_std()
692 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_s_std()
693 output = chan_cfg->outputs[ch->output_idx].output; in vpif_s_std()
705 ch->video.stdid = std_id; in vpif_s_std()
706 memset(&ch->video.dv_timings, 0, sizeof(ch->video.dv_timings)); in vpif_s_std()
708 if (vpif_update_resolution(ch)) in vpif_s_std()
731 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_std() local
735 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_g_std()
738 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_g_std()
739 output = chan_cfg->outputs[ch->output_idx].output; in vpif_g_std()
743 *std = ch->video.stdid; in vpif_g_std()
753 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_enum_output() local
756 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_enum_output()
811 struct channel_obj *ch, int index) in vpif_set_output() argument
814 &vpif_cfg->chan_config[ch->channel_id]; in vpif_set_output()
834 ch->output_idx = index; in vpif_set_output()
835 ch->sd = sd; in vpif_set_output()
838 ch->video_dev.tvnorms = chan_cfg->outputs[index].output.std; in vpif_set_output()
846 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_output() local
848 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_output()
853 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_s_output()
858 return vpif_set_output(config, ch, i); in vpif_s_output()
864 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_output() local
866 *i = ch->output_idx; in vpif_g_output()
883 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_enum_dv_timings() local
888 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_enum_dv_timings()
891 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_enum_dv_timings()
892 output = chan_cfg->outputs[ch->output_idx].output; in vpif_enum_dv_timings()
898 ret = v4l2_subdev_call(ch->sd, pad, enum_dv_timings, timings); in vpif_enum_dv_timings()
915 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_dv_timings() local
916 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_s_dv_timings()
917 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_dv_timings()
919 struct video_obj *vid_ch = &ch->video; in vpif_s_dv_timings()
925 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_s_dv_timings()
928 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_s_dv_timings()
929 output = chan_cfg->outputs[ch->output_idx].output; in vpif_s_dv_timings()
942 ret = v4l2_subdev_call(ch->sd, video, s_dv_timings, timings); in vpif_s_dv_timings()
1019 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_dv_timings() local
1021 struct video_obj *vid_ch = &ch->video; in vpif_g_dv_timings()
1024 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_g_dv_timings()
1027 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_g_dv_timings()
1028 output = chan_cfg->outputs[ch->output_idx].output; in vpif_g_dv_timings()
1142 struct channel_obj *ch; in vpif_probe_complete() local
1147 ch = vpif_obj.dev[j]; in vpif_probe_complete()
1150 common = &ch->common[k]; in vpif_probe_complete()
1162 ch->initialized = 0; in vpif_probe_complete()
1164 ch->sd = vpif_obj.sd[0]; in vpif_probe_complete()
1165 ch->channel_id = j; in vpif_probe_complete()
1167 memset(&ch->vpifparams, 0, sizeof(ch->vpifparams)); in vpif_probe_complete()
1169 ch->common[VPIF_VIDEO_INDEX].fmt.type = in vpif_probe_complete()
1173 err = vpif_set_output(vpif_obj.config, ch, 0); in vpif_probe_complete()
1178 ch->video.stdid = V4L2_STD_525_60; in vpif_probe_complete()
1179 memset(&ch->video.dv_timings, 0, sizeof(ch->video.dv_timings)); in vpif_probe_complete()
1180 vpif_update_resolution(ch); in vpif_probe_complete()
1186 q->drv_priv = ch; in vpif_probe_complete()
1210 ch, &ch->video_dev); in vpif_probe_complete()
1213 vdev = &ch->video_dev; in vpif_probe_complete()
1222 video_set_drvdata(&ch->video_dev, ch); in vpif_probe_complete()
1233 ch = vpif_obj.dev[k]; in vpif_probe_complete()
1234 common = &ch->common[k]; in vpif_probe_complete()
1236 video_unregister_device(&ch->video_dev); in vpif_probe_complete()
1346 struct channel_obj *ch; in vpif_remove() local
1355 ch = vpif_obj.dev[i]; in vpif_remove()
1356 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_remove()
1359 video_unregister_device(&ch->video_dev); in vpif_remove()
1370 struct channel_obj *ch; in vpif_suspend() local
1375 ch = vpif_obj.dev[i]; in vpif_suspend()
1376 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_suspend()
1383 if (ch->channel_id == VPIF_CHANNEL2_VIDEO) { in vpif_suspend()
1387 if (ch->channel_id == VPIF_CHANNEL3_VIDEO || in vpif_suspend()
1402 struct channel_obj *ch; in vpif_resume() local
1407 ch = vpif_obj.dev[i]; in vpif_resume()
1408 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_resume()
1415 if (ch->channel_id == VPIF_CHANNEL2_VIDEO) { in vpif_resume()
1419 if (ch->channel_id == VPIF_CHANNEL3_VIDEO || in vpif_resume()