sound/firewire/tascam/tascam.h
Source file repositories/reference/linux-study-clean/sound/firewire/tascam/tascam.h
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/tascam/tascam.h- Extension
.h- Size
- 6303 bytes
- Lines
- 213
- 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/core.hsound/initval.hsound/info.hsound/pcm.hsound/pcm_params.hsound/firewire.hsound/hwdep.hsound/rawmidi.h../lib.h../amdtp-stream.h../iso-resources.h
Detected Declarations
struct snd_tscm_specstruct snd_fw_async_midi_portstruct snd_tscmenum snd_tscm_clockfunction snd_fw_async_midi_port_runfunction snd_fw_async_midi_port_finish
Annotated Snippet
struct snd_tscm_spec {
const char *const name;
bool has_adat;
bool has_spdif;
unsigned int pcm_capture_analog_channels;
unsigned int pcm_playback_analog_channels;
unsigned int midi_capture_ports;
unsigned int midi_playback_ports;
};
#define TSCM_MIDI_IN_PORT_MAX 4
#define TSCM_MIDI_OUT_PORT_MAX 4
struct snd_fw_async_midi_port {
struct fw_device *parent;
struct work_struct work;
bool idling;
ktime_t next_ktime;
bool error;
struct fw_transaction transaction;
u8 buf[4];
u8 running_status;
bool on_sysex;
struct snd_rawmidi_substream *substream;
int consume_bytes;
};
#define SND_TSCM_QUEUE_COUNT 16
struct snd_tscm {
struct snd_card *card;
struct fw_unit *unit;
struct mutex mutex;
spinlock_t lock;
const struct snd_tscm_spec *spec;
struct fw_iso_resources tx_resources;
struct fw_iso_resources rx_resources;
struct amdtp_stream tx_stream;
struct amdtp_stream rx_stream;
unsigned int substreams_counter;
int dev_lock_count;
bool dev_lock_changed;
wait_queue_head_t hwdep_wait;
/* For MIDI message incoming transactions. */
struct fw_address_handler async_handler;
struct snd_rawmidi_substream *tx_midi_substreams[TSCM_MIDI_IN_PORT_MAX];
/* For MIDI message outgoing transactions. */
struct snd_fw_async_midi_port out_ports[TSCM_MIDI_OUT_PORT_MAX];
// A cache of status information in tx isoc packets.
__be32 state[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
struct snd_hwdep *hwdep;
struct snd_firewire_tascam_change queue[SND_TSCM_QUEUE_COUNT];
unsigned int pull_pos;
unsigned int push_pos;
struct amdtp_domain domain;
bool need_long_tx_init_skip;
};
#define TSCM_ADDR_BASE 0xffff00000000ull
#define TSCM_OFFSET_FIRMWARE_REGISTER 0x0000
#define TSCM_OFFSET_FIRMWARE_FPGA 0x0004
#define TSCM_OFFSET_FIRMWARE_ARM 0x0008
#define TSCM_OFFSET_FIRMWARE_HW 0x000c
#define TSCM_OFFSET_ISOC_TX_CH 0x0200
#define TSCM_OFFSET_UNKNOWN 0x0204
#define TSCM_OFFSET_START_STREAMING 0x0208
#define TSCM_OFFSET_ISOC_RX_CH 0x020c
#define TSCM_OFFSET_ISOC_RX_ON 0x0210 /* Little conviction. */
#define TSCM_OFFSET_TX_PCM_CHANNELS 0x0214
#define TSCM_OFFSET_RX_PCM_CHANNELS 0x0218
#define TSCM_OFFSET_MULTIPLEX_MODE 0x021c
#define TSCM_OFFSET_ISOC_TX_ON 0x0220
/* Unknown 0x0224 */
#define TSCM_OFFSET_CLOCK_STATUS 0x0228
#define TSCM_OFFSET_SET_OPTION 0x022c
#define TSCM_OFFSET_MIDI_TX_ON 0x0300
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_tscm_spec`, `struct snd_fw_async_midi_port`, `struct snd_tscm`, `enum snd_tscm_clock`, `function snd_fw_async_midi_port_run`, `function snd_fw_async_midi_port_finish`.
- 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.