Lines Matching refs:cptr

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