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);
71 struct channel_obj *ch = vb2_get_drv_priv(vb->vb2_queue); in vpif_buffer_prepare() local
74 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_buffer_prepare()
114 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_buffer_queue_setup() local
115 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_buffer_queue_setup()
128 vpif_calculate_offsets(ch); in vpif_buffer_queue_setup()
142 struct channel_obj *ch = vb2_get_drv_priv(vb->vb2_queue); in vpif_buffer_queue() local
146 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_buffer_queue()
163 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_start_streaming() local
164 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_start_streaming()
165 struct vpif_params *vpif = &ch->vpifparams; in vpif_start_streaming()
173 ch->field_id = 0; in vpif_start_streaming()
177 ret = vpif_config_data->set_clock(ch->vpifparams.std_info. in vpif_start_streaming()
178 ycmux_mode, ch->vpifparams.std_info.hd_sd); in vpif_start_streaming()
186 ret = vpif_set_video_params(vpif, ch->channel_id + 2); in vpif_start_streaming()
191 vpif_config_addr(ch, ret); in vpif_start_streaming()
210 channel_first_int[VPIF_VIDEO_INDEX][ch->channel_id] = 1; in vpif_start_streaming()
211 if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { in vpif_start_streaming()
219 if (VPIF_CHANNEL3_VIDEO == ch->channel_id || ycmux_mode == 2) { in vpif_start_streaming()
248 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_stop_streaming() local
252 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_stop_streaming()
255 if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { in vpif_stop_streaming()
259 if (VPIF_CHANNEL3_VIDEO == ch->channel_id || ycmux_mode == 2) { in vpif_stop_streaming()
357 struct channel_obj *ch; in vpif_channel_isr() local
366 ch = dev->dev[channel_id]; in vpif_channel_isr()
368 common = &ch->common[i]; in vpif_channel_isr()
371 if (1 == ch->vpifparams.std_info.frm_fmt) { in vpif_channel_isr()
403 ch->field_id ^= 1; in vpif_channel_isr()
405 fid = vpif_channel_getfid(ch->channel_id + 2); in vpif_channel_isr()
407 if (fid != ch->field_id) { in vpif_channel_isr()
410 ch->field_id = fid; in vpif_channel_isr()
422 static int vpif_update_std_info(struct channel_obj *ch) in vpif_update_std_info() argument
424 struct video_obj *vid_ch = &ch->video; in vpif_update_std_info()
425 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_update_std_info()
450 static int vpif_update_resolution(struct channel_obj *ch) in vpif_update_resolution() argument
452 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_update_resolution()
453 struct video_obj *vid_ch = &ch->video; in vpif_update_resolution()
454 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_update_resolution()
461 if (vpif_update_std_info(ch)) in vpif_update_resolution()
481 if (ch->vpifparams.std_info.frm_fmt) in vpif_update_resolution()
493 static void vpif_calculate_offsets(struct channel_obj *ch) in vpif_calculate_offsets() argument
495 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_calculate_offsets()
496 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_calculate_offsets()
498 struct video_obj *vid_ch = &ch->video; in vpif_calculate_offsets()
502 if (ch->vpifparams.std_info.frm_fmt) in vpif_calculate_offsets()
538 if (ch->vpifparams.std_info.frm_fmt == 1) { in vpif_calculate_offsets()
551 ch->vpifparams.video_params.stdid = ch->vpifparams.std_info.stdid; in vpif_calculate_offsets()
554 static void vpif_config_addr(struct channel_obj *ch, int muxmode) in vpif_config_addr() argument
556 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_config_addr()
558 if (VPIF_CHANNEL3_VIDEO == ch->channel_id) { in vpif_config_addr()
608 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_fmt_vid_out() local
609 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_g_fmt_vid_out()
615 if (vpif_update_resolution(ch)) in vpif_g_fmt_vid_out()
625 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_try_fmt_vid_out() local
626 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_try_fmt_vid_out()
636 if (vpif_update_resolution(ch)) in vpif_try_fmt_vid_out()
653 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_fmt_vid_out() local
654 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_fmt_vid_out()
677 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_std() local
678 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_std()
683 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_s_std()
686 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_s_std()
687 output = chan_cfg->outputs[ch->output_idx].output; in vpif_s_std()
699 ch->video.stdid = std_id; in vpif_s_std()
700 memset(&ch->video.dv_timings, 0, sizeof(ch->video.dv_timings)); in vpif_s_std()
702 if (vpif_update_resolution(ch)) in vpif_s_std()
725 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_std() local
729 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_g_std()
732 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_g_std()
733 output = chan_cfg->outputs[ch->output_idx].output; in vpif_g_std()
737 *std = ch->video.stdid; in vpif_g_std()
747 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_enum_output() local
750 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_enum_output()
805 struct channel_obj *ch, int index) in vpif_set_output() argument
808 &vpif_cfg->chan_config[ch->channel_id]; in vpif_set_output()
828 ch->output_idx = index; in vpif_set_output()
829 ch->sd = sd; in vpif_set_output()
832 ch->video_dev.tvnorms = chan_cfg->outputs[index].output.std; in vpif_set_output()
840 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_output() local
842 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_output()
847 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_s_output()
852 return vpif_set_output(config, ch, i); in vpif_s_output()
858 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_output() local
860 *i = ch->output_idx; in vpif_g_output()
877 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_enum_dv_timings() local
882 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_enum_dv_timings()
885 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_enum_dv_timings()
886 output = chan_cfg->outputs[ch->output_idx].output; in vpif_enum_dv_timings()
892 ret = v4l2_subdev_call(ch->sd, pad, enum_dv_timings, timings); in vpif_enum_dv_timings()
909 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_s_dv_timings() local
910 struct vpif_params *vpifparams = &ch->vpifparams; in vpif_s_dv_timings()
911 struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_s_dv_timings()
913 struct video_obj *vid_ch = &ch->video; in vpif_s_dv_timings()
919 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_s_dv_timings()
922 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_s_dv_timings()
923 output = chan_cfg->outputs[ch->output_idx].output; in vpif_s_dv_timings()
936 ret = v4l2_subdev_call(ch->sd, video, s_dv_timings, timings); in vpif_s_dv_timings()
1013 struct channel_obj *ch = video_get_drvdata(vdev); in vpif_g_dv_timings() local
1015 struct video_obj *vid_ch = &ch->video; in vpif_g_dv_timings()
1018 if (config->chan_config[ch->channel_id].outputs == NULL) in vpif_g_dv_timings()
1021 chan_cfg = &config->chan_config[ch->channel_id]; in vpif_g_dv_timings()
1022 output = chan_cfg->outputs[ch->output_idx].output; in vpif_g_dv_timings()
1136 struct channel_obj *ch; in vpif_probe_complete() local
1141 ch = vpif_obj.dev[j]; in vpif_probe_complete()
1144 common = &ch->common[k]; in vpif_probe_complete()
1156 ch->initialized = 0; in vpif_probe_complete()
1158 ch->sd = vpif_obj.sd[0]; in vpif_probe_complete()
1159 ch->channel_id = j; in vpif_probe_complete()
1161 memset(&ch->vpifparams, 0, sizeof(ch->vpifparams)); in vpif_probe_complete()
1163 ch->common[VPIF_VIDEO_INDEX].fmt.type = in vpif_probe_complete()
1167 err = vpif_set_output(vpif_obj.config, ch, 0); in vpif_probe_complete()
1172 ch->video.stdid = V4L2_STD_525_60; in vpif_probe_complete()
1173 memset(&ch->video.dv_timings, 0, sizeof(ch->video.dv_timings)); in vpif_probe_complete()
1174 vpif_update_resolution(ch); in vpif_probe_complete()
1180 q->drv_priv = ch; in vpif_probe_complete()
1204 ch, &ch->video_dev); in vpif_probe_complete()
1207 vdev = &ch->video_dev; in vpif_probe_complete()
1216 video_set_drvdata(&ch->video_dev, ch); in vpif_probe_complete()
1227 ch = vpif_obj.dev[k]; in vpif_probe_complete()
1228 common = &ch->common[k]; in vpif_probe_complete()
1230 video_unregister_device(&ch->video_dev); in vpif_probe_complete()
1340 struct channel_obj *ch; in vpif_remove() local
1349 ch = vpif_obj.dev[i]; in vpif_remove()
1350 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_remove()
1353 video_unregister_device(&ch->video_dev); in vpif_remove()
1364 struct channel_obj *ch; in vpif_suspend() local
1369 ch = vpif_obj.dev[i]; in vpif_suspend()
1370 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_suspend()
1377 if (ch->channel_id == VPIF_CHANNEL2_VIDEO) { in vpif_suspend()
1381 if (ch->channel_id == VPIF_CHANNEL3_VIDEO || in vpif_suspend()
1396 struct channel_obj *ch; in vpif_resume() local
1401 ch = vpif_obj.dev[i]; in vpif_resume()
1402 common = &ch->common[VPIF_VIDEO_INDEX]; in vpif_resume()
1409 if (ch->channel_id == VPIF_CHANNEL2_VIDEO) { in vpif_resume()
1413 if (ch->channel_id == VPIF_CHANNEL3_VIDEO || in vpif_resume()