summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-04-19 23:59:11 -0500
committerMike Isely <isely@pobox.com>2006-04-19 23:59:11 -0500
commitf6ff726f1d538206996f33ae3cce23dfaf21d1ad (patch)
treea52c83ffec2f3c594a279c873bd7a13b7d3dd359 /linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
parentbbfdc6d1fdaea36ca996bb4cfdcc493d998a65f6 (diff)
downloadmediapointer-dvb-s2-f6ff726f1d538206996f33ae3cce23dfaf21d1ad.tar.gz
mediapointer-dvb-s2-f6ff726f1d538206996f33ae3cce23dfaf21d1ad.tar.bz2
Another rework of pvrusb2 video standard handling
From: Mike Isely <isely@pobox.com> Clean up logic for handling video standards in the pvrusb2 driver. New implementation should be able to handle all possible V4L defined video standards now, and it should be far easier to maintain this going forward. Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h38
1 files changed, 21 insertions, 17 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index ad48f0751..abf2faf10 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -129,7 +129,7 @@ struct pvr2_ctl_info {
int skip_init;
/* Starting value for this control */
- long default_value;
+ int default_value;
/* Type-specific control information */
union {
@@ -238,8 +238,6 @@ struct pvr2_hdw {
unsigned int freqTable[FREQTABLE_SIZE];
unsigned int freqProgSlot;
unsigned int freqSlot;
- unsigned int freqVal;
- int freqDirty;
/* Stuff for handling low level control interaction with device */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
@@ -289,18 +287,25 @@ struct pvr2_hdw {
/* Tuner / frequency control stuff */
unsigned int tuner_type;
int tuner_updated;
- v4l2_std_id video_std_avail;
- v4l2_std_id video_std_cur;
- int video_std_dirty;
- struct pvr2_ctl_info video_std_info_enum;
- struct pvr2_ctl_info video_std_info_avail;
- struct pvr2_ctl_info video_std_info_cur;
+ unsigned int freqVal;
+ int freqDirty;
+
+ /* Video standard handling */
+ v4l2_std_id std_mask_eeprom; // Hardware supported selections
+ v4l2_std_id std_mask_avail; // Which standards we may select from
+ v4l2_std_id std_mask_cur; // Currently selected standard(s)
+ unsigned int std_enum_cnt; // # of enumerated standards
+ int std_enum_cur; // selected standard enumeration value
+ int std_dirty; // True if std_mask_cur has changed
+ struct pvr2_ctl_info std_info_enum;
+ struct pvr2_ctl_info std_info_avail;
+ struct pvr2_ctl_info std_info_cur;
struct v4l2_standard *std_defs;
- const char **video_std_enum_names;
- const char *video_std_mask_ptrs[32];
- char video_std_mask_names[32][10];
- unsigned int std_cnt;
- int std_id;
+ const char **std_enum_names;
+
+ // Generated string names, one per actual V4L2 standard
+ const char *std_mask_ptrs[32];
+ char std_mask_names[32][10];
int unit_number; /* ID for driver instance */
unsigned long serial_number; /* ID for hardware itself */
@@ -358,9 +363,8 @@ void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw,
unsigned long msk,
unsigned long val);
-int pvr2_hdw_internal_set_stdenum_cur(struct pvr2_hdw *hdw,int val);
-void pvr2_hdw_internal_set_std_cur(struct pvr2_hdw *hdw,int msk);
-void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw,int msk);
+void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw);
+void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw);
#endif /* __PVRUSB2_HDW_INTERNAL_H */