Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | enum HDSP_IO_Type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | Digiface, |
| 25 | Multiface, |
| 26 | H9652, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | H9632, |
| 28 | RPM, |
| 29 | Undefined, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | struct hdsp_peak_rms { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 32 | __u32 input_peaks[26]; |
| 33 | __u32 playback_peaks[26]; |
| 34 | __u32 output_peaks[28]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u64 input_rms[26]; |
| 36 | __u64 playback_rms[26]; |
| 37 | __u64 output_rms[26]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) |
| 40 | struct hdsp_config_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | unsigned char pref_sync_ref; |
| 42 | unsigned char wordclock_sync_check; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | unsigned char spdif_sync_check; |
| 44 | unsigned char adatsync_sync_check; |
| 45 | unsigned char adat_sync_check[3]; |
| 46 | unsigned char spdif_in; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | unsigned char spdif_out; |
| 48 | unsigned char spdif_professional; |
| 49 | unsigned char spdif_emphasis; |
| 50 | unsigned char spdif_nonaudio; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | unsigned int spdif_sample_rate; |
| 52 | unsigned int system_sample_rate; |
| 53 | unsigned int autosync_sample_rate; |
| 54 | unsigned char system_clock_mode; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | unsigned char clock_source; |
| 56 | unsigned char autosync_ref; |
| 57 | unsigned char line_out; |
| 58 | unsigned char passthru; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | unsigned char da_gain; |
| 60 | unsigned char ad_gain; |
| 61 | unsigned char phone_gain; |
| 62 | unsigned char xlr_breakout_cable; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | unsigned char analog_extension_board; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | }; |
| 65 | #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) |
| 66 | struct hdsp_firmware { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | void __user * firmware_data; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; |
| 69 | #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) |
| 70 | struct hdsp_version { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | enum HDSP_IO_Type io_type; |
| 72 | unsigned short firmware_rev; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 73 | }; |
| 74 | #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | struct hdsp_mixer { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 77 | }; |
| 78 | #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | struct hdsp_9632_aeb { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 | int aebi; |
| 81 | int aebo; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) |
| 84 | typedef enum HDSP_IO_Type HDSP_IO_Type; |
| 85 | typedef struct hdsp_peak_rms hdsp_peak_rms_t; |
| 86 | typedef struct hdsp_config_info hdsp_config_info_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | typedef struct hdsp_firmware hdsp_firmware_t; |
| 88 | typedef struct hdsp_version hdsp_version_t; |
| 89 | typedef struct hdsp_mixer hdsp_mixer_t; |
| 90 | typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #endif |