minors.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef __SOUND_MINORS_H
  2. #define __SOUND_MINORS_H
  3. /*
  4. * MINOR numbers
  5. *
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. *
  21. */
  22. #define SNDRV_MINOR_DEVICES 32
  23. #define SNDRV_MINOR_CARD(minor) ((minor) >> 5)
  24. #define SNDRV_MINOR_DEVICE(minor) ((minor) & 0x001f)
  25. #define SNDRV_MINOR(card, dev) (((card) << 5) | (dev))
  26. #define SNDRV_MINOR_CONTROL 0 /* 0 - 0 */
  27. #define SNDRV_MINOR_SEQUENCER 1
  28. #define SNDRV_MINOR_TIMER (1+32)
  29. #define SNDRV_MINOR_HWDEP 4 /* 4 - 7 */
  30. #define SNDRV_MINOR_HWDEPS 4
  31. #define SNDRV_MINOR_RAWMIDI 8 /* 8 - 15 */
  32. #define SNDRV_MINOR_RAWMIDIS 8
  33. #define SNDRV_MINOR_PCM_PLAYBACK 16 /* 16 - 23 */
  34. #define SNDRV_MINOR_PCM_CAPTURE 24 /* 24 - 31 */
  35. #define SNDRV_MINOR_PCMS 8
  36. #define SNDRV_DEVICE_TYPE_CONTROL SNDRV_MINOR_CONTROL
  37. #define SNDRV_DEVICE_TYPE_HWDEP SNDRV_MINOR_HWDEP
  38. #define SNDRV_DEVICE_TYPE_MIXER SNDRV_MINOR_MIXER
  39. #define SNDRV_DEVICE_TYPE_RAWMIDI SNDRV_MINOR_RAWMIDI
  40. #define SNDRV_DEVICE_TYPE_PCM_PLAYBACK SNDRV_MINOR_PCM_PLAYBACK
  41. #define SNDRV_DEVICE_TYPE_PCM_PLOOP SNDRV_MINOR_PCM_PLOOP
  42. #define SNDRV_DEVICE_TYPE_PCM_CAPTURE SNDRV_MINOR_PCM_CAPTURE
  43. #define SNDRV_DEVICE_TYPE_PCM_CLOOP SNDRV_MINOR_PCM_CLOOP
  44. #define SNDRV_DEVICE_TYPE_SEQUENCER SNDRV_MINOR_SEQUENCER
  45. #define SNDRV_DEVICE_TYPE_TIMER SNDRV_MINOR_TIMER
  46. #ifdef CONFIG_SND_OSSEMUL
  47. #define SNDRV_MINOR_OSS_DEVICES 16
  48. #define SNDRV_MINOR_OSS_CARD(minor) ((minor) >> 4)
  49. #define SNDRV_MINOR_OSS_DEVICE(minor) ((minor) & 0x000f)
  50. #define SNDRV_MINOR_OSS(card, dev) (((card) << 4) | (dev))
  51. #define SNDRV_MINOR_OSS_MIXER 0 /* /dev/mixer - OSS 3.XX compatible */
  52. #define SNDRV_MINOR_OSS_SEQUENCER 1 /* /dev/sequencer - OSS 3.XX compatible */
  53. #define SNDRV_MINOR_OSS_MIDI 2 /* /dev/midi - native midi interface - OSS 3.XX compatible - UART */
  54. #define SNDRV_MINOR_OSS_PCM 3 /* alias */
  55. #define SNDRV_MINOR_OSS_PCM_8 3 /* /dev/dsp - 8bit PCM - OSS 3.XX compatible */
  56. #define SNDRV_MINOR_OSS_AUDIO 4 /* /dev/audio - SunSparc compatible */
  57. #define SNDRV_MINOR_OSS_PCM_16 5 /* /dev/dsp16 - 16bit PCM - OSS 3.XX compatible */
  58. #define SNDRV_MINOR_OSS_SNDSTAT 6 /* /dev/sndstat - for compatibility with OSS */
  59. #define SNDRV_MINOR_OSS_RESERVED7 7 /* reserved for future use */
  60. #define SNDRV_MINOR_OSS_MUSIC 8 /* /dev/music - OSS 3.XX compatible */
  61. #define SNDRV_MINOR_OSS_DMMIDI 9 /* /dev/dmmidi0 - this device can have another minor # with OSS */
  62. #define SNDRV_MINOR_OSS_DMFM 10 /* /dev/dmfm0 - this device can have another minor # with OSS */
  63. #define SNDRV_MINOR_OSS_MIXER1 11 /* alternate mixer */
  64. #define SNDRV_MINOR_OSS_PCM1 12 /* alternate PCM (GF-A-1) */
  65. #define SNDRV_MINOR_OSS_MIDI1 13 /* alternate midi - SYNTH */
  66. #define SNDRV_MINOR_OSS_DMMIDI1 14 /* alternate dmmidi - SYNTH */
  67. #define SNDRV_MINOR_OSS_RESERVED15 15 /* reserved for future use */
  68. #define SNDRV_OSS_DEVICE_TYPE_MIXER 0
  69. #define SNDRV_OSS_DEVICE_TYPE_SEQUENCER 1
  70. #define SNDRV_OSS_DEVICE_TYPE_PCM 2
  71. #define SNDRV_OSS_DEVICE_TYPE_MIDI 3
  72. #define SNDRV_OSS_DEVICE_TYPE_DMFM 4
  73. #define SNDRV_OSS_DEVICE_TYPE_SNDSTAT 5
  74. #define SNDRV_OSS_DEVICE_TYPE_MUSIC 6
  75. #define MODULE_ALIAS_SNDRV_MINOR(type) \
  76. MODULE_ALIAS("sound-service-?-" __stringify(type))
  77. #endif
  78. #endif /* __SOUND_MINORS_H */