thermal: rockchip: add rk3328 support
[firefly-linux-kernel-4.4.55.git] / drivers / cmmb / cmmb_memory.h
1 #ifndef _CMMB_AV_MEMORY_H_\r
2 #define _CMMB_AV_MEMORY_H_\r
3 \r
4 #include <linux/module.h>\r
5 #include <linux/interrupt.h>\r
6 //#include <asm/semaphore.h>\r
7 #include <linux/mutex.h>\r
8 #include "cmmb_ringbuffer.h"\r
9 \r
10 \r
11 #define   CMMB_MEMO_WRITE          (0x80000001)\r
12 #define   CMMB_MEMO_READ           (0x80000002)\r
13 #define   CMMB_MEMO_FLUSH_ONE      (0x80000003)\r
14 #define   CMMB_MEMO_FLUSH_ALL      (0x80000004)\r
15 #define   CMMB_MEMO_INIT           (0x80000005)\r
16 #define   CMMB_SET_VIDEO_TYPE      (0x80000006)\r
17 #define   CMMB_SET_AUDIO_TYPE      (0x80000007)\r
18 #define   CMMB_SET_AUDIO_SAMPLE    (0x80000008)\r
19 #define   CMMB_GET_VIDEO_TYPE      (0x80000009)\r
20 #define   CMMB_GET_AUDIO_TYPE      (0x8000000a)\r
21 #define   CMMB_GET_AUDIO_SAMPLE    (0x8000000b)\r
22 #define   CMMB_GET_BUFF_FREE       (0x8000000c)\r
23 #define   CMMB_GET_BUFF_AVAIL      (0x8000000d)\r
24 \r
25 \r
26 struct cmmb_memory\r
27 {\r
28     int  w_datatype;\r
29     int  r_datatype;\r
30     unsigned long  videotype;\r
31     unsigned long  audiotype;\r
32     unsigned long  audiosample;\r
33     int usr;\r
34 \r
35     struct device *device;\r
36     struct file_operations* fops;\r
37     struct dvb_ringbuffer  buffer_Video;\r
38     struct dvb_ringbuffer  buffer_Audio;\r
39     struct dvb_ringbuffer  buffer_Data;\r
40     u8 *video_buf; \r
41     u8 *audio_buf; \r
42     u8 *data_buf; \r
43     \r
44     #define  CMMB_VIDEO_TYPE     0\r
45     #define  CMMB_AUDIO_TYPE     1\r
46     #define  CMMB_DATA_TYPE      2\r
47     #define  CMMB_NULL_TYPE      3\r
48     \r
49     #define CMMB_VIDEO_BUFFER_SIZE (512*1024)\r
50     #define CMMB_AUDIO_BUFFER_SIZE (64*1024)\r
51     #define CMMB_DATA_BUFFER_SIZE  (1*1024)\r
52 \r
53         struct mutex mutex;\r
54     //struct semaphore sem;\r
55         spinlock_t lock;\r
56     wait_queue_head_t rqueue;\r
57     void* priv;\r
58 };\r
59 \r
60 \r
61 \r
62 #endif/*_CMMBMEMORY_H_*/\r
63 \r
64 \r