blob: 02e7f2da3f8a91804ff5a0c7f8d48fdd9e1d8ec2 [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
21#include <linux/types.h>
22#define HDSP_MATRIX_MIXER_SIZE 2048
Ben Cheng655a7c02013-10-16 16:09:24 -070023enum HDSP_IO_Type {
Tao Baod7db5942015-01-28 10:07:51 -080024 Digiface,
25 Multiface,
26 H9652,
Tao Baod7db5942015-01-28 10:07:51 -080027 H9632,
28 RPM,
29 Undefined,
Ben Cheng655a7c02013-10-16 16:09:24 -070030};
Ben Cheng655a7c02013-10-16 16:09:24 -070031struct hdsp_peak_rms {
Tao Baod7db5942015-01-28 10:07:51 -080032 __u32 input_peaks[26];
33 __u32 playback_peaks[26];
34 __u32 output_peaks[28];
Tao Baod7db5942015-01-28 10:07:51 -080035 __u64 input_rms[26];
36 __u64 playback_rms[26];
37 __u64 output_rms[26];
Ben Cheng655a7c02013-10-16 16:09:24 -070038};
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
40struct hdsp_config_info {
Tao Baod7db5942015-01-28 10:07:51 -080041 unsigned char pref_sync_ref;
42 unsigned char wordclock_sync_check;
Tao Baod7db5942015-01-28 10:07:51 -080043 unsigned char spdif_sync_check;
44 unsigned char adatsync_sync_check;
45 unsigned char adat_sync_check[3];
46 unsigned char spdif_in;
Tao Baod7db5942015-01-28 10:07:51 -080047 unsigned char spdif_out;
48 unsigned char spdif_professional;
49 unsigned char spdif_emphasis;
50 unsigned char spdif_nonaudio;
Tao Baod7db5942015-01-28 10:07:51 -080051 unsigned int spdif_sample_rate;
52 unsigned int system_sample_rate;
53 unsigned int autosync_sample_rate;
54 unsigned char system_clock_mode;
Tao Baod7db5942015-01-28 10:07:51 -080055 unsigned char clock_source;
56 unsigned char autosync_ref;
57 unsigned char line_out;
58 unsigned char passthru;
Tao Baod7db5942015-01-28 10:07:51 -080059 unsigned char da_gain;
60 unsigned char ad_gain;
61 unsigned char phone_gain;
62 unsigned char xlr_breakout_cable;
Tao Baod7db5942015-01-28 10:07:51 -080063 unsigned char analog_extension_board;
Ben Cheng655a7c02013-10-16 16:09:24 -070064};
65#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
66struct hdsp_firmware {
Tao Baod7db5942015-01-28 10:07:51 -080067 void __user * firmware_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070068};
69#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
70struct hdsp_version {
Tao Baod7db5942015-01-28 10:07:51 -080071 enum HDSP_IO_Type io_type;
72 unsigned short firmware_rev;
Ben Cheng655a7c02013-10-16 16:09:24 -070073};
74#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
Ben Cheng655a7c02013-10-16 16:09:24 -070075struct hdsp_mixer {
Tao Baod7db5942015-01-28 10:07:51 -080076 unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
78#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
Ben Cheng655a7c02013-10-16 16:09:24 -070079struct hdsp_9632_aeb {
Tao Baod7db5942015-01-28 10:07:51 -080080 int aebi;
81 int aebo;
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
84typedef enum HDSP_IO_Type HDSP_IO_Type;
85typedef struct hdsp_peak_rms hdsp_peak_rms_t;
86typedef struct hdsp_config_info hdsp_config_info_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070087typedef struct hdsp_firmware hdsp_firmware_t;
88typedef struct hdsp_version hdsp_version_t;
89typedef struct hdsp_mixer hdsp_mixer_t;
90typedef struct hdsp_9632_aeb hdsp_9632_aeb_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070091#endif