xref: /aosp_15_r20/bionic/libc/kernel/uapi/sound/hdsp.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_HDSP_H
8 #define __SOUND_HDSP_H
9 #ifdef __linux__
10 #include <linux/types.h>
11 #endif
12 #define HDSP_MATRIX_MIXER_SIZE 2048
13 enum HDSP_IO_Type {
14   Digiface,
15   Multiface,
16   H9652,
17   H9632,
18   RPM,
19   Undefined,
20 };
21 struct hdsp_peak_rms {
22   __u32 input_peaks[26];
23   __u32 playback_peaks[26];
24   __u32 output_peaks[28];
25   __u64 input_rms[26];
26   __u64 playback_rms[26];
27   __u64 output_rms[26];
28 };
29 #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
30 struct hdsp_config_info {
31   unsigned char pref_sync_ref;
32   unsigned char wordclock_sync_check;
33   unsigned char spdif_sync_check;
34   unsigned char adatsync_sync_check;
35   unsigned char adat_sync_check[3];
36   unsigned char spdif_in;
37   unsigned char spdif_out;
38   unsigned char spdif_professional;
39   unsigned char spdif_emphasis;
40   unsigned char spdif_nonaudio;
41   unsigned int spdif_sample_rate;
42   unsigned int system_sample_rate;
43   unsigned int autosync_sample_rate;
44   unsigned char system_clock_mode;
45   unsigned char clock_source;
46   unsigned char autosync_ref;
47   unsigned char line_out;
48   unsigned char passthru;
49   unsigned char da_gain;
50   unsigned char ad_gain;
51   unsigned char phone_gain;
52   unsigned char xlr_breakout_cable;
53   unsigned char analog_extension_board;
54 };
55 #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
56 struct hdsp_firmware {
57   void * firmware_data;
58 };
59 #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
60 struct hdsp_version {
61   enum HDSP_IO_Type io_type;
62   unsigned short firmware_rev;
63 };
64 #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
65 struct hdsp_mixer {
66   unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
67 };
68 #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
69 struct hdsp_9632_aeb {
70   int aebi;
71   int aebo;
72 };
73 #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
74 #endif
75