blob: cc13cb92f0532fa681943b1671ea01d1aae52376 [file] [log] [blame]
Christopher Ferris38062f92014-07-09 15:33:25 -07001/****************************************************************************
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 Ferrisba8d4f42014-09-03 19:56:49 -070022#include <linux/types.h>
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070023#define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc
Christopher Ferris38062f92014-07-09 15:33:25 -070024#define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070025#define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475
Christopher Ferris05d08e92016-02-04 13:16:38 -080026#define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c
Christopher Ferris525ce912017-07-26 13:12:53 -070027#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
Christopher Ferrisd842e432019-03-07 10:21:59 -080028#define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d
Christopher Ferrisa4792612022-01-10 13:51:15 -080029#define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000030#define SNDRV_FIREWIRE_EVENT_FF400_MESSAGE 0x4f6c6761
Christopher Ferris05d08e92016-02-04 13:16:38 -080031struct snd_firewire_event_common {
Tao Baod7db5942015-01-28 10:07:51 -080032 unsigned int type;
Christopher Ferris38062f92014-07-09 15:33:25 -070033};
Christopher Ferris38062f92014-07-09 15:33:25 -070034struct snd_firewire_event_lock_status {
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -080036 unsigned int status;
Christopher Ferris38062f92014-07-09 15:33:25 -070037};
Christopher Ferris38062f92014-07-09 15:33:25 -070038struct snd_firewire_event_dice_notification {
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -080040 unsigned int notification;
Christopher Ferris38062f92014-07-09 15:33:25 -070041};
Tao Baod7db5942015-01-28 10:07:51 -080042#define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32) ((__u16) ~0) - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080043struct snd_efw_transaction {
Tao Baod7db5942015-01-28 10:07:51 -080044 __be32 length;
45 __be32 version;
46 __be32 seqnum;
Christopher Ferris05d08e92016-02-04 13:16:38 -080047 __be32 category;
Tao Baod7db5942015-01-28 10:07:51 -080048 __be32 command;
49 __be32 status;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070050 __be32 params[];
Christopher Ferris05d08e92016-02-04 13:16:38 -080051};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070052struct snd_firewire_event_efw_response {
Tao Baod7db5942015-01-28 10:07:51 -080053 unsigned int type;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070054 __be32 response[];
Christopher Ferris05d08e92016-02-04 13:16:38 -080055};
56struct snd_firewire_event_digi00x_message {
57 unsigned int type;
58 __u32 message;
Christopher Ferris05d08e92016-02-04 13:16:38 -080059};
Christopher Ferris525ce912017-07-26 13:12:53 -070060struct snd_firewire_event_motu_notification {
61 unsigned int type;
62 __u32 message;
63};
Christopher Ferrisd842e432019-03-07 10:21:59 -080064struct snd_firewire_tascam_change {
65 unsigned int index;
66 __be32 before;
67 __be32 after;
68};
69struct snd_firewire_event_tascam_control {
70 unsigned int type;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070071 struct snd_firewire_tascam_change changes[];
Christopher Ferrisd842e432019-03-07 10:21:59 -080072};
Christopher Ferrisa4792612022-01-10 13:51:15 -080073struct snd_firewire_event_motu_register_dsp_change {
74 unsigned int type;
75 __u32 count;
76 __u32 changes[];
77};
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000078struct snd_firewire_event_ff400_message {
79 unsigned int type;
80 unsigned int message_count;
81 struct {
82 __u32 message;
83 __u32 tstamp;
84 } messages[];
85};
Christopher Ferris38062f92014-07-09 15:33:25 -070086union snd_firewire_event {
Tao Baod7db5942015-01-28 10:07:51 -080087 struct snd_firewire_event_common common;
88 struct snd_firewire_event_lock_status lock_status;
Christopher Ferris05d08e92016-02-04 13:16:38 -080089 struct snd_firewire_event_dice_notification dice_notification;
Tao Baod7db5942015-01-28 10:07:51 -080090 struct snd_firewire_event_efw_response efw_response;
Christopher Ferris05d08e92016-02-04 13:16:38 -080091 struct snd_firewire_event_digi00x_message digi00x_message;
Christopher Ferrisd842e432019-03-07 10:21:59 -080092 struct snd_firewire_event_tascam_control tascam_control;
Christopher Ferris525ce912017-07-26 13:12:53 -070093 struct snd_firewire_event_motu_notification motu_notification;
Christopher Ferrisa4792612022-01-10 13:51:15 -080094 struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000095 struct snd_firewire_event_ff400_message ff400_message;
Christopher Ferris38062f92014-07-09 15:33:25 -070096};
97#define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info)
98#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070099#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
Christopher Ferrisd842e432019-03-07 10:21:59 -0800100#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state)
Christopher Ferrisa4792612022-01-10 13:51:15 -0800101#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter)
102#define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter)
103#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_PARAMETER _IOR('H', 0xfe, struct snd_firewire_motu_register_dsp_parameter)
Christopher Ferris38062f92014-07-09 15:33:25 -0700104#define SNDRV_FIREWIRE_TYPE_DICE 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700105#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
106#define SNDRV_FIREWIRE_TYPE_BEBOB 3
Christopher Ferris05d08e92016-02-04 13:16:38 -0800107#define SNDRV_FIREWIRE_TYPE_OXFW 4
108#define SNDRV_FIREWIRE_TYPE_DIGI00X 5
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109#define SNDRV_FIREWIRE_TYPE_TASCAM 6
Christopher Ferris525ce912017-07-26 13:12:53 -0700110#define SNDRV_FIREWIRE_TYPE_MOTU 7
111#define SNDRV_FIREWIRE_TYPE_FIREFACE 8
Christopher Ferris38062f92014-07-09 15:33:25 -0700112struct snd_firewire_get_info {
Tao Baod7db5942015-01-28 10:07:51 -0800113 unsigned int type;
114 unsigned int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115 unsigned char guid[8];
Tao Baod7db5942015-01-28 10:07:51 -0800116 char device_name[16];
Christopher Ferris38062f92014-07-09 15:33:25 -0700117};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800118#define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64
119struct snd_firewire_tascam_state {
120 __be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
121};
Christopher Ferrisa4792612022-01-10 13:51:15 -0800122#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT 24
123#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT 24
124#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT)
125struct snd_firewire_motu_register_dsp_meter {
126 __u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT];
127};
128#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4
129#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20
130#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10
131#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
132struct snd_firewire_motu_register_dsp_parameter {
133 struct {
134 struct {
135 __u8 gain[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
136 __u8 pan[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
137 __u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
138 __u8 paired_balance[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
139 __u8 paired_width[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
140 } source[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
141 struct {
142 __u8 paired_volume[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
143 __u8 paired_flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
144 } output;
145 } mixer;
146 struct {
147 __u8 main_paired_volume;
148 __u8 hp_paired_volume;
149 __u8 hp_paired_assignment;
150 __u8 reserved[5];
151 } output;
152 struct {
153 __u8 boost_flag;
154 __u8 nominal_level_flag;
155 __u8 reserved[6];
156 } line_input;
157 struct {
158 __u8 gain_and_invert[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
159 __u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
160 } input;
161 __u8 reserved[64];
162};
163#define SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT 400
164struct snd_firewire_motu_command_dsp_meter {
165 float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
166};
Christopher Ferris38062f92014-07-09 15:33:25 -0700167#endif