aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/emu10k1/voicemgr.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /sound/oss/emu10k1/voicemgr.h
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'sound/oss/emu10k1/voicemgr.h')
-rw-r--r--sound/oss/emu10k1/voicemgr.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/sound/oss/emu10k1/voicemgr.h b/sound/oss/emu10k1/voicemgr.h
new file mode 100644
index 00000000000..099a8cb7f2c
--- /dev/null
+++ b/sound/oss/emu10k1/voicemgr.h
@@ -0,0 +1,103 @@
1/*
2 **********************************************************************
3 * sblive_voice.h -- EMU Voice Resource Manager header file
4 * Copyright 1999, 2000 Creative Labs, Inc.
5 *
6 **********************************************************************
7 *
8 * Date Author Summary of changes
9 * ---- ------ ------------------
10 * October 20, 1999 Bertrand Lee base code release
11 *
12 **********************************************************************
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public
25 * License along with this program; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
27 * USA.
28 *
29 **********************************************************************
30 */
31
32#ifndef _VOICEMGR_H
33#define _VOICEMGR_H
34
35#include "hwaccess.h"
36
37/* struct emu_voice.usage flags */
38#define VOICE_USAGE_FREE 0x01
39#define VOICE_USAGE_MIDI 0x02
40#define VOICE_USAGE_PLAYBACK 0x04
41
42/* struct emu_voice.flags flags */
43#define VOICE_FLAGS_STEREO 0x02
44#define VOICE_FLAGS_16BIT 0x04
45
46struct voice_param
47{
48 /* FX bus amount send */
49
50 u32 send_routing;
51 // audigy only:
52 u32 send_routing2;
53
54 u32 send_dcba;
55 // audigy only:
56 u32 send_hgfe;
57
58
59 u32 initial_fc;
60 u32 fc_target;
61
62 u32 initial_attn;
63 u32 volume_target;
64
65 u32 byampl_env_sustain;
66 u32 byampl_env_decay;
67};
68
69struct voice_mem {
70 int emupageindex;
71 void *addr[BUFMAXPAGES];
72 dma_addr_t dma_handle[BUFMAXPAGES];
73 u32 pages;
74};
75
76struct emu_voice
77{
78 struct emu10k1_card *card;
79 u8 usage; /* Free, MIDI, playback */
80 u8 num; /* Voice ID */
81 u8 flags; /* Stereo/mono, 8/16 bit */
82
83 u32 startloop;
84 u32 endloop;
85 u32 start;
86
87 u32 initial_pitch;
88 u32 pitch_target;
89
90 struct voice_param params[2];
91
92 struct voice_mem mem;
93};
94
95int emu10k1_voice_alloc_buffer(struct emu10k1_card *, struct voice_mem *, u32);
96void emu10k1_voice_free_buffer(struct emu10k1_card *, struct voice_mem *);
97int emu10k1_voice_alloc(struct emu10k1_card *, struct emu_voice *);
98void emu10k1_voice_free(struct emu_voice *);
99void emu10k1_voice_playback_setup(struct emu_voice *);
100void emu10k1_voices_start(struct emu_voice *, unsigned int, int);
101void emu10k1_voices_stop(struct emu_voice *, int);
102
103#endif /* _VOICEMGR_H */