Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/sound
File: firewire.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef _SOUND_FIREWIRE_H_INCLUDED
[1] Fix | Delete
#define _SOUND_FIREWIRE_H_INCLUDED
[2] Fix | Delete
[3] Fix | Delete
#include <linux/ioctl.h>
[4] Fix | Delete
#include <linux/types.h>
[5] Fix | Delete
[6] Fix | Delete
/* events can be read() from the hwdep device */
[7] Fix | Delete
[8] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc
[9] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e
[10] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475
[11] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c
[12] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
[13] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d
[14] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244
[15] Fix | Delete
#define SNDRV_FIREWIRE_EVENT_FF400_MESSAGE 0x4f6c6761
[16] Fix | Delete
[17] Fix | Delete
struct snd_firewire_event_common {
[18] Fix | Delete
unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */
[19] Fix | Delete
};
[20] Fix | Delete
[21] Fix | Delete
struct snd_firewire_event_lock_status {
[22] Fix | Delete
unsigned int type;
[23] Fix | Delete
unsigned int status; /* 0/1 = unlocked/locked */
[24] Fix | Delete
};
[25] Fix | Delete
[26] Fix | Delete
struct snd_firewire_event_dice_notification {
[27] Fix | Delete
unsigned int type;
[28] Fix | Delete
unsigned int notification; /* DICE-specific bits */
[29] Fix | Delete
};
[30] Fix | Delete
[31] Fix | Delete
#define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32)((__u16)~0) - 1)
[32] Fix | Delete
/* each field should be in big endian */
[33] Fix | Delete
struct snd_efw_transaction {
[34] Fix | Delete
__be32 length;
[35] Fix | Delete
__be32 version;
[36] Fix | Delete
__be32 seqnum;
[37] Fix | Delete
__be32 category;
[38] Fix | Delete
__be32 command;
[39] Fix | Delete
__be32 status;
[40] Fix | Delete
__be32 params[0];
[41] Fix | Delete
};
[42] Fix | Delete
struct snd_firewire_event_efw_response {
[43] Fix | Delete
unsigned int type;
[44] Fix | Delete
__be32 response[0]; /* some responses */
[45] Fix | Delete
};
[46] Fix | Delete
[47] Fix | Delete
struct snd_firewire_event_digi00x_message {
[48] Fix | Delete
unsigned int type;
[49] Fix | Delete
__u32 message; /* Digi00x-specific message */
[50] Fix | Delete
};
[51] Fix | Delete
[52] Fix | Delete
struct snd_firewire_event_motu_notification {
[53] Fix | Delete
unsigned int type;
[54] Fix | Delete
__u32 message; /* MOTU-specific bits. */
[55] Fix | Delete
};
[56] Fix | Delete
[57] Fix | Delete
struct snd_firewire_tascam_change {
[58] Fix | Delete
unsigned int index;
[59] Fix | Delete
__be32 before;
[60] Fix | Delete
__be32 after;
[61] Fix | Delete
};
[62] Fix | Delete
[63] Fix | Delete
struct snd_firewire_event_tascam_control {
[64] Fix | Delete
unsigned int type;
[65] Fix | Delete
struct snd_firewire_tascam_change changes[0];
[66] Fix | Delete
};
[67] Fix | Delete
[68] Fix | Delete
struct snd_firewire_event_motu_register_dsp_change {
[69] Fix | Delete
unsigned int type;
[70] Fix | Delete
__u32 count; /* The number of changes. */
[71] Fix | Delete
__u32 changes[]; /* Encoded event for change of register DSP. */
[72] Fix | Delete
};
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* struct snd_firewire_event_ff400_message - the container for message from Fireface 400 when
[76] Fix | Delete
* operating hardware knob.
[77] Fix | Delete
*
[78] Fix | Delete
* @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.
[79] Fix | Delete
* @message_count: The number of messages.
[80] Fix | Delete
* @messages.message: The messages expressing hardware knob operation.
[81] Fix | Delete
* @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous
[82] Fix | Delete
* transaction was sent to deliver the message. It has 16 bit unsigned integer
[83] Fix | Delete
* value. The higher 3 bits of value expresses the lower three bits of second
[84] Fix | Delete
* field in the format of CYCLE_TIME, up to 7. The rest 13 bits expresses cycle
[85] Fix | Delete
* field up to 7999.
[86] Fix | Delete
*
[87] Fix | Delete
* The structure expresses message transmitted by Fireface 400 when operating hardware knob.
[88] Fix | Delete
*/
[89] Fix | Delete
struct snd_firewire_event_ff400_message {
[90] Fix | Delete
unsigned int type;
[91] Fix | Delete
unsigned int message_count;
[92] Fix | Delete
struct {
[93] Fix | Delete
__u32 message;
[94] Fix | Delete
__u32 tstamp;
[95] Fix | Delete
} messages[];
[96] Fix | Delete
};
[97] Fix | Delete
[98] Fix | Delete
union snd_firewire_event {
[99] Fix | Delete
struct snd_firewire_event_common common;
[100] Fix | Delete
struct snd_firewire_event_lock_status lock_status;
[101] Fix | Delete
struct snd_firewire_event_dice_notification dice_notification;
[102] Fix | Delete
struct snd_firewire_event_efw_response efw_response;
[103] Fix | Delete
struct snd_firewire_event_digi00x_message digi00x_message;
[104] Fix | Delete
struct snd_firewire_event_tascam_control tascam_control;
[105] Fix | Delete
struct snd_firewire_event_motu_notification motu_notification;
[106] Fix | Delete
struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
[107] Fix | Delete
struct snd_firewire_event_ff400_message ff400_message;
[108] Fix | Delete
};
[109] Fix | Delete
[110] Fix | Delete
[111] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info)
[112] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
[113] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
[114] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state)
[115] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter)
[116] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter)
[117] Fix | Delete
#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_PARAMETER _IOR('H', 0xfe, struct snd_firewire_motu_register_dsp_parameter)
[118] Fix | Delete
[119] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_DICE 1
[120] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
[121] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_BEBOB 3
[122] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_OXFW 4
[123] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_DIGI00X 5
[124] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_TASCAM 6
[125] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_MOTU 7
[126] Fix | Delete
#define SNDRV_FIREWIRE_TYPE_FIREFACE 8
[127] Fix | Delete
[128] Fix | Delete
struct snd_firewire_get_info {
[129] Fix | Delete
unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */
[130] Fix | Delete
unsigned int card; /* same as fw_cdev_get_info.card */
[131] Fix | Delete
unsigned char guid[8];
[132] Fix | Delete
char device_name[16]; /* device node in /dev */
[133] Fix | Delete
};
[134] Fix | Delete
[135] Fix | Delete
/*
[136] Fix | Delete
* SNDRV_FIREWIRE_IOCTL_LOCK prevents the driver from streaming.
[137] Fix | Delete
* Returns -EBUSY if the driver is already streaming.
[138] Fix | Delete
*/
[139] Fix | Delete
[140] Fix | Delete
#define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64
[141] Fix | Delete
[142] Fix | Delete
struct snd_firewire_tascam_state {
[143] Fix | Delete
__be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
[144] Fix | Delete
};
[145] Fix | Delete
[146] Fix | Delete
/*
[147] Fix | Delete
* In below MOTU models, software is allowed to control their DSP by accessing to registers.
[148] Fix | Delete
* - 828mk2
[149] Fix | Delete
* - 896hd
[150] Fix | Delete
* - Traveler
[151] Fix | Delete
* - 8 pre
[152] Fix | Delete
* - Ultralite
[153] Fix | Delete
* - 4 pre
[154] Fix | Delete
* - Audio Express
[155] Fix | Delete
*
[156] Fix | Delete
* On the other hand, the status of DSP is split into specific messages included in the sequence of
[157] Fix | Delete
* isochronous packet. ALSA firewire-motu driver gathers the messages and allow userspace applications
[158] Fix | Delete
* to read it via ioctl. In 828mk2, 896hd, and Traveler, hardware meter for all of physical inputs
[159] Fix | Delete
* are put into the message, while one pair of physical outputs is selected. The selection is done by
[160] Fix | Delete
* LSB one byte in asynchronous write quadlet transaction to 0x'ffff'f000'0b2c.
[161] Fix | Delete
*
[162] Fix | Delete
* I note that V3HD/V4HD uses asynchronous transaction for the purpose. The destination address is
[163] Fix | Delete
* registered to 0x'ffff'f000'0b38 and '0b3c by asynchronous write quadlet request. The size of
[164] Fix | Delete
* message differs between 23 and 51 quadlets. For the case, the number of mixer bus can be extended
[165] Fix | Delete
* up to 12.
[166] Fix | Delete
*/
[167] Fix | Delete
[168] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT 24
[169] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT 24
[170] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT \
[171] Fix | Delete
(SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT)
[172] Fix | Delete
[173] Fix | Delete
/**
[174] Fix | Delete
* struct snd_firewire_motu_register_dsp_meter - the container for meter information in DSP
[175] Fix | Delete
* controlled by register access
[176] Fix | Delete
* @data: Signal level meters. The mapping between position and input/output channel is
[177] Fix | Delete
* model-dependent.
[178] Fix | Delete
*
[179] Fix | Delete
* The structure expresses the part of DSP status for hardware meter. The u8 storage includes linear
[180] Fix | Delete
* value for audio signal level between 0x00 and 0x7f.
[181] Fix | Delete
*/
[182] Fix | Delete
struct snd_firewire_motu_register_dsp_meter {
[183] Fix | Delete
__u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT];
[184] Fix | Delete
};
[185] Fix | Delete
[186] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4
[187] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20
[188] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10
[189] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
[190] Fix | Delete
[191] Fix | Delete
/**
[192] Fix | Delete
* snd_firewire_motu_register_dsp_parameter - the container for parameters of DSP controlled
[193] Fix | Delete
* by register access.
[194] Fix | Delete
* @mixer.source.gain: The gain of source to mixer.
[195] Fix | Delete
* @mixer.source.pan: The L/R balance of source to mixer.
[196] Fix | Delete
* @mixer.source.flag: The flag of source to mixer, including mute, solo.
[197] Fix | Delete
* @mixer.source.paired_balance: The L/R balance of paired source to mixer, only for 4 pre and
[198] Fix | Delete
* Audio Express.
[199] Fix | Delete
* @mixer.source.paired_width: The width of paired source to mixer, only for 4 pre and
[200] Fix | Delete
* Audio Express.
[201] Fix | Delete
* @mixer.output.paired_volume: The volume of paired output from mixer.
[202] Fix | Delete
* @mixer.output.paired_flag: The flag of paired output from mixer.
[203] Fix | Delete
* @output.main_paired_volume: The volume of paired main output.
[204] Fix | Delete
* @output.hp_paired_volume: The volume of paired hp output.
[205] Fix | Delete
* @output.hp_paired_assignment: The source assigned to paired hp output.
[206] Fix | Delete
* @output.reserved: Padding for 32 bit alignment for future extension.
[207] Fix | Delete
* @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler.
[208] Fix | Delete
* @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and
[209] Fix | Delete
* Traveler.
[210] Fix | Delete
* @line_input.reserved: Padding for 32 bit alignment for future extension.
[211] Fix | Delete
* @input.gain_and_invert: The value including gain and invert for input, only for Ultralite, 4 pre
[212] Fix | Delete
* and Audio Express.
[213] Fix | Delete
* @input.flag: The flag of input; e.g. jack detection, phantom power, and pad, only for Ultralite,
[214] Fix | Delete
* 4 pre and Audio express.
[215] Fix | Delete
* @reserved: Padding so that the size of structure is kept to 512 byte, but for future extension.
[216] Fix | Delete
*
[217] Fix | Delete
* The structure expresses the set of parameters for DSP controlled by register access.
[218] Fix | Delete
*/
[219] Fix | Delete
struct snd_firewire_motu_register_dsp_parameter {
[220] Fix | Delete
struct {
[221] Fix | Delete
struct {
[222] Fix | Delete
__u8 gain[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
[223] Fix | Delete
__u8 pan[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
[224] Fix | Delete
__u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
[225] Fix | Delete
__u8 paired_balance[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
[226] Fix | Delete
__u8 paired_width[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
[227] Fix | Delete
} source[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
[228] Fix | Delete
struct {
[229] Fix | Delete
__u8 paired_volume[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
[230] Fix | Delete
__u8 paired_flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
[231] Fix | Delete
} output;
[232] Fix | Delete
} mixer;
[233] Fix | Delete
struct {
[234] Fix | Delete
__u8 main_paired_volume;
[235] Fix | Delete
__u8 hp_paired_volume;
[236] Fix | Delete
__u8 hp_paired_assignment;
[237] Fix | Delete
__u8 reserved[5];
[238] Fix | Delete
} output;
[239] Fix | Delete
struct {
[240] Fix | Delete
__u8 boost_flag;
[241] Fix | Delete
__u8 nominal_level_flag;
[242] Fix | Delete
__u8 reserved[6];
[243] Fix | Delete
} line_input;
[244] Fix | Delete
struct {
[245] Fix | Delete
__u8 gain_and_invert[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
[246] Fix | Delete
__u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
[247] Fix | Delete
} input;
[248] Fix | Delete
__u8 reserved[64];
[249] Fix | Delete
};
[250] Fix | Delete
[251] Fix | Delete
/*
[252] Fix | Delete
* In below MOTU models, software is allowed to control their DSP by command in frame of
[253] Fix | Delete
* asynchronous transaction to 0x'ffff'0001'0000:
[254] Fix | Delete
*
[255] Fix | Delete
* - 828 mk3 (FireWire only and Hybrid)
[256] Fix | Delete
* - 896 mk3 (FireWire only and Hybrid)
[257] Fix | Delete
* - Ultralite mk3 (FireWire only and Hybrid)
[258] Fix | Delete
* - Traveler mk3
[259] Fix | Delete
* - Track 16
[260] Fix | Delete
*
[261] Fix | Delete
* On the other hand, the states of hardware meter is split into specific messages included in the
[262] Fix | Delete
* sequence of isochronous packet. ALSA firewire-motu driver gathers the message and allow userspace
[263] Fix | Delete
* application to read it via ioctl.
[264] Fix | Delete
*/
[265] Fix | Delete
[266] Fix | Delete
#define SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT 400
[267] Fix | Delete
[268] Fix | Delete
/**
[269] Fix | Delete
* struct snd_firewire_motu_command_dsp_meter - the container for meter information in DSP
[270] Fix | Delete
* controlled by command
[271] Fix | Delete
* @data: Signal level meters. The mapping between position and signal channel is model-dependent.
[272] Fix | Delete
*
[273] Fix | Delete
* The structure expresses the part of DSP status for hardware meter. The 32 bit storage is
[274] Fix | Delete
* estimated to include IEEE 764 32 bit single precision floating point (binary32) value. It is
[275] Fix | Delete
* expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0.
[276] Fix | Delete
*/
[277] Fix | Delete
struct snd_firewire_motu_command_dsp_meter {
[278] Fix | Delete
float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
[279] Fix | Delete
};
[280] Fix | Delete
[281] Fix | Delete
#endif /* _SOUND_FIREWIRE_H_INCLUDED */
[282] Fix | Delete
[283] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function