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