diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
commit | 1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch) | |
tree | 4495d23e7b54ab5700e3839081e797c1eafe0db9 /misc/samples/ddksample/ddksample.h | |
download | oss4-upstream.tar.gz |
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'misc/samples/ddksample/ddksample.h')
-rw-r--r-- | misc/samples/ddksample/ddksample.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/misc/samples/ddksample/ddksample.h b/misc/samples/ddksample/ddksample.h new file mode 100644 index 0000000..a0257f5 --- /dev/null +++ b/misc/samples/ddksample/ddksample.h @@ -0,0 +1,49 @@ +#ifndef _DDKSAMPLE_H +#define _DDKSAMPLE_H + +// Audio engine (port) control structure. + +#define MAX_SUBDEVICE 4 + +typedef struct +{ + int dev; + int open_mode; /* OPEN_READ | OPEN_WRITE */ + + int speed; + int channels; + int format, bits; + + int prepare_flags; + int audio_active; + + int timeout_value; + timeout_id_t timeout_id; + + int left_volume, right_volume; + int mute; +#define DDKSAMPLE_MAX_VOL 100 + + int left_peak, right_peak; +} ddksample_portc; + +// Device control structure +typedef struct +{ + oss_device_t *osdev; + kmutex_t mutex; + + int mixer_dev; + int mainvol_left, mainvol_right; + + int num_portc; + ddksample_portc portc[MAX_SUBDEVICE]; + int audio_open_count; /* Number of channels currently opened */ + +} ddksample_devc; + +extern int ddksample_mixer_init (ddksample_devc * devc); +extern int ddksample_audio_init (ddksample_devc * devc); +extern void ddksample_do_math (ddksample_portc * portc, void *buf, int len); + +#endif |