demux_ts.c: cleanup
[mplayer/glamo.git] / vidix / dhahelper / dhahelper.h
blobf7c5fa13c1b9c925b3cef9b328cb6c5a77e60a5f
1 /*
2 * Direct Hardware Access (DHA) kernel helper
4 * Copyright (C) 2002 Alex Beregszaszi <alex@fsn.hu>
6 * This file is part of MPlayer.
8 * MPlayer is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * MPlayer is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef MPLAYER_DHAHELPER_H
24 #define MPLAYER_DHAHELPER_H
26 #include <linux/ioctl.h>
28 /* feel free to change */
29 #define DEFAULT_MAJOR 180
31 #define API_VERSION 0x1
33 typedef struct dhahelper_port_s
35 #define PORT_OP_READ 1
36 #define PORT_OP_WRITE 2
37 int operation;
38 int size;
39 int addr;
40 int value;
41 } dhahelper_port_t;
43 typedef struct dhahelper_memory_s
45 #define MEMORY_OP_MAP 1
46 #define MEMORY_OP_UNMAP 2
47 int operation;
48 int start;
49 int offset;
50 int size;
51 int ret;
52 #define MEMORY_FLAG_NOCACHE 1
53 int flags;
54 } dhahelper_memory_t;
56 typedef struct dhahelper_mtrr_s
58 #define MTRR_OP_ADD 1
59 #define MTRR_OP_DEL 2
60 int operation;
61 int start;
62 int size;
63 int type;
64 } dhahelper_mtrr_t;
66 typedef struct dhahelper_pci_s
68 #define PCI_OP_READ 1
69 #define PCI_OP_WRITE 1
70 int operation;
71 int bus;
72 int dev;
73 int func;
74 int cmd;
75 int size;
76 int ret;
77 } dhahelper_pci_t;
79 #define DHAHELPER_GET_VERSION _IOW('D', 0, int)
80 #define DHAHELPER_PORT _IOWR('D', 1, dhahelper_port_t)
81 #define DHAHELPER_MEMORY _IOWR('D', 2, dhahelper_memory_t)
82 #define DHAHELPER_MTRR _IOWR('D', 3, dhahelper_mtrr_t)
83 #define DHAHELPER_PCI _IOWR('D', 4, dhahelper_pci_t)
85 #endif /* MPLAYER_DHAHELPER_H */