sound/firewire/motu/motu.h
Source file repositories/reference/linux-study-clean/sound/firewire/motu/motu.h
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/motu/motu.h- Extension
.h- Size
- 10753 bytes
- Lines
- 300
- Domain
- Driver Families
- Bucket
- sound/firewire
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/firewire.hlinux/firewire-constants.hlinux/module.hlinux/mod_devicetable.hlinux/mutex.hlinux/slab.hlinux/compat.hlinux/sched/signal.hsound/control.hsound/core.hsound/pcm.hsound/info.hsound/rawmidi.hsound/firewire.hsound/hwdep.h../lib.h../amdtp-stream.h../iso-resources.h
Detected Declarations
struct snd_motu_packet_formatstruct amdtp_motu_cachestruct snd_motustruct snd_motu_specenum snd_motu_spec_flagsenum snd_motu_clock_sourceenum snd_motu_protocol_versionfunction snd_motu_protocol_get_clock_ratefunction snd_motu_protocol_set_clock_ratefunction snd_motu_protocol_get_clock_sourcefunction snd_motu_protocol_switch_fetching_modefunction snd_motu_protocol_cache_packet_formats
Annotated Snippet
struct snd_motu_packet_format {
unsigned char midi_flag_offset;
unsigned char midi_byte_offset;
unsigned char pcm_byte_offset;
unsigned char msg_chunks;
unsigned char pcm_chunks[3];
};
struct amdtp_motu_cache {
unsigned int *event_offsets;
unsigned int size;
unsigned int tail;
unsigned int tx_cycle_count;
unsigned int head;
unsigned int rx_cycle_count;
};
struct snd_motu {
struct snd_card *card;
struct fw_unit *unit;
struct mutex mutex;
spinlock_t lock;
/* Model dependent information. */
const struct snd_motu_spec *spec;
/* For packet streaming */
struct snd_motu_packet_format tx_packet_formats;
struct snd_motu_packet_format rx_packet_formats;
struct amdtp_stream tx_stream;
struct amdtp_stream rx_stream;
struct fw_iso_resources tx_resources;
struct fw_iso_resources rx_resources;
unsigned int substreams_counter;
/* For notification. */
struct fw_address_handler async_handler;
u32 msg;
/* For uapi */
int dev_lock_count;
bool dev_lock_changed;
wait_queue_head_t hwdep_wait;
struct snd_hwdep *hwdep;
struct amdtp_domain domain;
struct amdtp_motu_cache cache;
void *message_parser;
};
enum snd_motu_spec_flags {
SND_MOTU_SPEC_RX_MIDI_2ND_Q = 0x0001,
SND_MOTU_SPEC_RX_MIDI_3RD_Q = 0x0002,
SND_MOTU_SPEC_TX_MIDI_2ND_Q = 0x0004,
SND_MOTU_SPEC_TX_MIDI_3RD_Q = 0x0008,
SND_MOTU_SPEC_REGISTER_DSP = 0x0010,
SND_MOTU_SPEC_COMMAND_DSP = 0x0020,
};
#define SND_MOTU_CLOCK_RATE_COUNT 6
extern const unsigned int snd_motu_clock_rates[SND_MOTU_CLOCK_RATE_COUNT];
enum snd_motu_clock_source {
SND_MOTU_CLOCK_SOURCE_INTERNAL,
SND_MOTU_CLOCK_SOURCE_ADAT_ON_DSUB,
SND_MOTU_CLOCK_SOURCE_ADAT_ON_OPT,
SND_MOTU_CLOCK_SOURCE_ADAT_ON_OPT_A,
SND_MOTU_CLOCK_SOURCE_ADAT_ON_OPT_B,
SND_MOTU_CLOCK_SOURCE_SPDIF_ON_OPT,
SND_MOTU_CLOCK_SOURCE_SPDIF_ON_OPT_A,
SND_MOTU_CLOCK_SOURCE_SPDIF_ON_OPT_B,
SND_MOTU_CLOCK_SOURCE_SPDIF_ON_COAX,
SND_MOTU_CLOCK_SOURCE_AESEBU_ON_XLR,
SND_MOTU_CLOCK_SOURCE_WORD_ON_BNC,
SND_MOTU_CLOCK_SOURCE_SPH,
SND_MOTU_CLOCK_SOURCE_UNKNOWN,
};
enum snd_motu_protocol_version {
SND_MOTU_PROTOCOL_V1,
SND_MOTU_PROTOCOL_V2,
SND_MOTU_PROTOCOL_V3,
};
struct snd_motu_spec {
const char *const name;
enum snd_motu_protocol_version protocol_version;
Annotation
- Immediate include surface: `linux/device.h`, `linux/firewire.h`, `linux/firewire-constants.h`, `linux/module.h`, `linux/mod_devicetable.h`, `linux/mutex.h`, `linux/slab.h`, `linux/compat.h`.
- Detected declarations: `struct snd_motu_packet_format`, `struct amdtp_motu_cache`, `struct snd_motu`, `struct snd_motu_spec`, `enum snd_motu_spec_flags`, `enum snd_motu_clock_source`, `enum snd_motu_protocol_version`, `function snd_motu_protocol_get_clock_rate`, `function snd_motu_protocol_set_clock_rate`, `function snd_motu_protocol_get_clock_source`.
- Atlas domain: Driver Families / sound/firewire.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.