sound/firewire/dice/dice-weiss.c
Source file repositories/reference/linux-study-clean/sound/firewire/dice/dice-weiss.c
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/dice/dice-weiss.c- Extension
.c- Size
- 2970 bytes
- Lines
- 105
- 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
dice.h
Detected Declarations
struct dice_weiss_specfunction snd_dice_detect_weiss_formats
Annotated Snippet
struct dice_weiss_spec {
unsigned int tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT];
unsigned int rx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT];
};
// Weiss DAC202: 192kHz 2-channel DAC
static const struct dice_weiss_spec dac202 = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss MAN301: 192kHz 2-channel music archive network player
static const struct dice_weiss_spec man301 = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss INT202: 192kHz unidirectional 2-channel digital Firewire nterface
static const struct dice_weiss_spec int202 = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss INT203: 192kHz bidirectional 2-channel digital Firewire nterface
static const struct dice_weiss_spec int203 = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss ADC2: 192kHz A/D converter with microphone preamps and line nputs
static const struct dice_weiss_spec adc2 = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss DAC2/Minerva: 192kHz 2-channel DAC
static const struct dice_weiss_spec dac2_minerva = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss Vesta: 192kHz 2-channel Firewire to AES/EBU interface
static const struct dice_weiss_spec vesta = {
.tx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
.rx_pcm_chs = {{2, 2, 2}, {0, 0, 0} },
};
// Weiss AFI1: 192kHz 24-channel Firewire to ADAT or AES/EBU interface
static const struct dice_weiss_spec afi1 = {
.tx_pcm_chs = {{24, 16, 8}, {0, 0, 0} },
.rx_pcm_chs = {{24, 16, 8}, {0, 0, 0} },
};
int snd_dice_detect_weiss_formats(struct snd_dice *dice)
{
static const struct {
u32 model_id;
const struct dice_weiss_spec *spec;
} *entry, entries[] = {
{0x000007, &dac202},
{0x000008, &dac202}, // Maya edition: same audio I/O as DAC202.
{0x000006, &int202},
{0x00000a, &int203},
{0x00000b, &man301},
{0x000001, &adc2},
{0x000003, &dac2_minerva},
{0x000002, &vesta},
{0x000004, &afi1},
};
struct fw_csr_iterator it;
int key, val, model_id;
int i;
model_id = 0;
fw_csr_iterator_init(&it, dice->unit->directory);
while (fw_csr_iterator_next(&it, &key, &val)) {
if (key == CSR_MODEL) {
model_id = val;
break;
}
}
for (i = 0; i < ARRAY_SIZE(entries); ++i) {
entry = entries + i;
if (entry->model_id == model_id)
break;
}
if (i == ARRAY_SIZE(entries))
return -ENODEV;
Annotation
- Immediate include surface: `dice.h`.
- Detected declarations: `struct dice_weiss_spec`, `function snd_dice_detect_weiss_formats`.
- 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.