aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm_oss.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/pcm_oss.h')
-rw-r--r--include/sound/pcm_oss.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h
new file mode 100644
index 000000000000..518728536bc6
--- /dev/null
+++ b/include/sound/pcm_oss.h
@@ -0,0 +1,87 @@
1#ifndef __SOUND_PCM_OSS_H
2#define __SOUND_PCM_OSS_H
3
4/*
5 * Digital Audio (PCM) - OSS compatibility abstract layer
6 * Copyright (c) by Jaroslav Kysela <perex@suse.cz>
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25typedef struct _snd_pcm_plugin snd_pcm_plugin_t;
26typedef struct _snd_pcm_oss_setup snd_pcm_oss_setup_t;
27
28struct _snd_pcm_oss_setup {
29 char *task_name;
30 unsigned int disable:1,
31 direct:1,
32 block:1,
33 nonblock:1,
34 partialfrag:1,
35 nosilence:1;
36 unsigned int periods;
37 unsigned int period_size;
38 snd_pcm_oss_setup_t *next;
39};
40
41typedef struct _snd_pcm_oss_runtime {
42 unsigned params: 1, /* format/parameter change */
43 prepare: 1, /* need to prepare the operation */
44 trigger: 1, /* trigger flag */
45 sync_trigger: 1; /* sync trigger flag */
46 int rate; /* requested rate */
47 int format; /* requested OSS format */
48 unsigned int channels; /* requested channels */
49 unsigned int fragshift;
50 unsigned int maxfrags;
51 unsigned int subdivision; /* requested subdivision */
52 size_t period_bytes; /* requested period size */
53 size_t period_frames; /* period frames for poll */
54 size_t period_ptr; /* actual write pointer to period */
55 unsigned int periods;
56 size_t buffer_bytes; /* requested buffer size */
57 size_t bytes; /* total # bytes processed */
58 size_t mmap_bytes;
59 char *buffer; /* vmallocated period */
60 size_t buffer_used; /* used length from period buffer */
61 snd_pcm_plugin_t *plugin_first;
62 snd_pcm_plugin_t *plugin_last;
63 unsigned int prev_hw_ptr_interrupt;
64} snd_pcm_oss_runtime_t;
65
66typedef struct _snd_pcm_oss_file {
67 snd_pcm_substream_t *streams[2];
68} snd_pcm_oss_file_t;
69
70typedef struct _snd_pcm_oss_substream {
71 unsigned oss: 1; /* oss mode */
72 snd_pcm_oss_setup_t *setup; /* active setup */
73 snd_pcm_oss_file_t *file;
74} snd_pcm_oss_substream_t;
75
76typedef struct _snd_pcm_oss_stream {
77 snd_pcm_oss_setup_t *setup_list; /* setup list */
78 struct semaphore setup_mutex;
79 snd_info_entry_t *proc_entry;
80} snd_pcm_oss_stream_t;
81
82typedef struct _snd_pcm_oss {
83 int reg;
84 unsigned int reg_mask;
85} snd_pcm_oss_t;
86
87#endif /* __SOUND_PCM_OSS_H */