blob: 2fec3714a8b183765c64f57aa523d9e9fda09fb8 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __SOUND_HDSP_H
20#define __SOUND_HDSP_H
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070021#ifdef __linux__
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/types.h>
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070023#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define HDSP_MATRIX_MIXER_SIZE 2048
Ben Cheng655a7c02013-10-16 16:09:24 -070025enum HDSP_IO_Type {
Tao Baod7db5942015-01-28 10:07:51 -080026 Digiface,
27 Multiface,
28 H9652,
Tao Baod7db5942015-01-28 10:07:51 -080029 H9632,
30 RPM,
31 Undefined,
Ben Cheng655a7c02013-10-16 16:09:24 -070032};
Ben Cheng655a7c02013-10-16 16:09:24 -070033struct hdsp_peak_rms {
Tao Baod7db5942015-01-28 10:07:51 -080034 __u32 input_peaks[26];
35 __u32 playback_peaks[26];
36 __u32 output_peaks[28];
Tao Baod7db5942015-01-28 10:07:51 -080037 __u64 input_rms[26];
38 __u64 playback_rms[26];
39 __u64 output_rms[26];
Ben Cheng655a7c02013-10-16 16:09:24 -070040};
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
42struct hdsp_config_info {
Tao Baod7db5942015-01-28 10:07:51 -080043 unsigned char pref_sync_ref;
44 unsigned char wordclock_sync_check;
Tao Baod7db5942015-01-28 10:07:51 -080045 unsigned char spdif_sync_check;
46 unsigned char adatsync_sync_check;
47 unsigned char adat_sync_check[3];
48 unsigned char spdif_in;
Tao Baod7db5942015-01-28 10:07:51 -080049 unsigned char spdif_out;
50 unsigned char spdif_professional;
51 unsigned char spdif_emphasis;
52 unsigned char spdif_nonaudio;
Tao Baod7db5942015-01-28 10:07:51 -080053 unsigned int spdif_sample_rate;
54 unsigned int system_sample_rate;
55 unsigned int autosync_sample_rate;
56 unsigned char system_clock_mode;
Tao Baod7db5942015-01-28 10:07:51 -080057 unsigned char clock_source;
58 unsigned char autosync_ref;
59 unsigned char line_out;
60 unsigned char passthru;
Tao Baod7db5942015-01-28 10:07:51 -080061 unsigned char da_gain;
62 unsigned char ad_gain;
63 unsigned char phone_gain;
64 unsigned char xlr_breakout_cable;
Tao Baod7db5942015-01-28 10:07:51 -080065 unsigned char analog_extension_board;
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
67#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
68struct hdsp_firmware {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070069 void * firmware_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070070};
71#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
72struct hdsp_version {
Tao Baod7db5942015-01-28 10:07:51 -080073 enum HDSP_IO_Type io_type;
74 unsigned short firmware_rev;
Ben Cheng655a7c02013-10-16 16:09:24 -070075};
76#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
Ben Cheng655a7c02013-10-16 16:09:24 -070077struct hdsp_mixer {
Tao Baod7db5942015-01-28 10:07:51 -080078 unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
80#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
Ben Cheng655a7c02013-10-16 16:09:24 -070081struct hdsp_9632_aeb {
Tao Baod7db5942015-01-28 10:07:51 -080082 int aebi;
83 int aebo;
Ben Cheng655a7c02013-10-16 16:09:24 -070084};
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
Ben Cheng655a7c02013-10-16 16:09:24 -070086#endif