[18] | 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 |
|
---|
| 17 | typedef struct {
|
---|
| 18 | int magic;
|
---|
| 19 | int doublesamplesize;
|
---|
| 20 | struct dentry d_entry;
|
---|
| 21 | struct inode inode;
|
---|
| 22 | struct file file;
|
---|
| 23 | } soundhandle;
|
---|
| 24 |
|
---|
| 25 | typedef 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 |
|
---|
| 38 | typedef 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 |
|
---|
| 50 | typedef 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 |
|
---|
| 57 | typedef 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 | snd_ctl_card_info_t info; //mixer information
|
---|
| 66 | snd_ctl_elem_list_t list; //element list
|
---|
| 67 | snd_ctl_elem_id_t *pids; //array of mixer elements
|
---|
| 68 | mixcontrol controls[OSS_MIXER_NRDEVICES]; //array of standard mixer controls
|
---|
| 69 | } mixerhandle;
|
---|
| 70 |
|
---|
| 71 | extern struct file_operations *alsa_fops;
|
---|
| 72 | extern int nrCardsDetected;
|
---|
| 73 |
|
---|
| 74 | OSSRET UNIXToOSSError(int unixerror);
|
---|
| 75 |
|
---|
| 76 | OSSRET OSS32_FMMidiLoadInstruments(OSSSTREAMID streamid);
|
---|
| 77 |
|
---|
| 78 | #endif //__SOUNDOSS_H__
|
---|
| 79 |
|
---|