blob: 6a673d4f211322daa07417d6c6af184fc7635aa6 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef __SOUND_HDSP_H
8#define __SOUND_HDSP_H
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -07009#ifdef __linux__
Ben Cheng655a7c02013-10-16 16:09:24 -070010#include <linux/types.h>
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070011#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070012#define HDSP_MATRIX_MIXER_SIZE 2048
Ben Cheng655a7c02013-10-16 16:09:24 -070013enum HDSP_IO_Type {
Tao Baod7db5942015-01-28 10:07:51 -080014 Digiface,
15 Multiface,
16 H9652,
Tao Baod7db5942015-01-28 10:07:51 -080017 H9632,
18 RPM,
19 Undefined,
Ben Cheng655a7c02013-10-16 16:09:24 -070020};
Ben Cheng655a7c02013-10-16 16:09:24 -070021struct hdsp_peak_rms {
Tao Baod7db5942015-01-28 10:07:51 -080022 __u32 input_peaks[26];
23 __u32 playback_peaks[26];
24 __u32 output_peaks[28];
Tao Baod7db5942015-01-28 10:07:51 -080025 __u64 input_rms[26];
26 __u64 playback_rms[26];
27 __u64 output_rms[26];
Ben Cheng655a7c02013-10-16 16:09:24 -070028};
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
30struct hdsp_config_info {
Tao Baod7db5942015-01-28 10:07:51 -080031 unsigned char pref_sync_ref;
32 unsigned char wordclock_sync_check;
Tao Baod7db5942015-01-28 10:07:51 -080033 unsigned char spdif_sync_check;
34 unsigned char adatsync_sync_check;
35 unsigned char adat_sync_check[3];
36 unsigned char spdif_in;
Tao Baod7db5942015-01-28 10:07:51 -080037 unsigned char spdif_out;
38 unsigned char spdif_professional;
39 unsigned char spdif_emphasis;
40 unsigned char spdif_nonaudio;
Tao Baod7db5942015-01-28 10:07:51 -080041 unsigned int spdif_sample_rate;
42 unsigned int system_sample_rate;
43 unsigned int autosync_sample_rate;
44 unsigned char system_clock_mode;
Tao Baod7db5942015-01-28 10:07:51 -080045 unsigned char clock_source;
46 unsigned char autosync_ref;
47 unsigned char line_out;
48 unsigned char passthru;
Tao Baod7db5942015-01-28 10:07:51 -080049 unsigned char da_gain;
50 unsigned char ad_gain;
51 unsigned char phone_gain;
52 unsigned char xlr_breakout_cable;
Tao Baod7db5942015-01-28 10:07:51 -080053 unsigned char analog_extension_board;
Ben Cheng655a7c02013-10-16 16:09:24 -070054};
55#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
56struct hdsp_firmware {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070057 void * firmware_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070058};
59#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
60struct hdsp_version {
Tao Baod7db5942015-01-28 10:07:51 -080061 enum HDSP_IO_Type io_type;
62 unsigned short firmware_rev;
Ben Cheng655a7c02013-10-16 16:09:24 -070063};
64#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
Ben Cheng655a7c02013-10-16 16:09:24 -070065struct hdsp_mixer {
Tao Baod7db5942015-01-28 10:07:51 -080066 unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
68#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
Ben Cheng655a7c02013-10-16 16:09:24 -070069struct hdsp_9632_aeb {
Tao Baod7db5942015-01-28 10:07:51 -080070 int aebi;
71 int aebo;
Ben Cheng655a7c02013-10-16 16:09:24 -070072};
Ben Cheng655a7c02013-10-16 16:09:24 -070073#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
Ben Cheng655a7c02013-10-16 16:09:24 -070074#endif