dm.h 1.2 KB

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