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