hdsp.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #ifndef __SOUND_HDSP_H
  2. #define __SOUND_HDSP_H
  3. /*
  4. * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #define HDSP_MATRIX_MIXER_SIZE 2048
  21. typedef enum {
  22. Digiface,
  23. Multiface,
  24. H9652,
  25. H9632,
  26. Undefined,
  27. } HDSP_IO_Type;
  28. typedef struct _snd_hdsp_peak_rms hdsp_peak_rms_t;
  29. struct _snd_hdsp_peak_rms {
  30. u32 input_peaks[26];
  31. u32 playback_peaks[26];
  32. u32 output_peaks[28];
  33. u64 input_rms[26];
  34. u64 playback_rms[26];
  35. /* These are only used for H96xx cards */
  36. u64 output_rms[26];
  37. };
  38. #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, hdsp_peak_rms_t)
  39. typedef struct _snd_hdsp_config_info hdsp_config_info_t;
  40. struct _snd_hdsp_config_info {
  41. unsigned char pref_sync_ref;
  42. unsigned char wordclock_sync_check;
  43. unsigned char spdif_sync_check;
  44. unsigned char adatsync_sync_check;
  45. unsigned char adat_sync_check[3];
  46. unsigned char spdif_in;
  47. unsigned char spdif_out;
  48. unsigned char spdif_professional;
  49. unsigned char spdif_emphasis;
  50. unsigned char spdif_nonaudio;
  51. unsigned int spdif_sample_rate;
  52. unsigned int system_sample_rate;
  53. unsigned int autosync_sample_rate;
  54. unsigned char system_clock_mode;
  55. unsigned char clock_source;
  56. unsigned char autosync_ref;
  57. unsigned char line_out;
  58. unsigned char passthru;
  59. unsigned char da_gain;
  60. unsigned char ad_gain;
  61. unsigned char phone_gain;
  62. unsigned char xlr_breakout_cable;
  63. unsigned char analog_extension_board;
  64. };
  65. #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdsp_config_info_t)
  66. typedef struct _snd_hdsp_firmware hdsp_firmware_t;
  67. struct _snd_hdsp_firmware {
  68. void __user *firmware_data; /* 24413 x 4 bytes */
  69. };
  70. #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t)
  71. typedef struct _snd_hdsp_version hdsp_version_t;
  72. struct _snd_hdsp_version {
  73. HDSP_IO_Type io_type;
  74. unsigned short firmware_rev;
  75. };
  76. #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, hdsp_version_t)
  77. typedef struct _snd_hdsp_mixer hdsp_mixer_t;
  78. struct _snd_hdsp_mixer {
  79. unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
  80. };
  81. #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, hdsp_mixer_t)
  82. typedef struct _snd_hdsp_9632_aeb hdsp_9632_aeb_t;
  83. struct _snd_hdsp_9632_aeb {
  84. int aebi;
  85. int aebo;
  86. };
  87. #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, hdsp_9632_aeb_t)
  88. #endif /* __SOUND_HDSP_H */