blob: 99cf3d40283d86033fe70183c80c23273ba1a33e [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 */
Christopher Ferris38062f92014-07-09 15:33:25 -07007#ifndef _UAPI_SOUND_FIREWIRE_H_INCLUDED
8#define _UAPI_SOUND_FIREWIRE_H_INCLUDED
9#include <linux/ioctl.h>
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070010#include <linux/types.h>
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070011#define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc
Christopher Ferris38062f92014-07-09 15:33:25 -070012#define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070013#define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475
Christopher Ferris05d08e92016-02-04 13:16:38 -080014#define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c
Christopher Ferris525ce912017-07-26 13:12:53 -070015#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
Christopher Ferrisd842e432019-03-07 10:21:59 -080016#define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d
Christopher Ferrisa4792612022-01-10 13:51:15 -080017#define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000018#define SNDRV_FIREWIRE_EVENT_FF400_MESSAGE 0x4f6c6761
Christopher Ferris05d08e92016-02-04 13:16:38 -080019struct snd_firewire_event_common {
Tao Baod7db5942015-01-28 10:07:51 -080020 unsigned int type;
Christopher Ferris38062f92014-07-09 15:33:25 -070021};
Christopher Ferris38062f92014-07-09 15:33:25 -070022struct snd_firewire_event_lock_status {
Christopher Ferris05d08e92016-02-04 13:16:38 -080023 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -080024 unsigned int status;
Christopher Ferris38062f92014-07-09 15:33:25 -070025};
Christopher Ferris38062f92014-07-09 15:33:25 -070026struct snd_firewire_event_dice_notification {
Christopher Ferris05d08e92016-02-04 13:16:38 -080027 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -080028 unsigned int notification;
Christopher Ferris38062f92014-07-09 15:33:25 -070029};
Tao Baod7db5942015-01-28 10:07:51 -080030#define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32) ((__u16) ~0) - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080031struct snd_efw_transaction {
Tao Baod7db5942015-01-28 10:07:51 -080032 __be32 length;
33 __be32 version;
34 __be32 seqnum;
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 __be32 category;
Tao Baod7db5942015-01-28 10:07:51 -080036 __be32 command;
37 __be32 status;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070038 __be32 params[];
Christopher Ferris05d08e92016-02-04 13:16:38 -080039};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070040struct snd_firewire_event_efw_response {
Tao Baod7db5942015-01-28 10:07:51 -080041 unsigned int type;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070042 __be32 response[];
Christopher Ferris05d08e92016-02-04 13:16:38 -080043};
44struct snd_firewire_event_digi00x_message {
45 unsigned int type;
46 __u32 message;
Christopher Ferris05d08e92016-02-04 13:16:38 -080047};
Christopher Ferris525ce912017-07-26 13:12:53 -070048struct snd_firewire_event_motu_notification {
49 unsigned int type;
50 __u32 message;
51};
Christopher Ferrisd842e432019-03-07 10:21:59 -080052struct snd_firewire_tascam_change {
53 unsigned int index;
54 __be32 before;
55 __be32 after;
56};
57struct snd_firewire_event_tascam_control {
58 unsigned int type;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070059 struct snd_firewire_tascam_change changes[];
Christopher Ferrisd842e432019-03-07 10:21:59 -080060};
Christopher Ferrisa4792612022-01-10 13:51:15 -080061struct snd_firewire_event_motu_register_dsp_change {
62 unsigned int type;
63 __u32 count;
64 __u32 changes[];
65};
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000066struct 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 Ferris38062f92014-07-09 15:33:25 -070074union snd_firewire_event {
Tao Baod7db5942015-01-28 10:07:51 -080075 struct snd_firewire_event_common common;
76 struct snd_firewire_event_lock_status lock_status;
Christopher Ferris05d08e92016-02-04 13:16:38 -080077 struct snd_firewire_event_dice_notification dice_notification;
Tao Baod7db5942015-01-28 10:07:51 -080078 struct snd_firewire_event_efw_response efw_response;
Christopher Ferris05d08e92016-02-04 13:16:38 -080079 struct snd_firewire_event_digi00x_message digi00x_message;
Christopher Ferrisd842e432019-03-07 10:21:59 -080080 struct snd_firewire_event_tascam_control tascam_control;
Christopher Ferris525ce912017-07-26 13:12:53 -070081 struct snd_firewire_event_motu_notification motu_notification;
Christopher Ferrisa4792612022-01-10 13:51:15 -080082 struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000083 struct snd_firewire_event_ff400_message ff400_message;
Christopher Ferris38062f92014-07-09 15:33:25 -070084};
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 Ferrisba8d4f42014-09-03 19:56:49 -070087#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
Christopher Ferrisd842e432019-03-07 10:21:59 -080088#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state)
Christopher Ferrisa4792612022-01-10 13:51:15 -080089#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 Ferris38062f92014-07-09 15:33:25 -070092#define SNDRV_FIREWIRE_TYPE_DICE 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070093#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
94#define SNDRV_FIREWIRE_TYPE_BEBOB 3
Christopher Ferris05d08e92016-02-04 13:16:38 -080095#define SNDRV_FIREWIRE_TYPE_OXFW 4
96#define SNDRV_FIREWIRE_TYPE_DIGI00X 5
Christopher Ferris05d08e92016-02-04 13:16:38 -080097#define SNDRV_FIREWIRE_TYPE_TASCAM 6
Christopher Ferris525ce912017-07-26 13:12:53 -070098#define SNDRV_FIREWIRE_TYPE_MOTU 7
99#define SNDRV_FIREWIRE_TYPE_FIREFACE 8
Christopher Ferris38062f92014-07-09 15:33:25 -0700100struct snd_firewire_get_info {
Tao Baod7db5942015-01-28 10:07:51 -0800101 unsigned int type;
102 unsigned int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103 unsigned char guid[8];
Tao Baod7db5942015-01-28 10:07:51 -0800104 char device_name[16];
Christopher Ferris38062f92014-07-09 15:33:25 -0700105};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800106#define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64
107struct snd_firewire_tascam_state {
108 __be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
109};
Christopher Ferrisa4792612022-01-10 13:51:15 -0800110#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)
113struct 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)
120struct 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
152struct snd_firewire_motu_command_dsp_meter {
153 float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
154};
Christopher Ferris38062f92014-07-09 15:33:25 -0700155#endif