blob: 586507bf45437327b9cd29d8c0b7fb6449b82555 [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_HDSPM_H
20#define __SOUND_HDSPM_H
Christopher Ferris05d08e92016-02-04 13:16:38 -080021#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#define HDSPM_MAX_CHANNELS 64
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080024enum hdspm_io_type {
Tao Baod7db5942015-01-28 10:07:51 -080025 MADI,
26 MADIface,
27 AIO,
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080029 AES32,
Tao Baod7db5942015-01-28 10:07:51 -080030 RayDAT
Ben Cheng655a7c02013-10-16 16:09:24 -070031};
32enum hdspm_speed {
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080034 ss,
Tao Baod7db5942015-01-28 10:07:51 -080035 ds,
36 qs
Ben Cheng655a7c02013-10-16 16:09:24 -070037};
Christopher Ferris05d08e92016-02-04 13:16:38 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070039struct hdspm_peak_rms {
Christopher Ferris05d08e92016-02-04 13:16:38 -080040 __u32 input_peaks[64];
41 __u32 playback_peaks[64];
42 __u32 output_peaks[64];
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080044 __u64 input_rms[64];
45 __u64 playback_rms[64];
46 __u64 output_rms[64];
47 __u8 speed;
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 int status2;
Ben Cheng655a7c02013-10-16 16:09:24 -070050};
Tao Baod7db5942015-01-28 10:07:51 -080051#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS _IOR('H', 0x42, struct hdspm_peak_rms)
Ben Cheng655a7c02013-10-16 16:09:24 -070052struct hdspm_config {
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080054 unsigned char pref_sync_ref;
Tao Baod7db5942015-01-28 10:07:51 -080055 unsigned char wordclock_sync_check;
56 unsigned char madi_sync_check;
57 unsigned int system_sample_rate;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 unsigned int autosync_sample_rate;
Tao Baod7db5942015-01-28 10:07:51 -080060 unsigned char system_clock_mode;
61 unsigned char clock_source;
62 unsigned char autosync_ref;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080064 unsigned char line_out;
Tao Baod7db5942015-01-28 10:07:51 -080065 unsigned int passthru;
66 unsigned int analog_out;
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080069#define SNDRV_HDSPM_IOCTL_GET_CONFIG _IOR('H', 0x41, struct hdspm_config)
Ben Cheng655a7c02013-10-16 16:09:24 -070070enum hdspm_ltc_format {
Tao Baod7db5942015-01-28 10:07:51 -080071 format_invalid,
72 fps_24,
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080074 fps_25,
Tao Baod7db5942015-01-28 10:07:51 -080075 fps_2997,
76 fps_30
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080079enum hdspm_ltc_frame {
Tao Baod7db5942015-01-28 10:07:51 -080080 frame_invalid,
81 drop_frame,
82 full_frame
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080084};
Ben Cheng655a7c02013-10-16 16:09:24 -070085enum hdspm_ltc_input_format {
Tao Baod7db5942015-01-28 10:07:51 -080086 ntsc,
87 pal,
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080089 no_video
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
91struct hdspm_ltc {
Tao Baod7db5942015-01-28 10:07:51 -080092 unsigned int ltc;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094 enum hdspm_ltc_format format;
Tao Baod7db5942015-01-28 10:07:51 -080095 enum hdspm_ltc_frame frame;
96 enum hdspm_ltc_input_format input_format;
Ben Cheng655a7c02013-10-16 16:09:24 -070097};
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
Ben Cheng655a7c02013-10-16 16:09:24 -0700100enum hdspm_sync {
Tao Baod7db5942015-01-28 10:07:51 -0800101 hdspm_sync_no_lock = 0,
102 hdspm_sync_lock = 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800104 hdspm_sync_sync = 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700105};
106enum hdspm_madi_input {
Tao Baod7db5942015-01-28 10:07:51 -0800107 hdspm_input_optical = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109 hdspm_input_coax = 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700110};
111enum hdspm_madi_channel_format {
Tao Baod7db5942015-01-28 10:07:51 -0800112 hdspm_format_ch_64 = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800114 hdspm_format_ch_56 = 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700115};
116enum hdspm_madi_frame_format {
Tao Baod7db5942015-01-28 10:07:51 -0800117 hdspm_frame_48 = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119 hdspm_frame_96 = 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700120};
121enum hdspm_syncsource {
Tao Baod7db5942015-01-28 10:07:51 -0800122 syncsource_wc = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800124 syncsource_madi = 1,
Tao Baod7db5942015-01-28 10:07:51 -0800125 syncsource_tco = 2,
126 syncsource_sync = 3,
127 syncsource_none = 4
Christopher Ferris05d08e92016-02-04 13:16:38 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700129};
Ben Cheng655a7c02013-10-16 16:09:24 -0700130struct hdspm_status {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800131 __u8 card_type;
Tao Baod7db5942015-01-28 10:07:51 -0800132 enum hdspm_syncsource autosync_source;
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134 __u64 card_clock;
135 __u32 master_period;
Tao Baod7db5942015-01-28 10:07:51 -0800136 union {
137 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139 __u8 sync_wc;
140 __u8 sync_madi;
141 __u8 sync_tco;
142 __u8 sync_in;
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800144 __u8 madi_input;
145 __u8 channel_format;
146 __u8 frame_format;
Tao Baod7db5942015-01-28 10:07:51 -0800147 } madi;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800149 } card_specific;
Ben Cheng655a7c02013-10-16 16:09:24 -0700150};
Tao Baod7db5942015-01-28 10:07:51 -0800151#define SNDRV_HDSPM_IOCTL_GET_STATUS _IOR('H', 0x47, struct hdspm_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700152#define HDSPM_ADDON_TCO 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800154struct hdspm_version {
155 __u8 card_type;
Tao Baod7db5942015-01-28 10:07:51 -0800156 char cardname[20];
157 unsigned int serial;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800159 unsigned short firmware_rev;
Tao Baod7db5942015-01-28 10:07:51 -0800160 int addons;
Ben Cheng655a7c02013-10-16 16:09:24 -0700161};
162#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800164#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
Ben Cheng655a7c02013-10-16 16:09:24 -0700165struct hdspm_channelfader {
Tao Baod7db5942015-01-28 10:07:51 -0800166 unsigned int in[HDSPM_MIXER_CHANNELS];
167 unsigned int pb[HDSPM_MIXER_CHANNELS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169};
Ben Cheng655a7c02013-10-16 16:09:24 -0700170struct hdspm_mixer {
Tao Baod7db5942015-01-28 10:07:51 -0800171 struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700172};
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800174struct hdspm_mixer_ioctl {
Tao Baod7db5942015-01-28 10:07:51 -0800175 struct hdspm_mixer * mixer;
Ben Cheng655a7c02013-10-16 16:09:24 -0700176};
177#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
Ben Cheng655a7c02013-10-16 16:09:24 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800179typedef struct hdspm_peak_rms hdspm_peak_rms_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700180typedef struct hdspm_config_info hdspm_config_info_t;
181typedef struct hdspm_version hdspm_version_t;
182typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800184typedef struct hdspm_mixer hdspm_mixer_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700185#endif