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