hdsp.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. #ifndef __SOUND_HDSP_H
  3. #define __SOUND_HDSP_H
  4. /*
  5. * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
  6. */
  7. #ifdef __linux__
  8. #include <linux/types.h>
  9. #endif
  10. #define HDSP_MATRIX_MIXER_SIZE 2048
  11. enum HDSP_IO_Type {
  12. Digiface,
  13. Multiface,
  14. H9652,
  15. H9632,
  16. RPM,
  17. Undefined,
  18. };
  19. struct hdsp_peak_rms {
  20. __u32 input_peaks[26];
  21. __u32 playback_peaks[26];
  22. __u32 output_peaks[28];
  23. __u64 input_rms[26];
  24. __u64 playback_rms[26];
  25. /* These are only used for H96xx cards */
  26. __u64 output_rms[26];
  27. };
  28. #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
  29. struct hdsp_config_info {
  30. unsigned char pref_sync_ref;
  31. unsigned char wordclock_sync_check;
  32. unsigned char spdif_sync_check;
  33. unsigned char adatsync_sync_check;
  34. unsigned char adat_sync_check[3];
  35. unsigned char spdif_in;
  36. unsigned char spdif_out;
  37. unsigned char spdif_professional;
  38. unsigned char spdif_emphasis;
  39. unsigned char spdif_nonaudio;
  40. unsigned int spdif_sample_rate;
  41. unsigned int system_sample_rate;
  42. unsigned int autosync_sample_rate;
  43. unsigned char system_clock_mode;
  44. unsigned char clock_source;
  45. unsigned char autosync_ref;
  46. unsigned char line_out;
  47. unsigned char passthru;
  48. unsigned char da_gain;
  49. unsigned char ad_gain;
  50. unsigned char phone_gain;
  51. unsigned char xlr_breakout_cable;
  52. unsigned char analog_extension_board;
  53. };
  54. #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
  55. struct hdsp_firmware {
  56. void *firmware_data; /* 24413 x 4 bytes */
  57. };
  58. #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
  59. struct hdsp_version {
  60. enum HDSP_IO_Type io_type;
  61. unsigned short firmware_rev;
  62. };
  63. #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
  64. struct hdsp_mixer {
  65. unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
  66. };
  67. #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
  68. struct hdsp_9632_aeb {
  69. int aebi;
  70. int aebo;
  71. };
  72. #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
  73. #endif /* __SOUND_HDSP_H */