Lines Matching refs:cptr
356 static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_channelfreq_get() argument
358 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channelfreq_get()
367 static int ctrl_channelfreq_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_channelfreq_set() argument
369 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channelfreq_set()
389 static int ctrl_channelprog_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_channelprog_get() argument
391 *vp = cptr->hdw->freqProgSlot; in ctrl_channelprog_get()
395 static int ctrl_channelprog_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_channelprog_set() argument
397 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channelprog_set()
404 static int ctrl_channel_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_channel_get() argument
406 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channel_get()
411 static int ctrl_channel_set(struct pvr2_ctrl *cptr,int m,int slotId) in ctrl_channel_set() argument
414 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channel_set()
429 static int ctrl_freq_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_freq_get() argument
431 *vp = pvr2_hdw_get_cur_freq(cptr->hdw); in ctrl_freq_get()
435 static int ctrl_freq_is_dirty(struct pvr2_ctrl *cptr) in ctrl_freq_is_dirty() argument
437 return cptr->hdw->freqDirty != 0; in ctrl_freq_is_dirty()
440 static void ctrl_freq_clear_dirty(struct pvr2_ctrl *cptr) in ctrl_freq_clear_dirty() argument
442 cptr->hdw->freqDirty = 0; in ctrl_freq_clear_dirty()
445 static int ctrl_freq_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_freq_set() argument
447 pvr2_hdw_set_cur_freq(cptr->hdw,v); in ctrl_freq_set()
451 static int ctrl_cropl_min_get(struct pvr2_ctrl *cptr, int *left) in ctrl_cropl_min_get() argument
453 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropl_min_get()
454 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropl_min_get()
462 static int ctrl_cropl_max_get(struct pvr2_ctrl *cptr, int *left) in ctrl_cropl_max_get() argument
464 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropl_max_get()
465 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropl_max_get()
470 if (cap->bounds.width > cptr->hdw->cropw_val) { in ctrl_cropl_max_get()
471 *left += cap->bounds.width - cptr->hdw->cropw_val; in ctrl_cropl_max_get()
476 static int ctrl_cropt_min_get(struct pvr2_ctrl *cptr, int *top) in ctrl_cropt_min_get() argument
478 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropt_min_get()
479 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropt_min_get()
487 static int ctrl_cropt_max_get(struct pvr2_ctrl *cptr, int *top) in ctrl_cropt_max_get() argument
489 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropt_max_get()
490 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropt_max_get()
495 if (cap->bounds.height > cptr->hdw->croph_val) { in ctrl_cropt_max_get()
496 *top += cap->bounds.height - cptr->hdw->croph_val; in ctrl_cropt_max_get()
501 static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *width) in ctrl_cropw_max_get() argument
503 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropw_max_get()
506 stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropw_max_get()
511 cleft = cptr->hdw->cropl_val; in ctrl_cropw_max_get()
517 static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *height) in ctrl_croph_max_get() argument
519 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_croph_max_get()
522 stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_croph_max_get()
527 ctop = cptr->hdw->cropt_val; in ctrl_croph_max_get()
533 static int ctrl_get_cropcapbl(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbl() argument
535 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbl()
536 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbl()
544 static int ctrl_get_cropcapbt(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbt() argument
546 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbt()
547 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbt()
555 static int ctrl_get_cropcapbw(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbw() argument
557 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbw()
558 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbw()
566 static int ctrl_get_cropcapbh(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbh() argument
568 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbh()
569 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbh()
577 static int ctrl_get_cropcapdl(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdl() argument
579 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdl()
580 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdl()
588 static int ctrl_get_cropcapdt(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdt() argument
590 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdt()
591 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdt()
599 static int ctrl_get_cropcapdw(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdw() argument
601 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdw()
602 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdw()
610 static int ctrl_get_cropcapdh(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdh() argument
612 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdh()
613 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdh()
621 static int ctrl_get_cropcappan(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcappan() argument
623 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcappan()
624 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcappan()
632 static int ctrl_get_cropcappad(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcappad() argument
634 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcappad()
635 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcappad()
643 static int ctrl_vres_max_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_vres_max_get() argument
646 if (cptr->hdw->std_mask_cur & V4L2_STD_525_60) { in ctrl_vres_max_get()
654 static int ctrl_vres_min_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_vres_min_get() argument
657 if (cptr->hdw->hdw_desc->flag_has_cx25840) { in ctrl_vres_min_get()
665 static int ctrl_get_input(struct pvr2_ctrl *cptr,int *vp) in ctrl_get_input() argument
667 *vp = cptr->hdw->input_val; in ctrl_get_input()
671 static int ctrl_check_input(struct pvr2_ctrl *cptr,int v) in ctrl_check_input() argument
673 return ((1 << v) & cptr->hdw->input_allowed_mask) != 0; in ctrl_check_input()
676 static int ctrl_set_input(struct pvr2_ctrl *cptr,int m,int v) in ctrl_set_input() argument
678 return pvr2_hdw_set_input(cptr->hdw,v); in ctrl_set_input()
681 static int ctrl_isdirty_input(struct pvr2_ctrl *cptr) in ctrl_isdirty_input() argument
683 return cptr->hdw->input_dirty != 0; in ctrl_isdirty_input()
686 static void ctrl_cleardirty_input(struct pvr2_ctrl *cptr) in ctrl_cleardirty_input() argument
688 cptr->hdw->input_dirty = 0; in ctrl_cleardirty_input()
692 static int ctrl_freq_max_get(struct pvr2_ctrl *cptr, int *vp) in ctrl_freq_max_get() argument
695 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_freq_max_get()
714 static int ctrl_freq_min_get(struct pvr2_ctrl *cptr, int *vp) in ctrl_freq_min_get() argument
717 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_freq_min_get()
736 static int ctrl_cx2341x_is_dirty(struct pvr2_ctrl *cptr) in ctrl_cx2341x_is_dirty() argument
738 return cptr->hdw->enc_stale != 0; in ctrl_cx2341x_is_dirty()
741 static void ctrl_cx2341x_clear_dirty(struct pvr2_ctrl *cptr) in ctrl_cx2341x_clear_dirty() argument
743 cptr->hdw->enc_stale = 0; in ctrl_cx2341x_clear_dirty()
744 cptr->hdw->enc_unsafe_stale = 0; in ctrl_cx2341x_clear_dirty()
747 static int ctrl_cx2341x_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_cx2341x_get() argument
756 c1.id = cptr->info->v4l_id; in ctrl_cx2341x_get()
757 ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state, 0, &cs, in ctrl_cx2341x_get()
764 static int ctrl_cx2341x_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_cx2341x_set() argument
767 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_cx2341x_set()
774 c1.id = cptr->info->v4l_id; in ctrl_cx2341x_set()
795 static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr) in ctrl_cx2341x_getv4lflags() argument
799 qctrl.id = cptr->info->v4l_id; in ctrl_cx2341x_getv4lflags()
800 cx2341x_ctrl_query(&cptr->hdw->enc_ctl_state,&qctrl); in ctrl_cx2341x_getv4lflags()
807 info = (struct pvr2_ctl_info *)(cptr->info); in ctrl_cx2341x_getv4lflags()
820 static int ctrl_streamingenabled_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_streamingenabled_get() argument
822 *vp = cptr->hdw->state_pipeline_req; in ctrl_streamingenabled_get()
826 static int ctrl_masterstate_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_masterstate_get() argument
828 *vp = cptr->hdw->master_state; in ctrl_masterstate_get()
832 static int ctrl_hsm_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_hsm_get() argument
834 int result = pvr2_hdw_is_hsm(cptr->hdw); in ctrl_hsm_get()
841 static int ctrl_stddetect_get(struct pvr2_ctrl *cptr, int *vp) in ctrl_stddetect_get() argument
843 *vp = pvr2_hdw_get_detected_std(cptr->hdw); in ctrl_stddetect_get()
847 static int ctrl_stdavail_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_stdavail_get() argument
849 *vp = cptr->hdw->std_mask_avail; in ctrl_stdavail_get()
853 static int ctrl_stdavail_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_stdavail_set() argument
855 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_stdavail_set()
865 static int ctrl_std_val_to_sym(struct pvr2_ctrl *cptr,int msk,int val, in ctrl_std_val_to_sym() argument
873 static int ctrl_std_sym_to_val(struct pvr2_ctrl *cptr, in ctrl_std_sym_to_val() argument
886 static int ctrl_stdcur_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_stdcur_get() argument
888 *vp = cptr->hdw->std_mask_cur; in ctrl_stdcur_get()
892 static int ctrl_stdcur_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_stdcur_set() argument
894 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_stdcur_set()
904 static int ctrl_stdcur_is_dirty(struct pvr2_ctrl *cptr) in ctrl_stdcur_is_dirty() argument
906 return cptr->hdw->std_dirty != 0; in ctrl_stdcur_is_dirty()
909 static void ctrl_stdcur_clear_dirty(struct pvr2_ctrl *cptr) in ctrl_stdcur_clear_dirty() argument
911 cptr->hdw->std_dirty = 0; in ctrl_stdcur_clear_dirty()
914 static int ctrl_signal_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_signal_get() argument
916 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_signal_get()
922 static int ctrl_audio_modes_present_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_audio_modes_present_get() argument
926 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_audio_modes_present_get()
972 static int ctrl_get_##vname(struct pvr2_ctrl *cptr,int *vp) \
973 {*vp = cptr->hdw->vname##_val; return 0;} \
974 static int ctrl_set_##vname(struct pvr2_ctrl *cptr,int m,int v) \
975 {cptr->hdw->vname##_val = v; cptr->hdw->vname##_dirty = !0; return 0;} \
976 static int ctrl_isdirty_##vname(struct pvr2_ctrl *cptr) \
977 {return cptr->hdw->vname##_dirty != 0;} \
978 static void ctrl_cleardirty_##vname(struct pvr2_ctrl *cptr) \
979 {cptr->hdw->vname##_dirty = 0;}
2118 struct pvr2_ctrl *cptr; in pvr2_hdw_setup_low() local
2178 cptr = hdw->controls + idx; in pvr2_hdw_setup_low()
2179 if (cptr->info->skip_init) continue; in pvr2_hdw_setup_low()
2180 if (!cptr->info->set_value) continue; in pvr2_hdw_setup_low()
2181 cptr->info->set_value(cptr,~0,cptr->info->default_value); in pvr2_hdw_setup_low()
2387 struct pvr2_ctrl *cptr; in pvr2_hdw_create() local
2476 cptr = hdw->controls + idx; in pvr2_hdw_create()
2477 cptr->hdw = hdw; in pvr2_hdw_create()
2483 cptr = hdw->controls + idx; in pvr2_hdw_create()
2484 cptr->info = control_defs+idx; in pvr2_hdw_create()
2501 cptr = hdw->controls + idx + CTRLDEF_COUNT; in pvr2_hdw_create()
2541 cptr->info = ciptr; in pvr2_hdw_create()
2554 cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDAVAIL); in pvr2_hdw_create()
2555 if (cptr) { in pvr2_hdw_create()
2556 memcpy(&hdw->std_info_avail,cptr->info, in pvr2_hdw_create()
2558 cptr->info = &hdw->std_info_avail; in pvr2_hdw_create()
2564 cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDCUR); in pvr2_hdw_create()
2565 if (cptr) { in pvr2_hdw_create()
2566 memcpy(&hdw->std_info_cur,cptr->info, in pvr2_hdw_create()
2568 cptr->info = &hdw->std_info_cur; in pvr2_hdw_create()
2574 cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDDETECT); in pvr2_hdw_create()
2575 if (cptr) { in pvr2_hdw_create()
2576 memcpy(&hdw->std_info_detect,cptr->info, in pvr2_hdw_create()
2578 cptr->info = &hdw->std_info_detect; in pvr2_hdw_create()
2788 struct pvr2_ctrl *cptr; in pvr2_hdw_get_ctrl_by_id() local
2794 cptr = hdw->controls + idx; in pvr2_hdw_get_ctrl_by_id()
2795 i = cptr->info->internal_id; in pvr2_hdw_get_ctrl_by_id()
2796 if (i && (i == ctl_id)) return cptr; in pvr2_hdw_get_ctrl_by_id()
2805 struct pvr2_ctrl *cptr; in pvr2_hdw_get_ctrl_v4l() local
2811 cptr = hdw->controls + idx; in pvr2_hdw_get_ctrl_v4l()
2812 i = cptr->info->v4l_id; in pvr2_hdw_get_ctrl_v4l()
2813 if (i && (i == ctl_id)) return cptr; in pvr2_hdw_get_ctrl_v4l()
2824 struct pvr2_ctrl *cptr,*cp2; in pvr2_hdw_get_ctrl_nextv4l() local
2831 cptr = hdw->controls + idx; in pvr2_hdw_get_ctrl_nextv4l()
2832 i = cptr->info->v4l_id; in pvr2_hdw_get_ctrl_nextv4l()
2836 cp2 = cptr; in pvr2_hdw_get_ctrl_nextv4l()
3021 struct pvr2_ctrl *cptr; in pvr2_hdw_commit_setup() local
3028 cptr = hdw->controls + idx; in pvr2_hdw_commit_setup()
3029 if (!cptr->info->is_dirty) continue; in pvr2_hdw_commit_setup()
3030 if (!cptr->info->is_dirty(cptr)) continue; in pvr2_hdw_commit_setup()
3035 cptr->info->name); in pvr2_hdw_commit_setup()
3037 cptr->info->get_value(cptr,&value); in pvr2_hdw_commit_setup()
3038 pvr2_ctrl_value_to_sym_internal(cptr,~0,value, in pvr2_hdw_commit_setup()
3043 get_ctrl_typename(cptr->info->type)); in pvr2_hdw_commit_setup()
3070 struct pvr2_ctrl *cptr; in pvr2_hdw_commit_execute() local
3205 cptr = hdw->controls + idx; in pvr2_hdw_commit_execute()
3206 if (!cptr->info->clear_dirty) continue; in pvr2_hdw_commit_execute()
3207 cptr->info->clear_dirty(cptr); in pvr2_hdw_commit_execute()