xref: /aosp_15_r20/bionic/libc/kernel/uapi/sound/hdspm.h (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __SOUND_HDSPM_H
8 #define __SOUND_HDSPM_H
9 #ifdef __linux__
10 #include <linux/types.h>
11 #endif
12 #define HDSPM_MAX_CHANNELS 64
13 enum hdspm_io_type {
14   MADI,
15   MADIface,
16   AIO,
17   AES32,
18   RayDAT
19 };
20 enum hdspm_speed {
21   ss,
22   ds,
23   qs
24 };
25 struct hdspm_peak_rms {
26   __u32 input_peaks[64];
27   __u32 playback_peaks[64];
28   __u32 output_peaks[64];
29   __u64 input_rms[64];
30   __u64 playback_rms[64];
31   __u64 output_rms[64];
32   __u8 speed;
33   int status2;
34 };
35 #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS _IOR('H', 0x42, struct hdspm_peak_rms)
36 struct hdspm_config {
37   unsigned char pref_sync_ref;
38   unsigned char wordclock_sync_check;
39   unsigned char madi_sync_check;
40   unsigned int system_sample_rate;
41   unsigned int autosync_sample_rate;
42   unsigned char system_clock_mode;
43   unsigned char clock_source;
44   unsigned char autosync_ref;
45   unsigned char line_out;
46   unsigned int passthru;
47   unsigned int analog_out;
48 };
49 #define SNDRV_HDSPM_IOCTL_GET_CONFIG _IOR('H', 0x41, struct hdspm_config)
50 enum hdspm_ltc_format {
51   format_invalid,
52   fps_24,
53   fps_25,
54   fps_2997,
55   fps_30
56 };
57 enum hdspm_ltc_frame {
58   frame_invalid,
59   drop_frame,
60   full_frame
61 };
62 enum hdspm_ltc_input_format {
63   ntsc,
64   pal,
65   no_video
66 };
67 struct hdspm_ltc {
68   unsigned int ltc;
69   enum hdspm_ltc_format format;
70   enum hdspm_ltc_frame frame;
71   enum hdspm_ltc_input_format input_format;
72 };
73 #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
74 enum hdspm_sync {
75   hdspm_sync_no_lock = 0,
76   hdspm_sync_lock = 1,
77   hdspm_sync_sync = 2
78 };
79 enum hdspm_madi_input {
80   hdspm_input_optical = 0,
81   hdspm_input_coax = 1
82 };
83 enum hdspm_madi_channel_format {
84   hdspm_format_ch_64 = 0,
85   hdspm_format_ch_56 = 1
86 };
87 enum hdspm_madi_frame_format {
88   hdspm_frame_48 = 0,
89   hdspm_frame_96 = 1
90 };
91 enum hdspm_syncsource {
92   syncsource_wc = 0,
93   syncsource_madi = 1,
94   syncsource_tco = 2,
95   syncsource_sync = 3,
96   syncsource_none = 4
97 };
98 struct hdspm_status {
99   __u8 card_type;
100   enum hdspm_syncsource autosync_source;
101   __u64 card_clock;
102   __u32 master_period;
103   union {
104     struct {
105       __u8 sync_wc;
106       __u8 sync_madi;
107       __u8 sync_tco;
108       __u8 sync_in;
109       __u8 madi_input;
110       __u8 channel_format;
111       __u8 frame_format;
112     } madi;
113   } card_specific;
114 };
115 #define SNDRV_HDSPM_IOCTL_GET_STATUS _IOR('H', 0x47, struct hdspm_status)
116 #define HDSPM_ADDON_TCO 1
117 struct hdspm_version {
118   __u8 card_type;
119   char cardname[20];
120   unsigned int serial;
121   unsigned short firmware_rev;
122   int addons;
123 };
124 #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
125 #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
126 struct hdspm_channelfader {
127   unsigned int in[HDSPM_MIXER_CHANNELS];
128   unsigned int pb[HDSPM_MIXER_CHANNELS];
129 };
130 struct hdspm_mixer {
131   struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
132 };
133 struct hdspm_mixer_ioctl {
134   struct hdspm_mixer * mixer;
135 };
136 #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
137 #endif
138