| 1 |
#ifndef __SOUND_HDSP_H |
| 2 |
#define __SOUND_HDSP_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#include <stdint.h> |
| 23 |
|
| 24 |
#define HDSP_MATRIX_MIXER_SIZE 2048 |
| 25 |
|
| 26 |
typedef enum { |
| 27 |
Digiface, |
| 28 |
Multiface, |
| 29 |
H9652, |
| 30 |
H9632, |
| 31 |
RPM, |
| 32 |
Undefined, |
| 33 |
} HDSP_IO_Type; |
| 34 |
|
| 35 |
typedef struct _snd_hdsp_peak_rms hdsp_peak_rms_t; |
| 36 |
|
| 37 |
struct _snd_hdsp_peak_rms { |
| 38 |
uint32_t input_peaks[26]; |
| 39 |
uint32_t playback_peaks[26]; |
| 40 |
uint32_t output_peaks[28]; |
| 41 |
uint64_t input_rms[26]; |
| 42 |
uint64_t playback_rms[26]; |
| 43 |
|
| 44 |
uint64_t output_rms[26]; |
| 45 |
}; |
| 46 |
|
| 47 |
#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, hdsp_peak_rms_t) |
| 48 |
|
| 49 |
typedef struct _snd_hdsp_config_info hdsp_config_info_t; |
| 50 |
|
| 51 |
struct _snd_hdsp_config_info { |
| 52 |
unsigned char pref_sync_ref; |
| 53 |
unsigned char wordclock_sync_check; |
| 54 |
unsigned char spdif_sync_check; |
| 55 |
unsigned char adatsync_sync_check; |
| 56 |
unsigned char adat_sync_check[3]; |
| 57 |
unsigned char spdif_in; |
| 58 |
unsigned char spdif_out; |
| 59 |
unsigned char spdif_professional; |
| 60 |
unsigned char spdif_emphasis; |
| 61 |
unsigned char spdif_nonaudio; |
| 62 |
unsigned int spdif_sample_rate; |
| 63 |
unsigned int system_sample_rate; |
| 64 |
unsigned int autosync_sample_rate; |
| 65 |
unsigned char system_clock_mode; |
| 66 |
unsigned char clock_source; |
| 67 |
unsigned char autosync_ref; |
| 68 |
unsigned char line_out; |
| 69 |
unsigned char passthru; |
| 70 |
unsigned char da_gain; |
| 71 |
unsigned char ad_gain; |
| 72 |
unsigned char phone_gain; |
| 73 |
unsigned char xlr_breakout_cable; |
| 74 |
unsigned char analog_extension_board; |
| 75 |
}; |
| 76 |
|
| 77 |
#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdsp_config_info_t) |
| 78 |
|
| 79 |
typedef struct _snd_hdsp_firmware hdsp_firmware_t; |
| 80 |
|
| 81 |
struct _snd_hdsp_firmware { |
| 82 |
void *firmware_data; |
| 83 |
}; |
| 84 |
|
| 85 |
#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t) |
| 86 |
|
| 87 |
typedef struct _snd_hdsp_version hdsp_version_t; |
| 88 |
|
| 89 |
struct _snd_hdsp_version { |
| 90 |
HDSP_IO_Type io_type; |
| 91 |
unsigned short firmware_rev; |
| 92 |
}; |
| 93 |
|
| 94 |
#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, hdsp_version_t) |
| 95 |
|
| 96 |
typedef struct _snd_hdsp_mixer hdsp_mixer_t; |
| 97 |
|
| 98 |
struct _snd_hdsp_mixer { |
| 99 |
unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; |
| 100 |
}; |
| 101 |
|
| 102 |
#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, hdsp_mixer_t) |
| 103 |
|
| 104 |
typedef struct _snd_hdsp_9632_aeb hdsp_9632_aeb_t; |
| 105 |
|
| 106 |
struct _snd_hdsp_9632_aeb { |
| 107 |
int aebi; |
| 108 |
int aebo; |
| 109 |
}; |
| 110 |
|
| 111 |
#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, hdsp_9632_aeb_t) |
| 112 |
|
| 113 |
#endif |