sound/firewire/bebob/bebob.h
Source file repositories/reference/linux-study-clean/sound/firewire/bebob/bebob.h
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/bebob/bebob.h- Extension
.h- Size
- 8008 bytes
- Lines
- 257
- 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/compat.hlinux/device.hlinux/firewire.hlinux/firewire-constants.hlinux/module.hlinux/mod_devicetable.hlinux/delay.hlinux/slab.hlinux/sched/signal.hsound/core.hsound/initval.hsound/info.hsound/rawmidi.hsound/pcm.hsound/pcm_params.hsound/firewire.hsound/hwdep.h../lib.h../fcp.h../packets-buffer.h../iso-resources.h../amdtp-am824.h../cmp.h
Detected Declarations
struct snd_bebobstruct snd_bebob_stream_formationstruct snd_bebob_clock_specstruct snd_bebob_rate_specstruct snd_bebob_meter_specstruct snd_bebob_specstruct snd_bebobenum snd_bebob_clock_typeenum snd_bebob_quirkenum avc_bridgeco_plug_direnum avc_bridgeco_plug_modeenum avc_bridgeco_plug_unitenum avc_bridgeco_plug_typefunction snd_bebob_read_blockfunction snd_bebob_read_quadfunction avc_bridgeco_fill_unit_addrfunction avc_bridgeco_fill_msu_addr
Annotated Snippet
struct snd_bebob_stream_formation {
unsigned int pcm;
unsigned int midi;
};
/* this is a lookup table for index of stream formations */
extern const unsigned int snd_bebob_rate_table[SND_BEBOB_STRM_FMT_ENTRIES];
/* device specific operations */
enum snd_bebob_clock_type {
SND_BEBOB_CLOCK_TYPE_INTERNAL = 0,
SND_BEBOB_CLOCK_TYPE_EXTERNAL,
SND_BEBOB_CLOCK_TYPE_SYT,
};
struct snd_bebob_clock_spec {
unsigned int num;
const char *const *labels;
const enum snd_bebob_clock_type *types;
int (*get)(struct snd_bebob *bebob, unsigned int *id);
};
struct snd_bebob_rate_spec {
int (*get)(struct snd_bebob *bebob, unsigned int *rate);
int (*set)(struct snd_bebob *bebob, unsigned int rate);
};
struct snd_bebob_meter_spec {
unsigned int num;
const char *const *labels;
int (*get)(struct snd_bebob *bebob, u32 *target, unsigned int size);
};
struct snd_bebob_spec {
const struct snd_bebob_clock_spec *clock;
const struct snd_bebob_rate_spec *rate;
const struct snd_bebob_meter_spec *meter;
};
enum snd_bebob_quirk {
SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC = (1 << 0),
SND_BEBOB_QUIRK_WRONG_DBC = (1 << 1),
};
struct snd_bebob {
struct snd_card *card;
struct fw_unit *unit;
int card_index;
struct mutex mutex;
spinlock_t lock;
const struct snd_bebob_spec *spec;
unsigned int quirks; // Combination of snd_bebob_quirk enumerations.
unsigned int midi_input_ports;
unsigned int midi_output_ports;
struct amdtp_stream tx_stream;
struct amdtp_stream rx_stream;
struct cmp_connection out_conn;
struct cmp_connection in_conn;
unsigned int substreams_counter;
struct snd_bebob_stream_formation
tx_stream_formations[SND_BEBOB_STRM_FMT_ENTRIES];
struct snd_bebob_stream_formation
rx_stream_formations[SND_BEBOB_STRM_FMT_ENTRIES];
int sync_input_plug;
/* for uapi */
int dev_lock_count;
bool dev_lock_changed;
wait_queue_head_t hwdep_wait;
/* for M-Audio special devices */
void *maudio_special_quirk;
struct amdtp_domain domain;
};
static inline int
snd_bebob_read_block(struct fw_unit *unit, u64 addr, void *buf, int size)
{
return snd_fw_transaction(unit, TCODE_READ_BLOCK_REQUEST,
BEBOB_ADDR_REG_INFO + addr,
buf, size, 0);
}
static inline int
snd_bebob_read_quad(struct fw_unit *unit, u64 addr, u32 *buf)
{
return snd_fw_transaction(unit, TCODE_READ_QUADLET_REQUEST,
BEBOB_ADDR_REG_INFO + addr,
Annotation
- Immediate include surface: `linux/compat.h`, `linux/device.h`, `linux/firewire.h`, `linux/firewire-constants.h`, `linux/module.h`, `linux/mod_devicetable.h`, `linux/delay.h`, `linux/slab.h`.
- Detected declarations: `struct snd_bebob`, `struct snd_bebob_stream_formation`, `struct snd_bebob_clock_spec`, `struct snd_bebob_rate_spec`, `struct snd_bebob_meter_spec`, `struct snd_bebob_spec`, `struct snd_bebob`, `enum snd_bebob_clock_type`, `enum snd_bebob_quirk`, `enum avc_bridgeco_plug_dir`.
- 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.