/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _UAPI_SOUND_FIREWIRE_H_INCLUDED #define _UAPI_SOUND_FIREWIRE_H_INCLUDED #include <linux/ioctl.h> #include <linux/types.h> /* events can be read() from the hwdep device */ #define SNDRV_FIREWIRE_EVENT_LOCK_STATUS … #define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION … #define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE … #define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE … #define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION … #define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL … #define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE … #define SNDRV_FIREWIRE_EVENT_FF400_MESSAGE … struct snd_firewire_event_common { … }; struct snd_firewire_event_lock_status { … }; struct snd_firewire_event_dice_notification { … }; #define SND_EFW_TRANSACTION_USER_SEQNUM_MAX … /* each field should be in big endian */ struct snd_efw_transaction { … }; struct snd_firewire_event_efw_response { … }; struct snd_firewire_event_digi00x_message { … }; struct snd_firewire_event_motu_notification { … }; struct snd_firewire_tascam_change { … }; struct snd_firewire_event_tascam_control { … }; struct snd_firewire_event_motu_register_dsp_change { … }; /** * struct snd_firewire_event_ff400_message - the container for message from Fireface 400 when * operating hardware knob. * * @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE. * @message_count: The number of messages. * @messages.message: The messages expressing hardware knob operation. * @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous * transaction was sent to deliver the message. It has 16 bit unsigned integer * value. The higher 3 bits of value expresses the lower three bits of second * field in the format of CYCLE_TIME, up to 7. The rest 13 bits expresses cycle * field up to 7999. * * The structure expresses message transmitted by Fireface 400 when operating hardware knob. */ struct snd_firewire_event_ff400_message { … }; snd_firewire_event; #define SNDRV_FIREWIRE_IOCTL_GET_INFO … #define SNDRV_FIREWIRE_IOCTL_LOCK … #define SNDRV_FIREWIRE_IOCTL_UNLOCK … #define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE … #define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER … #define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER … #define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_PARAMETER … #define SNDRV_FIREWIRE_TYPE_DICE … #define SNDRV_FIREWIRE_TYPE_FIREWORKS … #define SNDRV_FIREWIRE_TYPE_BEBOB … #define SNDRV_FIREWIRE_TYPE_OXFW … #define SNDRV_FIREWIRE_TYPE_DIGI00X … #define SNDRV_FIREWIRE_TYPE_TASCAM … #define SNDRV_FIREWIRE_TYPE_MOTU … #define SNDRV_FIREWIRE_TYPE_FIREFACE … struct snd_firewire_get_info { … }; /* * SNDRV_FIREWIRE_IOCTL_LOCK prevents the driver from streaming. * Returns -EBUSY if the driver is already streaming. */ #define SNDRV_FIREWIRE_TASCAM_STATE_COUNT … struct snd_firewire_tascam_state { … }; /* * In below MOTU models, software is allowed to control their DSP by accessing to registers. * - 828mk2 * - 896hd * - Traveler * - 8 pre * - Ultralite * - 4 pre * - Audio Express * * On the other hand, the status of DSP is split into specific messages included in the sequence of * isochronous packet. ALSA firewire-motu driver gathers the messages and allow userspace applications * to read it via ioctl. In 828mk2, 896hd, and Traveler, hardware meter for all of physical inputs * are put into the message, while one pair of physical outputs is selected. The selection is done by * LSB one byte in asynchronous write quadlet transaction to 0x'ffff'f000'0b2c. * * I note that V3HD/V4HD uses asynchronous transaction for the purpose. The destination address is * registered to 0x'ffff'f000'0b38 and '0b3c by asynchronous write quadlet request. The size of * message differs between 23 and 51 quadlets. For the case, the number of mixer bus can be extended * up to 12. */ #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT … #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT … #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT … /** * struct snd_firewire_motu_register_dsp_meter - the container for meter information in DSP * controlled by register access * @data: Signal level meters. The mapping between position and input/output channel is * model-dependent. * * The structure expresses the part of DSP status for hardware meter. The u8 storage includes linear * value for audio signal level between 0x00 and 0x7f. */ struct snd_firewire_motu_register_dsp_meter { … }; #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT … #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT … #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT … #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT … /** * snd_firewire_motu_register_dsp_parameter - the container for parameters of DSP controlled * by register access. * @mixer.source.gain: The gain of source to mixer. * @mixer.source.pan: The L/R balance of source to mixer. * @mixer.source.flag: The flag of source to mixer, including mute, solo. * @mixer.source.paired_balance: The L/R balance of paired source to mixer, only for 4 pre and * Audio Express. * @mixer.source.paired_width: The width of paired source to mixer, only for 4 pre and * Audio Express. * @mixer.output.paired_volume: The volume of paired output from mixer. * @mixer.output.paired_flag: The flag of paired output from mixer. * @output.main_paired_volume: The volume of paired main output. * @output.hp_paired_volume: The volume of paired hp output. * @output.hp_paired_assignment: The source assigned to paired hp output. * @output.reserved: Padding for 32 bit alignment for future extension. * @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler. * @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and * Traveler. * @line_input.reserved: Padding for 32 bit alignment for future extension. * @input.gain_and_invert: The value including gain and invert for input, only for Ultralite, 4 pre * and Audio Express. * @input.flag: The flag of input; e.g. jack detection, phantom power, and pad, only for Ultralite, * 4 pre and Audio express. * @reserved: Padding so that the size of structure is kept to 512 byte, but for future extension. * * The structure expresses the set of parameters for DSP controlled by register access. */ struct snd_firewire_motu_register_dsp_parameter { … }; /* * In below MOTU models, software is allowed to control their DSP by command in frame of * asynchronous transaction to 0x'ffff'0001'0000: * * - 828 mk3 (FireWire only and Hybrid) * - 896 mk3 (FireWire only and Hybrid) * - Ultralite mk3 (FireWire only and Hybrid) * - Traveler mk3 * - Track 16 * * On the other hand, the states of hardware meter is split into specific messages included in the * sequence of isochronous packet. ALSA firewire-motu driver gathers the message and allow userspace * application to read it via ioctl. */ #define SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT … /** * struct snd_firewire_motu_command_dsp_meter - the container for meter information in DSP * controlled by command * @data: Signal level meters. The mapping between position and signal channel is model-dependent. * * The structure expresses the part of DSP status for hardware meter. The 32 bit storage is * estimated to include IEEE 764 32 bit single precision floating point (binary32) value. It is * expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0. */ struct snd_firewire_motu_command_dsp_meter { … }; #endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */