sound/firewire/oxfw/oxfw.h
Source file repositories/reference/linux-study-clean/sound/firewire/oxfw/oxfw.h
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/oxfw/oxfw.h- Extension
.h- Size
- 5688 bytes
- Lines
- 167
- 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/initval.hsound/pcm.hsound/pcm_params.hsound/info.hsound/rawmidi.hsound/firewire.hsound/hwdep.h../lib.h../fcp.h../packets-buffer.h../iso-resources.h../amdtp-am824.h../cmp.h
Detected Declarations
struct snd_oxfwstruct snd_oxfw_stream_formationenum snd_oxfw_quirkfunction avc_stream_get_format_singlefunction avc_stream_get_format_list
Annotated Snippet
struct snd_oxfw {
struct snd_card *card;
struct fw_unit *unit;
struct mutex mutex;
spinlock_t lock;
// The combination of snd_oxfw_quirk enumeration-constants.
unsigned int quirks;
bool has_output;
bool has_input;
u8 *tx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES];
u8 *rx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES];
bool assumed;
struct cmp_connection out_conn;
struct cmp_connection in_conn;
struct amdtp_stream tx_stream;
struct amdtp_stream rx_stream;
unsigned int substreams_count;
unsigned int midi_input_ports;
unsigned int midi_output_ports;
int dev_lock_count;
bool dev_lock_changed;
wait_queue_head_t hwdep_wait;
void *spec;
struct amdtp_domain domain;
};
/*
* AV/C Stream Format Information Specification 1.1 Working Draft
* (Apr 2005, 1394TA)
*/
int avc_stream_set_format(struct fw_unit *unit, enum avc_general_plug_dir dir,
unsigned int pid, u8 *format, unsigned int len);
int avc_stream_get_format(struct fw_unit *unit,
enum avc_general_plug_dir dir, unsigned int pid,
u8 *buf, unsigned int *len, unsigned int eid);
static inline int
avc_stream_get_format_single(struct fw_unit *unit,
enum avc_general_plug_dir dir, unsigned int pid,
u8 *buf, unsigned int *len)
{
return avc_stream_get_format(unit, dir, pid, buf, len, 0xff);
}
static inline int
avc_stream_get_format_list(struct fw_unit *unit,
enum avc_general_plug_dir dir, unsigned int pid,
u8 *buf, unsigned int *len,
unsigned int eid)
{
return avc_stream_get_format(unit, dir, pid, buf, len, eid);
}
/*
* AV/C Digital Interface Command Set General Specification 4.2
* (Sep 2004, 1394TA)
*/
int avc_general_inquiry_sig_fmt(struct fw_unit *unit, unsigned int rate,
enum avc_general_plug_dir dir,
unsigned short pid);
int snd_oxfw_stream_init_duplex(struct snd_oxfw *oxfw);
int snd_oxfw_stream_reserve_duplex(struct snd_oxfw *oxfw,
struct amdtp_stream *stream,
unsigned int rate, unsigned int pcm_channels,
unsigned int frames_per_period,
unsigned int frames_per_buffer);
int snd_oxfw_stream_start_duplex(struct snd_oxfw *oxfw);
void snd_oxfw_stream_stop_duplex(struct snd_oxfw *oxfw);
void snd_oxfw_stream_destroy_duplex(struct snd_oxfw *oxfw);
void snd_oxfw_stream_update_duplex(struct snd_oxfw *oxfw);
struct snd_oxfw_stream_formation {
unsigned int rate;
unsigned int pcm;
unsigned int midi;
};
int snd_oxfw_stream_parse_format(const u8 *format,
struct snd_oxfw_stream_formation *formation);
int snd_oxfw_stream_get_current_formation(struct snd_oxfw *oxfw,
enum avc_general_plug_dir dir,
struct snd_oxfw_stream_formation *formation);
int snd_oxfw_stream_discover(struct snd_oxfw *oxfw);
void snd_oxfw_stream_lock_changed(struct snd_oxfw *oxfw);
int snd_oxfw_stream_lock_try(struct snd_oxfw *oxfw);
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_oxfw`, `struct snd_oxfw_stream_formation`, `enum snd_oxfw_quirk`, `function avc_stream_get_format_single`, `function avc_stream_get_format_list`.
- 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.