blob: 198a8f44633adde83a4f6d5f4b5e1fbf551671ee [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 Ferris05d08e92016-02-04 13:16:38 -080030struct snd_firewire_event_common {
Tao Baod7db5942015-01-28 10:07:51 -080031 unsigned int type;
Christopher Ferris38062f92014-07-09 15:33:25 -070032};
Christopher Ferris38062f92014-07-09 15:33:25 -070033struct snd_firewire_event_lock_status {
Christopher Ferris05d08e92016-02-04 13:16:38 -080034 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -080035 unsigned int status;
Christopher Ferris38062f92014-07-09 15:33:25 -070036};
Christopher Ferris38062f92014-07-09 15:33:25 -070037struct snd_firewire_event_dice_notification {
Christopher Ferris05d08e92016-02-04 13:16:38 -080038 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -080039 unsigned int notification;
Christopher Ferris38062f92014-07-09 15:33:25 -070040};
Tao Baod7db5942015-01-28 10:07:51 -080041#define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32) ((__u16) ~0) - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080042struct snd_efw_transaction {
Tao Baod7db5942015-01-28 10:07:51 -080043 __be32 length;
44 __be32 version;
45 __be32 seqnum;
Christopher Ferris05d08e92016-02-04 13:16:38 -080046 __be32 category;
Tao Baod7db5942015-01-28 10:07:51 -080047 __be32 command;
48 __be32 status;
49 __be32 params[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -080050};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070051struct snd_firewire_event_efw_response {
Tao Baod7db5942015-01-28 10:07:51 -080052 unsigned int type;
53 __be32 response[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -080054};
55struct snd_firewire_event_digi00x_message {
56 unsigned int type;
57 __u32 message;
Christopher Ferris05d08e92016-02-04 13:16:38 -080058};
Christopher Ferris525ce912017-07-26 13:12:53 -070059struct snd_firewire_event_motu_notification {
60 unsigned int type;
61 __u32 message;
62};
Christopher Ferrisd842e432019-03-07 10:21:59 -080063struct snd_firewire_tascam_change {
64 unsigned int index;
65 __be32 before;
66 __be32 after;
67};
68struct snd_firewire_event_tascam_control {
69 unsigned int type;
70 struct snd_firewire_tascam_change changes[0];
71};
Christopher Ferrisa4792612022-01-10 13:51:15 -080072struct snd_firewire_event_motu_register_dsp_change {
73 unsigned int type;
74 __u32 count;
75 __u32 changes[];
76};
Christopher Ferris38062f92014-07-09 15:33:25 -070077union snd_firewire_event {
Tao Baod7db5942015-01-28 10:07:51 -080078 struct snd_firewire_event_common common;
79 struct snd_firewire_event_lock_status lock_status;
Christopher Ferris05d08e92016-02-04 13:16:38 -080080 struct snd_firewire_event_dice_notification dice_notification;
Tao Baod7db5942015-01-28 10:07:51 -080081 struct snd_firewire_event_efw_response efw_response;
Christopher Ferris05d08e92016-02-04 13:16:38 -080082 struct snd_firewire_event_digi00x_message digi00x_message;
Christopher Ferrisd842e432019-03-07 10:21:59 -080083 struct snd_firewire_event_tascam_control tascam_control;
Christopher Ferris525ce912017-07-26 13:12:53 -070084 struct snd_firewire_event_motu_notification motu_notification;
Christopher Ferrisa4792612022-01-10 13:51:15 -080085 struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
Christopher Ferris38062f92014-07-09 15:33:25 -070086};
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 Ferrisba8d4f42014-09-03 19:56:49 -070089#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
Christopher Ferrisd842e432019-03-07 10:21:59 -080090#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state)
Christopher Ferrisa4792612022-01-10 13:51:15 -080091#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 Ferris38062f92014-07-09 15:33:25 -070094#define SNDRV_FIREWIRE_TYPE_DICE 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070095#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
96#define SNDRV_FIREWIRE_TYPE_BEBOB 3
Christopher Ferris05d08e92016-02-04 13:16:38 -080097#define SNDRV_FIREWIRE_TYPE_OXFW 4
98#define SNDRV_FIREWIRE_TYPE_DIGI00X 5
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define SNDRV_FIREWIRE_TYPE_TASCAM 6
Christopher Ferris525ce912017-07-26 13:12:53 -0700100#define SNDRV_FIREWIRE_TYPE_MOTU 7
101#define SNDRV_FIREWIRE_TYPE_FIREFACE 8
Christopher Ferris38062f92014-07-09 15:33:25 -0700102struct snd_firewire_get_info {
Tao Baod7db5942015-01-28 10:07:51 -0800103 unsigned int type;
104 unsigned int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800105 unsigned char guid[8];
Tao Baod7db5942015-01-28 10:07:51 -0800106 char device_name[16];
Christopher Ferris38062f92014-07-09 15:33:25 -0700107};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800108#define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64
109struct snd_firewire_tascam_state {
110 __be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
111};
Christopher Ferrisa4792612022-01-10 13:51:15 -0800112#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)
115struct 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)
122struct 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
154struct snd_firewire_motu_command_dsp_meter {
155 float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
156};
Christopher Ferris38062f92014-07-09 15:33:25 -0700157#endif