Mercurial > mplayer.hg
annotate vidix/dhahelper/dhahelper.h @ 29385:f9ae25067fe0
Fix 24bit audio playback.
The reordering channels code had reoccurring bug
where in switch(samplesize) block the
case 3 (3 bytes) doesn't end with break;
leading to execution of the next case 4 too.
This mangles the already processed data and
causes massive memory corruption.
author | iive |
---|---|
date | Sun, 19 Jul 2009 09:55:29 +0000 |
parents | ad17225e13b4 |
children | 892f4b4e1d5f |
rev | line source |
---|---|
26901
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
1 /* |
27006 | 2 * Direct Hardware Access (DHA) kernel helper |
3 * | |
4 * Copyright (C) 2002 Alex Beregszaszi <alex@fsn.hu> | |
5 * This file is part of MPlayer. | |
6 * | |
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. | |
11 * | |
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. | |
16 * | |
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. | |
20 */ | |
26901
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
21 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
22 #ifndef MPLAYER_DHAHELPER_H |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
23 #define MPLAYER_DHAHELPER_H |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
24 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
25 #include <linux/ioctl.h> |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
26 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
27 /* feel free to change */ |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
28 #define DEFAULT_MAJOR 180 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
29 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
30 #define API_VERSION 0x1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
31 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
32 typedef struct dhahelper_port_s |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
33 { |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
34 #define PORT_OP_READ 1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
35 #define PORT_OP_WRITE 2 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
36 int operation; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
37 int size; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
38 int addr; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
39 int value; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
40 } dhahelper_port_t; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
41 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
42 typedef struct dhahelper_memory_s |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
43 { |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
44 #define MEMORY_OP_MAP 1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
45 #define MEMORY_OP_UNMAP 2 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
46 int operation; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
47 int start; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
48 int offset; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
49 int size; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
50 int ret; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
51 #define MEMORY_FLAG_NOCACHE 1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
52 int flags; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
53 } dhahelper_memory_t; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
54 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
55 typedef struct dhahelper_mtrr_s |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
56 { |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
57 #define MTRR_OP_ADD 1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
58 #define MTRR_OP_DEL 2 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
59 int operation; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
60 int start; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
61 int size; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
62 int type; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
63 } dhahelper_mtrr_t; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
64 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
65 typedef struct dhahelper_pci_s |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
66 { |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
67 #define PCI_OP_READ 1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
68 #define PCI_OP_WRITE 1 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
69 int operation; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
70 int bus; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
71 int dev; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
72 int func; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
73 int cmd; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
74 int size; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
75 int ret; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
76 } dhahelper_pci_t; |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
77 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
78 #define DHAHELPER_GET_VERSION _IOW('D', 0, int) |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
79 #define DHAHELPER_PORT _IOWR('D', 1, dhahelper_port_t) |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
80 #define DHAHELPER_MEMORY _IOWR('D', 2, dhahelper_memory_t) |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
81 #define DHAHELPER_MTRR _IOWR('D', 3, dhahelper_mtrr_t) |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
82 #define DHAHELPER_PCI _IOWR('D', 4, dhahelper_pci_t) |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
83 |
af5408de478f
Rename kernelhelper to dhahelper, that name is more fitting.
diego
parents:
diff
changeset
|
84 #endif /* MPLAYER_DHAHELPER_H */ |