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