Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pvrusb2-context.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2005 Mike Isely <[email protected]>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 #ifndef __PVRUSB2_CONTEXT_H
20 #define __PVRUSB2_CONTEXT_H
21 
22 #include <linux/mutex.h>
23 #include <linux/usb.h>
24 #include <linux/workqueue.h>
25 
26 struct pvr2_hdw; /* hardware interface - defined elsewhere */
27 struct pvr2_stream; /* stream interface - defined elsewhere */
28 
29 struct pvr2_context; /* All central state */
30 struct pvr2_channel; /* One I/O pathway to a user */
31 struct pvr2_context_stream; /* Wrapper for a stream */
32 struct pvr2_ioread; /* Low level stream structure */
33 
35  struct pvr2_channel *user;
37 };
38 
39 struct pvr2_context {
46  struct pvr2_hdw *hdw;
48  struct mutex mutex;
52 
53  /* Called after pvr2_context initialization is complete */
55 
56 };
57 
58 struct pvr2_channel {
63  struct pvr2_hdw *hdw;
64  unsigned int input_mask;
66 };
67 
69  const struct usb_device_id *devid,
70  void (*setup_func)(struct pvr2_context *));
72 
73 void pvr2_channel_init(struct pvr2_channel *,struct pvr2_context *);
74 void pvr2_channel_done(struct pvr2_channel *);
75 int pvr2_channel_limit_inputs(struct pvr2_channel *,unsigned int);
76 unsigned int pvr2_channel_get_limited_inputs(struct pvr2_channel *);
78  struct pvr2_context_stream *);
80  struct pvr2_context_stream *);
81 
82 int pvr2_context_global_init(void);
83 void pvr2_context_global_done(void);
84 
85 #endif /* __PVRUSB2_CONTEXT_H */
86 /*
87  Stuff for Emacs to see, in order to encourage consistent editing style:
88  *** Local Variables: ***
89  *** mode: c ***
90  *** fill-column: 75 ***
91  *** tab-width: 8 ***
92  *** c-basic-offset: 8 ***
93  *** End: ***
94  */