-
Notifications
You must be signed in to change notification settings - Fork 1
/
hx170dec.h
76 lines (66 loc) · 2.57 KB
/
hx170dec.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Decoder device driver (kernel module headers)
*
* Copyright (C) 2009 Hantro Products Oy.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: hx170dec.h,v $
-- $Date: 2009/12/22 12:10:59 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef _HX170DEC_H_
#define _HX170DEC_H_
#include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */
/*
* Macros to help debugging
*/
#undef PDEBUG /* undef it, just in case */
#ifdef HX170DEC_DEBUG
# ifdef __KERNEL__
/* This one if debugging is on, and kernel space */
# define PDEBUG(fmt, args...) printk( KERN_INFO "hx170dec: " fmt, ## args)
# else
/* This one for user space */
# define PDEBUG(fmt, args...) printf(__FILE__ ":%d: " fmt, __LINE__ , ## args)
# endif
#else
# define PDEBUG(fmt, args...) /* not debugging: nothing */
#endif
/*
* Ioctl definitions
*/
/* Use 'k' as magic number */
#define HX170DEC_IOC_MAGIC 'k'
/*
* S means "Set" through a ptr,
* T means "Tell" directly with the argument value
* G means "Get": reply by setting through a pointer
* Q means "Query": response is on the return value
* X means "eXchange": G and S atomically
* H means "sHift": T and Q atomically
*/
#define HX170DEC_PP_INSTANCE _IO(HX170DEC_IOC_MAGIC, 1) /* the client is pp instance */
#define HX170DEC_HW_PERFORMANCE _IO(HX170DEC_IOC_MAGIC, 2) /* decode/pp time for HW performance */
#define HX170DEC_IOCGHWOFFSET _IOR(HX170DEC_IOC_MAGIC, 3, unsigned long *)
#define HX170DEC_IOCGHWIOSIZE _IOR(HX170DEC_IOC_MAGIC, 4, unsigned int *)
#define HX170DEC_IOC_CLI _IO(HX170DEC_IOC_MAGIC, 5)
#define HX170DEC_IOC_STI _IO(HX170DEC_IOC_MAGIC, 6)
#define HX170DEC_IOC_MAXNR 6
#endif /* !_HX170DEC_H_ */