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