Lines Matching refs:cptr
344 static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_channelfreq_get() argument
346 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channelfreq_get()
355 static int ctrl_channelfreq_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_channelfreq_set() argument
357 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channelfreq_set()
377 static int ctrl_channelprog_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_channelprog_get() argument
379 *vp = cptr->hdw->freqProgSlot; in ctrl_channelprog_get()
383 static int ctrl_channelprog_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_channelprog_set() argument
385 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channelprog_set()
392 static int ctrl_channel_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_channel_get() argument
394 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channel_get()
399 static int ctrl_channel_set(struct pvr2_ctrl *cptr,int m,int slotId) in ctrl_channel_set() argument
402 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_channel_set()
417 static int ctrl_freq_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_freq_get() argument
419 *vp = pvr2_hdw_get_cur_freq(cptr->hdw); in ctrl_freq_get()
423 static int ctrl_freq_is_dirty(struct pvr2_ctrl *cptr) in ctrl_freq_is_dirty() argument
425 return cptr->hdw->freqDirty != 0; in ctrl_freq_is_dirty()
428 static void ctrl_freq_clear_dirty(struct pvr2_ctrl *cptr) in ctrl_freq_clear_dirty() argument
430 cptr->hdw->freqDirty = 0; in ctrl_freq_clear_dirty()
433 static int ctrl_freq_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_freq_set() argument
435 pvr2_hdw_set_cur_freq(cptr->hdw,v); in ctrl_freq_set()
439 static int ctrl_cropl_min_get(struct pvr2_ctrl *cptr, int *left) in ctrl_cropl_min_get() argument
441 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropl_min_get()
442 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropl_min_get()
450 static int ctrl_cropl_max_get(struct pvr2_ctrl *cptr, int *left) in ctrl_cropl_max_get() argument
452 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropl_max_get()
453 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropl_max_get()
458 if (cap->bounds.width > cptr->hdw->cropw_val) { in ctrl_cropl_max_get()
459 *left += cap->bounds.width - cptr->hdw->cropw_val; in ctrl_cropl_max_get()
464 static int ctrl_cropt_min_get(struct pvr2_ctrl *cptr, int *top) in ctrl_cropt_min_get() argument
466 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropt_min_get()
467 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropt_min_get()
475 static int ctrl_cropt_max_get(struct pvr2_ctrl *cptr, int *top) in ctrl_cropt_max_get() argument
477 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropt_max_get()
478 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropt_max_get()
483 if (cap->bounds.height > cptr->hdw->croph_val) { in ctrl_cropt_max_get()
484 *top += cap->bounds.height - cptr->hdw->croph_val; in ctrl_cropt_max_get()
489 static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *width) in ctrl_cropw_max_get() argument
491 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_cropw_max_get()
494 stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_cropw_max_get()
499 cleft = cptr->hdw->cropl_val; in ctrl_cropw_max_get()
505 static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *height) in ctrl_croph_max_get() argument
507 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_croph_max_get()
510 stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_croph_max_get()
515 ctop = cptr->hdw->cropt_val; in ctrl_croph_max_get()
521 static int ctrl_get_cropcapbl(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbl() argument
523 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbl()
524 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbl()
532 static int ctrl_get_cropcapbt(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbt() argument
534 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbt()
535 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbt()
543 static int ctrl_get_cropcapbw(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbw() argument
545 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbw()
546 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbw()
554 static int ctrl_get_cropcapbh(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapbh() argument
556 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapbh()
557 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapbh()
565 static int ctrl_get_cropcapdl(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdl() argument
567 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdl()
568 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdl()
576 static int ctrl_get_cropcapdt(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdt() argument
578 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdt()
579 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdt()
587 static int ctrl_get_cropcapdw(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdw() argument
589 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdw()
590 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdw()
598 static int ctrl_get_cropcapdh(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcapdh() argument
600 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcapdh()
601 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcapdh()
609 static int ctrl_get_cropcappan(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcappan() argument
611 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcappan()
612 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcappan()
620 static int ctrl_get_cropcappad(struct pvr2_ctrl *cptr, int *val) in ctrl_get_cropcappad() argument
622 struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; in ctrl_get_cropcappad()
623 int stat = pvr2_hdw_check_cropcap(cptr->hdw); in ctrl_get_cropcappad()
631 static int ctrl_vres_max_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_vres_max_get() argument
634 if (cptr->hdw->std_mask_cur & V4L2_STD_525_60) { in ctrl_vres_max_get()
642 static int ctrl_vres_min_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_vres_min_get() argument
645 if (cptr->hdw->hdw_desc->flag_has_cx25840) { in ctrl_vres_min_get()
653 static int ctrl_get_input(struct pvr2_ctrl *cptr,int *vp) in ctrl_get_input() argument
655 *vp = cptr->hdw->input_val; in ctrl_get_input()
659 static int ctrl_check_input(struct pvr2_ctrl *cptr,int v) in ctrl_check_input() argument
663 return ((1UL << v) & cptr->hdw->input_allowed_mask) != 0; in ctrl_check_input()
666 static int ctrl_set_input(struct pvr2_ctrl *cptr,int m,int v) in ctrl_set_input() argument
668 return pvr2_hdw_set_input(cptr->hdw,v); in ctrl_set_input()
671 static int ctrl_isdirty_input(struct pvr2_ctrl *cptr) in ctrl_isdirty_input() argument
673 return cptr->hdw->input_dirty != 0; in ctrl_isdirty_input()
676 static void ctrl_cleardirty_input(struct pvr2_ctrl *cptr) in ctrl_cleardirty_input() argument
678 cptr->hdw->input_dirty = 0; in ctrl_cleardirty_input()
682 static int ctrl_freq_max_get(struct pvr2_ctrl *cptr, int *vp) in ctrl_freq_max_get() argument
685 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_freq_max_get()
704 static int ctrl_freq_min_get(struct pvr2_ctrl *cptr, int *vp) in ctrl_freq_min_get() argument
707 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_freq_min_get()
726 static int ctrl_cx2341x_is_dirty(struct pvr2_ctrl *cptr) in ctrl_cx2341x_is_dirty() argument
728 return cptr->hdw->enc_stale != 0; in ctrl_cx2341x_is_dirty()
731 static void ctrl_cx2341x_clear_dirty(struct pvr2_ctrl *cptr) in ctrl_cx2341x_clear_dirty() argument
733 cptr->hdw->enc_stale = 0; in ctrl_cx2341x_clear_dirty()
734 cptr->hdw->enc_unsafe_stale = 0; in ctrl_cx2341x_clear_dirty()
737 static int ctrl_cx2341x_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_cx2341x_get() argument
746 c1.id = cptr->info->v4l_id; in ctrl_cx2341x_get()
747 ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state, 0, &cs, in ctrl_cx2341x_get()
754 static int ctrl_cx2341x_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_cx2341x_set() argument
757 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_cx2341x_set()
764 c1.id = cptr->info->v4l_id; in ctrl_cx2341x_set()
785 static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr) in ctrl_cx2341x_getv4lflags() argument
789 qctrl.id = cptr->info->v4l_id; in ctrl_cx2341x_getv4lflags()
790 cx2341x_ctrl_query(&cptr->hdw->enc_ctl_state,&qctrl); in ctrl_cx2341x_getv4lflags()
797 info = (struct pvr2_ctl_info *)(cptr->info); in ctrl_cx2341x_getv4lflags()
810 static int ctrl_streamingenabled_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_streamingenabled_get() argument
812 *vp = cptr->hdw->state_pipeline_req; in ctrl_streamingenabled_get()
816 static int ctrl_masterstate_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_masterstate_get() argument
818 *vp = cptr->hdw->master_state; in ctrl_masterstate_get()
822 static int ctrl_hsm_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_hsm_get() argument
824 int result = pvr2_hdw_is_hsm(cptr->hdw); in ctrl_hsm_get()
831 static int ctrl_stddetect_get(struct pvr2_ctrl *cptr, int *vp) in ctrl_stddetect_get() argument
833 *vp = pvr2_hdw_get_detected_std(cptr->hdw); in ctrl_stddetect_get()
837 static int ctrl_stdavail_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_stdavail_get() argument
839 *vp = cptr->hdw->std_mask_avail; in ctrl_stdavail_get()
843 static int ctrl_stdavail_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_stdavail_set() argument
845 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_stdavail_set()
855 static int ctrl_std_val_to_sym(struct pvr2_ctrl *cptr,int msk,int val, in ctrl_std_val_to_sym() argument
863 static int ctrl_std_sym_to_val(struct pvr2_ctrl *cptr, in ctrl_std_sym_to_val() argument
875 static int ctrl_stdcur_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_stdcur_get() argument
877 *vp = cptr->hdw->std_mask_cur; in ctrl_stdcur_get()
881 static int ctrl_stdcur_set(struct pvr2_ctrl *cptr,int m,int v) in ctrl_stdcur_set() argument
883 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_stdcur_set()
893 static int ctrl_stdcur_is_dirty(struct pvr2_ctrl *cptr) in ctrl_stdcur_is_dirty() argument
895 return cptr->hdw->std_dirty != 0; in ctrl_stdcur_is_dirty()
898 static void ctrl_stdcur_clear_dirty(struct pvr2_ctrl *cptr) in ctrl_stdcur_clear_dirty() argument
900 cptr->hdw->std_dirty = 0; in ctrl_stdcur_clear_dirty()
903 static int ctrl_signal_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_signal_get() argument
905 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_signal_get()
911 static int ctrl_audio_modes_present_get(struct pvr2_ctrl *cptr,int *vp) in ctrl_audio_modes_present_get() argument
915 struct pvr2_hdw *hdw = cptr->hdw; in ctrl_audio_modes_present_get()
961 static int ctrl_get_##vname(struct pvr2_ctrl *cptr,int *vp) \
962 {*vp = cptr->hdw->vname##_val; return 0;} \
963 static int ctrl_set_##vname(struct pvr2_ctrl *cptr,int m,int v) \
964 {cptr->hdw->vname##_val = v; cptr->hdw->vname##_dirty = !0; return 0;} \
965 static int ctrl_isdirty_##vname(struct pvr2_ctrl *cptr) \
966 {return cptr->hdw->vname##_dirty != 0;} \
967 static void ctrl_cleardirty_##vname(struct pvr2_ctrl *cptr) \
968 {cptr->hdw->vname##_dirty = 0;}
2087 struct pvr2_ctrl *cptr; in pvr2_hdw_setup_low() local
2161 cptr = hdw->controls + idx; in pvr2_hdw_setup_low()
2162 if (cptr->info->skip_init) continue; in pvr2_hdw_setup_low()
2163 if (!cptr->info->set_value) continue; in pvr2_hdw_setup_low()
2164 cptr->info->set_value(cptr,~0,cptr->info->default_value); in pvr2_hdw_setup_low()
2352 struct pvr2_ctrl *cptr; in pvr2_hdw_create() local
2433 cptr = hdw->controls + idx; in pvr2_hdw_create()
2434 cptr->hdw = hdw; in pvr2_hdw_create()
2440 cptr = hdw->controls + idx; in pvr2_hdw_create()
2441 cptr->info = control_defs+idx; in pvr2_hdw_create()
2458 cptr = hdw->controls + idx + CTRLDEF_COUNT; in pvr2_hdw_create()
2497 cptr->info = ciptr; in pvr2_hdw_create()
2510 cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDAVAIL); in pvr2_hdw_create()
2511 if (cptr) { in pvr2_hdw_create()
2512 memcpy(&hdw->std_info_avail,cptr->info, in pvr2_hdw_create()
2514 cptr->info = &hdw->std_info_avail; in pvr2_hdw_create()
2520 cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDCUR); in pvr2_hdw_create()
2521 if (cptr) { in pvr2_hdw_create()
2522 memcpy(&hdw->std_info_cur,cptr->info, in pvr2_hdw_create()
2524 cptr->info = &hdw->std_info_cur; in pvr2_hdw_create()
2530 cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDDETECT); in pvr2_hdw_create()
2531 if (cptr) { in pvr2_hdw_create()
2532 memcpy(&hdw->std_info_detect,cptr->info, in pvr2_hdw_create()
2534 cptr->info = &hdw->std_info_detect; in pvr2_hdw_create()
2739 struct pvr2_ctrl *cptr; in pvr2_hdw_get_ctrl_by_id() local
2745 cptr = hdw->controls + idx; in pvr2_hdw_get_ctrl_by_id()
2746 i = cptr->info->internal_id; in pvr2_hdw_get_ctrl_by_id()
2747 if (i && (i == ctl_id)) return cptr; in pvr2_hdw_get_ctrl_by_id()
2756 struct pvr2_ctrl *cptr; in pvr2_hdw_get_ctrl_v4l() local
2762 cptr = hdw->controls + idx; in pvr2_hdw_get_ctrl_v4l()
2763 i = cptr->info->v4l_id; in pvr2_hdw_get_ctrl_v4l()
2764 if (i && (i == ctl_id)) return cptr; in pvr2_hdw_get_ctrl_v4l()
2775 struct pvr2_ctrl *cptr,*cp2; in pvr2_hdw_get_ctrl_nextv4l() local
2782 cptr = hdw->controls + idx; in pvr2_hdw_get_ctrl_nextv4l()
2783 i = cptr->info->v4l_id; in pvr2_hdw_get_ctrl_nextv4l()
2787 cp2 = cptr; in pvr2_hdw_get_ctrl_nextv4l()
2976 struct pvr2_ctrl *cptr; in pvr2_hdw_commit_setup() local
2983 cptr = hdw->controls + idx; in pvr2_hdw_commit_setup()
2984 if (!cptr->info->is_dirty) continue; in pvr2_hdw_commit_setup()
2985 if (!cptr->info->is_dirty(cptr)) continue; in pvr2_hdw_commit_setup()
2990 cptr->info->name); in pvr2_hdw_commit_setup()
2992 cptr->info->get_value(cptr,&value); in pvr2_hdw_commit_setup()
2993 pvr2_ctrl_value_to_sym_internal(cptr,~0,value, in pvr2_hdw_commit_setup()
2998 get_ctrl_typename(cptr->info->type)); in pvr2_hdw_commit_setup()
3025 struct pvr2_ctrl *cptr; in pvr2_hdw_commit_execute() local
3160 cptr = hdw->controls + idx; in pvr2_hdw_commit_execute()
3161 if (!cptr->info->clear_dirty) continue; in pvr2_hdw_commit_execute()
3162 cptr->info->clear_dirty(cptr); in pvr2_hdw_commit_execute()