source: GPL/branches/uniaud32-next/lib32/soundoss.h@ 715

Last change on this file since 715 was 615, checked in by Paul Smedley, 5 years ago

Add source for uniaud32 based on code from linux kernel 5.4.86

File size: 2.6 KB
Line 
1#ifndef __SOUNDOSS_H__
2#define __SOUNDOSS_H__
3
4#define MAGIC_WAVE_ALSA32 0xABCDEF00
5#define MAGIC_MIXER_ALSA32 0xABCDEF01
6#define MAGIC_MIDI_ALSA32 0xABCDEF02
7
8#define MIXER_PLAYBACKVOLUME "Playback Volume"
9#define MIXER_VOLUME "Volume"
10#define MIXER_PLAYBACKSWITCH "Playback Switch"
11#define MIXER_SWITCH "Switch"
12#define MIXER_SOURCE "Source"
13#define MIXER_BOOST "Boost"
14#define MIXER_CAPTUREROUTE "Capture Route"
15#define MIXER_CAPTURESWITCH "Capture Switch"
16
17typedef struct {
18 int magic;
19 int doublesamplesize;
20 struct dentry d_entry;
21 struct inode inode;
22 struct file file;
23} soundhandle;
24
25typedef struct OpenedHandles {
26 USHORT FileId;
27 soundhandle *handle;
28 int reuse; /* reuse flag */
29} OpenedHandles;
30
31#define MIDISTATE_OPENED 1
32#define MIDISTATE_PORTCREATED 2
33#define MIDISTATE_SUBSCRIBED 4
34
35#define RECTYPE_SELECTOR 1 //input selector control
36#define RECTYPE_SWITCH 2 //switch for each record input
37
38typedef struct {
39 int magic;
40 int clientid;
41 int clientport;
42 int destclient;
43 int destport;
44 struct dentry d_entry;
45 struct inode inode;
46 struct file file;
47 int state;
48} midihandle;
49
50typedef struct {
51 int idxVolume; //Volume index in snd_ctl_elem_id_t array
52 int idxMute; //Mute index in snd_ctl_elem_id_t array
53 int idxCustom; //Custom index in snd_ctl_elem_id_t array (e.g. mic boost or recording gain)
54 int idxCaptureSwitch;//Route indexin snd_ctl_elem_id_t array (record selection)
55} mixcontrol;
56
57typedef struct {
58 int magic;
59 struct dentry d_entry;
60 struct inode inode;
61 struct file file;
62 ULONG reccaps;
63 int idxRecCaps[OSS32_MIX_RECSRC_MAX];
64 int rectype;
65 struct snd_ctl_card_info info; //mixer information
66 struct snd_ctl_elem_list list; //element list
67 struct snd_ctl_elem_id *pids; //array of mixer elements
68 mixcontrol controls[OSS_MIXER_NRDEVICES]; //array of standard mixer controls
69} mixerhandle;
70
71extern const struct file_operations *alsa_fops;
72extern int nrCardsDetected;
73
74OSSRET UNIXToOSSError(int unixerror);
75
76OSSRET OSS32_FMMidiLoadInstruments(OSSSTREAMID streamid);
77
78extern int ALSAToOSSDataType(ULONG ALSADataType);
79OSSRET ALSAToOSSRateFlags(ULONG fuRates);
80
81#endif //__SOUNDOSS_H__
82
Note: See TracBrowser for help on using the repository browser.