Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _DRIVERS_SOUND_DM_H |
| 2 | #define _DRIVERS_SOUND_DM_H |
| 3 | |
| 4 | /* |
| 5 | * Definitions of the 'direct midi sound' interface used |
| 6 | * by the newer commercial OSS package. We should export |
| 7 | * this to userland somewhere in glibc later. |
| 8 | */ |
| 9 | |
| 10 | /* |
| 11 | * Data structure composing an FM "note" or sound event. |
| 12 | */ |
| 13 | |
| 14 | struct dm_fm_voice |
| 15 | { |
| 16 | u8 op; |
| 17 | u8 voice; |
| 18 | u8 am; |
| 19 | u8 vibrato; |
| 20 | u8 do_sustain; |
| 21 | u8 kbd_scale; |
| 22 | u8 harmonic; |
| 23 | u8 scale_level; |
| 24 | u8 volume; |
| 25 | u8 attack; |
| 26 | u8 decay; |
| 27 | u8 sustain; |
| 28 | u8 release; |
| 29 | u8 feedback; |
| 30 | u8 connection; |
| 31 | u8 left; |
| 32 | u8 right; |
| 33 | u8 waveform; |
| 34 | }; |
| 35 | |
| 36 | /* |
| 37 | * This describes an FM note by its voice, octave, frequency number (10bit) |
| 38 | * and key on/off. |
| 39 | */ |
| 40 | |
| 41 | struct dm_fm_note |
| 42 | { |
| 43 | u8 voice; |
| 44 | u8 octave; |
| 45 | u32 fnum; |
| 46 | u8 key_on; |
| 47 | }; |
| 48 | |
| 49 | /* |
| 50 | * FM parameters that apply globally to all voices, and thus are not "notes" |
| 51 | */ |
| 52 | |
| 53 | struct dm_fm_params |
| 54 | { |
| 55 | u8 am_depth; |
| 56 | u8 vib_depth; |
| 57 | u8 kbd_split; |
| 58 | u8 rhythm; |
| 59 | |
| 60 | /* This block is the percussion instrument data */ |
| 61 | u8 bass; |
| 62 | u8 snare; |
| 63 | u8 tomtom; |
| 64 | u8 cymbal; |
| 65 | u8 hihat; |
| 66 | }; |
| 67 | |
| 68 | /* |
| 69 | * FM mode ioctl settings |
| 70 | */ |
| 71 | |
| 72 | #define FM_IOCTL_RESET 0x20 |
| 73 | #define FM_IOCTL_PLAY_NOTE 0x21 |
| 74 | #define FM_IOCTL_SET_VOICE 0x22 |
| 75 | #define FM_IOCTL_SET_PARAMS 0x23 |
| 76 | #define FM_IOCTL_SET_MODE 0x24 |
| 77 | #define FM_IOCTL_SET_OPL 0x25 |
| 78 | |
| 79 | #endif |