diff options
author | Mike Isely <isely@isely.net> | 2006-06-26 19:58:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-26 23:17:15 -0400 |
commit | d855497edbfbf9e19a17f4a1154bca69cb4bd9ba (patch) | |
tree | b39bef23fc00c91dac73ae171ad6ba7261170918 /drivers/media/video/pvrusb2/pvrusb2-ctrl.h | |
parent | eb99adde31b7d85c67a5e1c2fa5e098e1056dd79 (diff) |
V4L/DVB (4228a): pvrusb2 to kernel 2.6.18
Implement V4L2 driver for the Hauppauge PVR USB2 TV tuner.
The Hauppauge PVR USB2 is a USB connected TV tuner with an embedded
cx23416 hardware MPEG2 encoder. There are two major variants of this
device; this driver handles both. Any V4L2 application which
understands MPEG2 video stream data should be able to work with this
device.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-ctrl.h')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-ctrl.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.h b/drivers/media/video/pvrusb2/pvrusb2-ctrl.h new file mode 100644 index 000000000000..9d74151a37da --- /dev/null +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.h | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | * | ||
3 | * $Id$ | ||
4 | * | ||
5 | * Copyright (C) 2005 Mike Isely <isely@pobox.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | #ifndef __PVRUSB2_CTRL_H | ||
22 | #define __PVRUSB2_CTRL_H | ||
23 | |||
24 | struct pvr2_ctrl; | ||
25 | |||
26 | enum pvr2_ctl_type { | ||
27 | pvr2_ctl_int = 0, | ||
28 | pvr2_ctl_enum = 1, | ||
29 | pvr2_ctl_bitmask = 2, | ||
30 | }; | ||
31 | |||
32 | |||
33 | /* Set the given control. */ | ||
34 | int pvr2_ctrl_set_value(struct pvr2_ctrl *,int val); | ||
35 | |||
36 | /* Set/clear specific bits of the given control. */ | ||
37 | int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *,int mask,int val); | ||
38 | |||
39 | /* Get the current value of the given control. */ | ||
40 | int pvr2_ctrl_get_value(struct pvr2_ctrl *,int *valptr); | ||
41 | |||
42 | /* Retrieve control's type */ | ||
43 | enum pvr2_ctl_type pvr2_ctrl_get_type(struct pvr2_ctrl *); | ||
44 | |||
45 | /* Retrieve control's maximum value (int type) */ | ||
46 | int pvr2_ctrl_get_max(struct pvr2_ctrl *); | ||
47 | |||
48 | /* Retrieve control's minimum value (int type) */ | ||
49 | int pvr2_ctrl_get_min(struct pvr2_ctrl *); | ||
50 | |||
51 | /* Retrieve control's default value (any type) */ | ||
52 | int pvr2_ctrl_get_def(struct pvr2_ctrl *); | ||
53 | |||
54 | /* Retrieve control's enumeration count (enum only) */ | ||
55 | int pvr2_ctrl_get_cnt(struct pvr2_ctrl *); | ||
56 | |||
57 | /* Retrieve control's valid mask bits (bit mask only) */ | ||
58 | int pvr2_ctrl_get_mask(struct pvr2_ctrl *); | ||
59 | |||
60 | /* Retrieve the control's name */ | ||
61 | const char *pvr2_ctrl_get_name(struct pvr2_ctrl *); | ||
62 | |||
63 | /* Retrieve the control's desc */ | ||
64 | const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *); | ||
65 | |||
66 | /* Retrieve a control enumeration or bit mask value */ | ||
67 | int pvr2_ctrl_get_valname(struct pvr2_ctrl *,int,char *,unsigned int, | ||
68 | unsigned int *); | ||
69 | |||
70 | /* Return true if control is writable */ | ||
71 | int pvr2_ctrl_is_writable(struct pvr2_ctrl *); | ||
72 | |||
73 | /* Return true if control has custom symbolic representation */ | ||
74 | int pvr2_ctrl_has_custom_symbols(struct pvr2_ctrl *); | ||
75 | |||
76 | /* Convert a given mask/val to a custom symbolic value */ | ||
77 | int pvr2_ctrl_custom_value_to_sym(struct pvr2_ctrl *, | ||
78 | int mask,int val, | ||
79 | char *buf,unsigned int maxlen, | ||
80 | unsigned int *len); | ||
81 | |||
82 | /* Convert a symbolic value to a mask/value pair */ | ||
83 | int pvr2_ctrl_custom_sym_to_value(struct pvr2_ctrl *, | ||
84 | const char *buf,unsigned int len, | ||
85 | int *maskptr,int *valptr); | ||
86 | |||
87 | /* Convert a given mask/val to a symbolic value */ | ||
88 | int pvr2_ctrl_value_to_sym(struct pvr2_ctrl *, | ||
89 | int mask,int val, | ||
90 | char *buf,unsigned int maxlen, | ||
91 | unsigned int *len); | ||
92 | |||
93 | /* Convert a symbolic value to a mask/value pair */ | ||
94 | int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *, | ||
95 | const char *buf,unsigned int len, | ||
96 | int *maskptr,int *valptr); | ||
97 | |||
98 | /* Convert a given mask/val to a symbolic value - must already be | ||
99 | inside of critical region. */ | ||
100 | int pvr2_ctrl_value_to_sym_internal(struct pvr2_ctrl *, | ||
101 | int mask,int val, | ||
102 | char *buf,unsigned int maxlen, | ||
103 | unsigned int *len); | ||
104 | |||
105 | #endif /* __PVRUSB2_CTRL_H */ | ||
106 | |||
107 | /* | ||
108 | Stuff for Emacs to see, in order to encourage consistent editing style: | ||
109 | *** Local Variables: *** | ||
110 | *** mode: c *** | ||
111 | *** fill-column: 75 *** | ||
112 | *** tab-width: 8 *** | ||
113 | *** c-basic-offset: 8 *** | ||
114 | *** End: *** | ||
115 | */ | ||