Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -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 _UAPI_SOUND_FIREWIRE_H_INCLUDED |
| 20 | #define _UAPI_SOUND_FIREWIRE_H_INCLUDED |
| 21 | #include <linux/ioctl.h> |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 22 | #include <linux/types.h> |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 23 | #define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 24 | #define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 25 | #define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 26 | #define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 27 | #define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479 |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 28 | #define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 29 | #define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 30 | struct snd_firewire_event_common { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | unsigned int type; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 32 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 33 | struct snd_firewire_event_lock_status { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 34 | unsigned int type; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | unsigned int status; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 36 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 37 | struct snd_firewire_event_dice_notification { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 38 | unsigned int type; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | unsigned int notification; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 40 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | #define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32) ((__u16) ~0) - 1) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 42 | struct snd_efw_transaction { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __be32 length; |
| 44 | __be32 version; |
| 45 | __be32 seqnum; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 46 | __be32 category; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __be32 command; |
| 48 | __be32 status; |
| 49 | __be32 params[0]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 50 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 51 | struct snd_firewire_event_efw_response { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 | unsigned int type; |
| 53 | __be32 response[0]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 54 | }; |
| 55 | struct snd_firewire_event_digi00x_message { |
| 56 | unsigned int type; |
| 57 | __u32 message; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 58 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 59 | struct snd_firewire_event_motu_notification { |
| 60 | unsigned int type; |
| 61 | __u32 message; |
| 62 | }; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 63 | struct snd_firewire_tascam_change { |
| 64 | unsigned int index; |
| 65 | __be32 before; |
| 66 | __be32 after; |
| 67 | }; |
| 68 | struct snd_firewire_event_tascam_control { |
| 69 | unsigned int type; |
| 70 | struct snd_firewire_tascam_change changes[0]; |
| 71 | }; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 72 | struct snd_firewire_event_motu_register_dsp_change { |
| 73 | unsigned int type; |
| 74 | __u32 count; |
| 75 | __u32 changes[]; |
| 76 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 77 | union snd_firewire_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 | struct snd_firewire_event_common common; |
| 79 | struct snd_firewire_event_lock_status lock_status; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 80 | struct snd_firewire_event_dice_notification dice_notification; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 81 | struct snd_firewire_event_efw_response efw_response; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 82 | struct snd_firewire_event_digi00x_message digi00x_message; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 83 | struct snd_firewire_event_tascam_control tascam_control; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 84 | struct snd_firewire_event_motu_notification motu_notification; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 85 | struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 86 | }; |
| 87 | #define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info) |
| 88 | #define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 89 | #define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 90 | #define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state) |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 91 | #define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter) |
| 92 | #define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter) |
| 93 | #define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_PARAMETER _IOR('H', 0xfe, struct snd_firewire_motu_register_dsp_parameter) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 94 | #define SNDRV_FIREWIRE_TYPE_DICE 1 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 95 | #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 |
| 96 | #define SNDRV_FIREWIRE_TYPE_BEBOB 3 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 97 | #define SNDRV_FIREWIRE_TYPE_OXFW 4 |
| 98 | #define SNDRV_FIREWIRE_TYPE_DIGI00X 5 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 99 | #define SNDRV_FIREWIRE_TYPE_TASCAM 6 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 100 | #define SNDRV_FIREWIRE_TYPE_MOTU 7 |
| 101 | #define SNDRV_FIREWIRE_TYPE_FIREFACE 8 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 102 | struct snd_firewire_get_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | unsigned int type; |
| 104 | unsigned int card; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 105 | unsigned char guid[8]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 106 | char device_name[16]; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 107 | }; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 108 | #define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64 |
| 109 | struct snd_firewire_tascam_state { |
| 110 | __be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT]; |
| 111 | }; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 112 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT 24 |
| 113 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT 24 |
| 114 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT) |
| 115 | struct snd_firewire_motu_register_dsp_meter { |
| 116 | __u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT]; |
| 117 | }; |
| 118 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4 |
| 119 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20 |
| 120 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10 |
| 121 | #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2) |
| 122 | struct snd_firewire_motu_register_dsp_parameter { |
| 123 | struct { |
| 124 | struct { |
| 125 | __u8 gain[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; |
| 126 | __u8 pan[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; |
| 127 | __u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; |
| 128 | __u8 paired_balance[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; |
| 129 | __u8 paired_width[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; |
| 130 | } source[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; |
| 131 | struct { |
| 132 | __u8 paired_volume[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; |
| 133 | __u8 paired_flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; |
| 134 | } output; |
| 135 | } mixer; |
| 136 | struct { |
| 137 | __u8 main_paired_volume; |
| 138 | __u8 hp_paired_volume; |
| 139 | __u8 hp_paired_assignment; |
| 140 | __u8 reserved[5]; |
| 141 | } output; |
| 142 | struct { |
| 143 | __u8 boost_flag; |
| 144 | __u8 nominal_level_flag; |
| 145 | __u8 reserved[6]; |
| 146 | } line_input; |
| 147 | struct { |
| 148 | __u8 gain_and_invert[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT]; |
| 149 | __u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT]; |
| 150 | } input; |
| 151 | __u8 reserved[64]; |
| 152 | }; |
| 153 | #define SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT 400 |
| 154 | struct snd_firewire_motu_command_dsp_meter { |
| 155 | float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT]; |
| 156 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 157 | #endif |