/* description of the set-up applies to either hard or soft settings */
typedefstruct { int format; /* AFMT_* */ int stereo; /* 0 = mono, 1 = stereo */ int size; /* 8/16 bit*/ int speed; /* speed */
} SETTINGS;
/* *Machinedefinitions
*/
typedefstruct { constchar *name; constchar *name2; struct module *owner; void *(*dma_alloc)(unsignedint, gfp_t); void (*dma_free)(void *, unsignedint); int (*irqinit)(void); void (*irqcleanup)(void); void (*init)(void); void (*silence)(void); int (*setFormat)(int); int (*setVolume)(int); int (*setBass)(int); int (*setTreble)(int); int (*setGain)(int); void (*play)(void); void (*record)(void); /* optional */ void (*mixer_init)(void); /* optional */ int (*mixer_ioctl)(u_int, u_long); /* optional */ int (*write_sq_setup)(void); /* optional */ int (*read_sq_setup)(void); /* optional */ int (*sq_open)(fmode_t); /* optional */ int (*state_info)(char *, size_t); /* optional */ void (*abort_read)(void); /* optional */ int min_dsp_speed; int max_dsp_speed; int version ; int hardware_afmts ; /* OSS says we only return h'ware info */ /* when queried via SNDCTL_DSP_GETFMTS */ int capabilities ; /* low-level reply to SNDCTL_DSP_GETCAPS */
SETTINGS default_hard ; /* open() or init() should set something valid */
SETTINGS default_soft ; /* you can make it look like old OSS, if you want to */
} MACHINE;
struct sound_settings {
MACHINE mach; /* machine dependent things */
SETTINGS hard; /* hardware settings */
SETTINGS soft; /* software settings */
SETTINGS dsp; /* /dev/dsp default settings */
TRANS *trans_write; /* supported translations */ int volume_left; /* volume (range is machine dependent) */ int volume_right; int bass; /* tone (range is machine dependent) */ int treble; int gain; int minDev; /* minor device number currently open */
spinlock_t lock;
};
struct sound_queue { /* buffers allocated for this queue */ int numBufs; /* real limits on what the user can have */ int bufSize; /* in bytes */ char **buffers;
/* current parameters */ int locked ; /* params cannot be modified when != 0 */ int user_frags ; /* user requests this many */ int user_frag_size ; /* of this size */ int max_count; /* actual # fragments <= numBufs */ int block_size; /* internal block size in bytes */ int max_active; /* in-use fragments <= max_count */
/* it shouldn't be necessary to declare any of these volatile */ int front, rear, count; int rear_size; /* *Theuseoftheplayingfielddependsonthehardware * *Atari,PMac:Thenumberofframesthatareloaded/playing * *Amiga:Bit0isset:aframeisloaded *Bit1isset:aframeisplaying
*/ int active;
wait_queue_head_t action_queue, open_queue, sync_queue; int non_blocking; int busy, syncing, xruns, died;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.