Date: Thu, 5 Apr 2007 16:57:02 GMT From: Ryan Beasley <ryanb@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 117442 for review Message-ID: <200704051657.l35Gv21S056024@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117442 Change 117442 by ryanb@ryanb_yuki on 2007/04/05 16:56:47 Incorporate changes from 4Front's sys/soundcard.h w/ minor adjustments to conform to style(9). Affected files ... .. //depot/projects/soundsystem/src/sys/sys/soundcard.h#2 edit Differences ... ==== //depot/projects/soundsystem/src/sys/sys/soundcard.h#2 (text+ko) ==== @@ -1639,66 +1639,80 @@ int openedmidi[8]; /* Bit mask telling which midi devices are busy */ int numcards; /* Number of sound cards in the system */ - int filler[241]; /* For future expansion (set to -1) */ + int numaudioengines; /* Number of audio engines in the system */ + int filler[240]; /* For future expansion (set to -1) */ } oss_sysinfo; -typedef struct oss_mixext -{ - int dev; /* Mixer device number */ - int ctrl; /* Controller number */ - int type; /* Entry type */ -# define MIXT_DEVROOT 0 /* Device root entry */ -# define MIXT_GROUP 1 /* Controller group */ -# define MIXT_ONOFF 2 /* OFF (0) or ON (1) */ -# define MIXT_ENUM 3 /* Enumerated (0 to maxvalue) */ -# define MIXT_MONOSLIDER 4 /* Mono slider (0 to 100) */ -# define MIXT_STEREOSLIDER 5 /* Stereo slider (dual 0 to 100) */ -# define MIXT_MESSAGE 6 /* (Readable) textual message */ -# define MIXT_MONOVU 7 /* VU meter value (mono) */ -# define MIXT_STEREOVU 8 /* VU meter value (stereo) */ -# define MIXT_MONOPEAK 9 /* VU meter peak value (mono) */ -# define MIXT_STEREOPEAK 10 /* VU meter peak value (stereo) */ -# define MIXT_RADIOGROUP 11 /* Radio button group */ -# define MIXT_MARKER 12 /* Separator between normal and extension entries */ -# define MIXT_VALUE 13 /* Decimal value entry */ -# define MIXT_HEXVALUE 14 /* Hexadecimal value entry */ -# define MIXT_MONODB 15 /* Mono atten. slider (0 to -144) */ -# define MIXT_STEREODB 16 /* Stereo atten. slider (dual 0 to -144) */ -# define MIXT_SLIDER 17 /* Slider (mono) with full integer range */ -# define MIXT_3D 18 +typedef struct oss_mixext { + int dev; /* Mixer device number */ + int ctrl; /* Controller number */ + int type; /* Entry type */ +#define MIXT_DEVROOT 0 /* Device root entry */ +#define MIXT_GROUP 1 /* Controller group */ +#define MIXT_ONOFF 2 /* OFF (0) or ON (1) */ +#define MIXT_ENUM 3 /* Enumerated (0 to maxvalue) */ +#define MIXT_MONOSLIDER 4 /* Mono slider (0 to 255) */ +#define MIXT_STEREOSLIDER 5 /* Stereo slider (dual 0 to 255) */ +#define MIXT_MESSAGE 6 /* (Readable) textual message */ +#define MIXT_MONOVU 7 /* VU meter value (mono) */ +#define MIXT_STEREOVU 8 /* VU meter value (stereo) */ +#define MIXT_MONOPEAK 9 /* VU meter peak value (mono) */ +#define MIXT_STEREOPEAK 10 /* VU meter peak value (stereo) */ +#define MIXT_RADIOGROUP 11 /* Radio button group */ +#define MIXT_MARKER 12 /* Separator between normal and extension + entries */ +#define MIXT_VALUE 13 /* Decimal value entry */ +#define MIXT_HEXVALUE 14 /* Hexadecimal value entry */ +#define MIXT_MONODB 15 /* OBSOLETE */ +#define MIXT_STEREODB 16 /* OBSOLETE */ +#define MIXT_SLIDER 17 /* Slider (mono) with full (31 bit) positive + integer range */ +#define MIXT_3D 18 + +/* + * Sliders with range expanded to 15 bits per channel (0-32767) + */ +#define MIXT_MONOSLIDER16 19 +#define MIXT_STEREOSLIDER16 20 + + /* Possible value range (minvalue to maxvalue) */ + /* Note that maxvalue may also be smaller than minvalue */ + int maxvalue; + int minvalue; - /* Possible value range (minvalue to maxvalue) */ - /* Note that maxvalue may also be smaller than minvalue */ - int maxvalue; - int minvalue; + int flags; +#define MIXF_READABLE 0x00000001 /* Has readable value */ +#define MIXF_WRITEABLE 0x00000002 /* Has writeable value */ +#define MIXF_POLL 0x00000004 /* May change itself */ +#define MIXF_HZ 0x00000008 /* Herz scale */ +#define MIXF_STRING 0x00000010 /* Use dynamic extensions for value */ +#define MIXF_DYNAMIC 0x00000010 /* Supports dynamic extensions */ +#define MIXF_OKFAIL 0x00000020 /* Interpret value as 1=OK, 0=FAIL */ +#define MIXF_FLAT 0x00000040 /* Flat vertical space requirements */ +#define MIXF_LEGACY 0x00000080 /* Legacy mixer control group */ +#define MIXF_CENTIBEL 0x00000100 /* Centibel (0.1 dB) step size */ +#define MIXF_DECIBEL 0x00000200 /* Step size of 1 dB */ +#define MIXF_MAINVOL 0x00000400 /* Main volume control */ +#define MIXF_PCMVOL 0x00000800 /* PCM output volume control */ +#define MIXF_RECVOL 0x00001000 /* PCM recording volume control */ - int flags; -# define MIXF_READABLE 0x00000001 /* Has readable value */ -# define MIXF_WRITEABLE 0x00000002 /* Has writeable value */ -# define MIXF_POLL 0x00000004 /* May change itself */ -# define MIXF_HZ 0x00000008 /* Herz scale */ -# define MIXF_STRING 0x00000010 /* Use dynamic extensions for value */ -# define MIXF_DYNAMIC 0x00000010 /* Supports dynamic extensions */ -# define MIXF_OKFAIL 0x00000020 /* Interpret value as 1=OK, 0=FAIL */ -# define MIXF_FLAT 0x00000040 /* Flat vertical space requirements */ -# define MIXF_LEGACY 0x00000080 /* Legacy mixer control group */ - char id[16]; /* Mnemonic ID (mainly for internal use) */ - int parent; /* Entry# of parent (group) node (-1 if root) */ + char id[16]; /* Mnemonic ID (mainly for internal use) */ + int parent; /* Entry# of parent (group) node (-1 if root) */ - int dummy; /* Internal use */ + int dummy; /* Internal use */ - int timestamp; + int timestamp; - char data[64]; /* Misc data (entry type dependent) */ - unsigned char enum_present[32]; /* Mask of allowed enum values */ - int control_no; /* SOUND_MIXER_VOLUME..SOUND_MIXER_MIDI */ - /* (-1 means not indicated) */ + char data[64]; /* Misc data (entry type dependent) */ + unsigned char enum_present[32]; /* Mask of allowed enum values */ + int control_no; /* SOUND_MIXER_VOLUME..SOUND_MIXER_MIDI */ + /* (-1 means not indicated) */ -/* - * The desc field is reserved for internal purposes of OSS. It should not be - * used by applications. - */ - unsigned int desc; + /* + * The desc field is reserved for internal purposes of OSS. It should + * not be used by applications. + */ + unsigned int desc; #define MIXEXT_SCOPE_MASK 0x0000003f #define MIXEXT_SCOPE_OTHER 0x00000000 #define MIXEXT_SCOPE_INPUT 0x00000001 @@ -1706,25 +1720,23 @@ #define MIXEXT_SCOPE_MONITOR 0x00000003 #define MIXEXT_SCOPE_RECSWITCH 0x00000004 - char extname[32]; - int update_counter; - int filler[7]; + char extname[32]; + int update_counter; + int filler[7]; } oss_mixext; -typedef struct oss_mixext_root -{ - char id[16]; - char name[48]; +typedef struct oss_mixext_root { + char id[16]; + char name[48]; } oss_mixext_root; -typedef struct oss_mixer_value -{ - int dev; - int ctrl; - int value; - int flags; /* Reserved for future use. Initialize to 0 */ - int timestamp; /* Must be set to oss_mixext.timestamp */ - int filler[8]; /* Reserved for future use. Initialize to 0 */ +typedef struct oss_mixer_value { + int dev; + int ctrl; + int value; + int flags; /* Reserved for future use. Initialize to 0 */ + int timestamp; /* Must be set to oss_mixext.timestamp */ + int filler[8]; /* Reserved for future use. Initialize to 0 */ } oss_mixer_value; #define OSS_ENUM_MAXVALUE 255 @@ -1754,7 +1766,7 @@ char name[64]; int busy; /* 0, OPEN_READ, OPEN_WRITE or OPEN_READWRITE */ int pid; - int caps; /* DSP_CAP_INPUT, DSP_CAP_OUTPUT */ + int caps; /* PCM_CAP_INPUT, PCM_CAP_OUTPUT */ int iformats; int oformats; int magic; /* Reserved for internal use */ @@ -1762,11 +1774,9 @@ int card_number; int port_number; int mixer_dev; - int real_device; /* Obsolete field. Replaced by devnode */ - int enabled; /* 1=enabled, 0=device not ready at this - moment */ - int flags; /* For internal use only - no practical - meaning */ + int legacy_device; /* Obsolete field. Replaced by devnode */ + int enabled; /* 1=enabled, 0=device not ready at this moment */ + int flags; /* For internal use only - no practical meaning */ int min_rate; /* Sample rate limits */ int max_rate; int min_channels; /* Number of channels supported */ @@ -1780,75 +1790,84 @@ oss_longname_t song_name; /* Song name (if given) */ oss_label_t label; /* Device label (if given) */ int latency; /* In usecs, -1=unknown */ - oss_devnode_t devnode; /* Device special file name (inside - /dev) */ - int filler[186]; + oss_devnode_t devnode; /* Device special file name (absolute path) */ + int next_play_engine; /* Read the documentation for more info */ + int next_rec_engine; /* Read the documentation for more info */ + int filler[184]; } oss_audioinfo; -typedef struct oss_mixerinfo -{ - int dev; - char id[16]; - char name[32]; - int modify_counter; - int card_number; - int port_number; - char handle[32]; - int magic; /* Reserved */ - int enabled; /* Reserved */ - int caps; -#define MIXER_CAP_VIRTUAL 0x00000001 - int flags; /* Reserved */ - int nrext; - /* - * The priority field can be used to select the default (motherboard) - * mixer device. The mixer with the highest priority is the - * most preferred one. -2 or less means that this device cannot be used - * as the default mixer. - */ - int priority; - int filler[254]; /* Reserved */ +typedef struct oss_mixerinfo { + int dev; + char id [16]; + char name[32]; + int modify_counter; + int card_number; + int port_number; + char handle[32]; + int magic; /* Reserved */ + int enabled; /* Reserved */ + int caps; +#define MIXER_CAP_VIRTUAL 0x00000001 +#define MIXER_CAP_LAYOUT_B 0x00000002 /* For internal use only */ +#define MIXER_CAP_NARROW 0x00000004 /* Conserve horiz space */ + int flags; /* Reserved */ + int nrext; + /* + * The priority field can be used to select the default (motherboard) + * mixer device. The mixer with the highest priority is the most + * preferred one. -2 or less means that this device cannot be used as + * the default mixer. + */ + int priority; + oss_devnode_t devnode; /* Device special file name (absolute path) */ + int legacy_device; + int filler[245]; /* Reserved */ } oss_mixerinfo; -typedef struct oss_midi_info -{ - int dev; /* Midi device number */ - char name[64]; - int busy; /* 0, OPEN_READ, OPEN_WRITE or OPEN_READWRITE */ - int pid; - char cmd[64]; /* Command using the device (if known) */ - int caps; +typedef struct oss_midi_info { + int dev; /* Midi device number */ + char name[64]; + int busy; /* 0, OPEN_READ, OPEN_WRITE or OPEN_READWRITE */ + int pid; + char cmd[64]; /* Command using the device (if known) */ + int caps; #define MIDI_CAP_MPU401 0x00000001 /**** OBSOLETE ****/ #define MIDI_CAP_INPUT 0x00000002 #define MIDI_CAP_OUTPUT 0x00000004 #define MIDI_CAP_INOUT (MIDI_CAP_INPUT|MIDI_CAP_OUTPUT) #define MIDI_CAP_VIRTUAL 0x00000008 /* Pseudo device */ -#define MIDI_CAP_MTCINPUT 0x00000010 /* Supports SNDCTL_MIDI_MTCINPUT */ +#define MIDI_CAP_MTCINPUT 0x00000010 /* Supports + * SNDCTL_MIDI_MTCINPUT */ #define MIDI_CAP_CLIENT 0x00000020 /* Virtual client side device */ #define MIDI_CAP_SERVER 0x00000040 /* Virtual server side device */ #define MIDI_CAP_INTERNAL 0x00000080 /* Internal (synth) device */ -#define MIDI_CAP_EXTERNAL 0x00000100 /* external (MIDI port) device */ -#define MIDI_CAP_PTOP 0x00000200 /* Point to point link to one device */ +#define MIDI_CAP_EXTERNAL 0x00000100 /* external (MIDI port) + * device */ +#define MIDI_CAP_PTOP 0x00000200 /* Point to point link to one + * device */ #define MIDI_CAP_MTC 0x00000400 /* MTC/SMPTE (control) device */ - int magic; /* Reserved for internal use */ - int card_number; - int port_number; - int enabled; /* 1=enabled, 0=device not ready at this moment */ - int flags; /* For internal use only - no practical meaning */ - char handle[32]; - oss_longname_t song_name; /* Song name (if known) */ - oss_label_t label; /* Device label (if given) */ - int latency; /* In usecs, -1=unknown */ - int filler[244]; + int magic; /* Reserved for internal use */ + int card_number; + int port_number; + int enabled; /* 1=enabled, 0=device not ready at this + * moment */ + int flags; /* For internal use only - no practical + * meaning */ + char handle[32]; + oss_longname_t song_name; /* Song name (if known) */ + oss_label_t label; /* Device label (if given) */ + int latency; /* In usecs, -1=unknown */ + oss_devnode_t devnode; /* Device special file name (absolute path) */ + int legacy_device; + int filler[235]; } oss_midi_info; -typedef struct oss_card_info -{ - int card; - char shortname[16]; - char longname[128]; - int flags; - int filler[256]; +typedef struct oss_card_info { + int card; + char shortname[16]; + char longname[128]; + int flags; + int filler[256]; } oss_card_info; #define SNDCTL_SYSINFO _IOR ('X', 1, oss_sysinfo) @@ -1865,6 +1884,10 @@ #define SNDCTL_MIDIINFO _IOWR('X', 9, oss_midi_info) #define SNDCTL_MIXERINFO _IOWR('X',10, oss_mixerinfo) #define SNDCTL_CARDINFO _IOWR('X',11, oss_card_info) +#define SNDCTL_ENGINEINFO _IOWR('X',12, oss_audioinfo) +#define SNDCTL_AUDIOINFO_EX _IOWR('X',13, oss_audioinfo) + +/* ioctl codes 'X', 200-255 are reserved for internal (4Front) use */ /* * Few more "globally" available ioctl calls.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704051657.l35Gv21S056024>