Merge svn changes up to r28310
[mplayer.git] / vidix / dhahelper / dhahelper.h
blob588cede54fa884c94e53e7ec7ca3a26c6ac542bc
1 /*
2 * Direct Hardware Access (DHA) kernel helper
4 * Copyright (C) 2002 Alex Beregszaszi <alex@fsn.hu>
5 * This file is part of MPlayer.
7 * MPlayer 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, or
10 * (at your option) any later version.
12 * MPlayer is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef MPLAYER_DHAHELPER_H
23 #define MPLAYER_DHAHELPER_H
25 #include <linux/ioctl.h>
27 /* feel free to change */
28 #define DEFAULT_MAJOR 180
30 #define API_VERSION 0x1
32 typedef struct dhahelper_port_s
34 #define PORT_OP_READ 1
35 #define PORT_OP_WRITE 2
36 int operation;
37 int size;
38 int addr;
39 int value;
40 } dhahelper_port_t;
42 typedef struct dhahelper_memory_s
44 #define MEMORY_OP_MAP 1
45 #define MEMORY_OP_UNMAP 2
46 int operation;
47 int start;
48 int offset;
49 int size;
50 int ret;
51 #define MEMORY_FLAG_NOCACHE 1
52 int flags;
53 } dhahelper_memory_t;
55 typedef struct dhahelper_mtrr_s
57 #define MTRR_OP_ADD 1
58 #define MTRR_OP_DEL 2
59 int operation;
60 int start;
61 int size;
62 int type;
63 } dhahelper_mtrr_t;
65 typedef struct dhahelper_pci_s
67 #define PCI_OP_READ 1
68 #define PCI_OP_WRITE 1
69 int operation;
70 int bus;
71 int dev;
72 int func;
73 int cmd;
74 int size;
75 int ret;
76 } dhahelper_pci_t;
78 #define DHAHELPER_GET_VERSION _IOW('D', 0, int)
79 #define DHAHELPER_PORT _IOWR('D', 1, dhahelper_port_t)
80 #define DHAHELPER_MEMORY _IOWR('D', 2, dhahelper_memory_t)
81 #define DHAHELPER_MTRR _IOWR('D', 3, dhahelper_mtrr_t)
82 #define DHAHELPER_PCI _IOWR('D', 4, dhahelper_pci_t)
84 #endif /* MPLAYER_DHAHELPER_H */