sound/firewire/dice/dice-mytek.c
Source file repositories/reference/linux-study-clean/sound/firewire/dice/dice-mytek.c
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/dice/dice-mytek.c- Extension
.c- Size
- 1285 bytes
- Lines
- 47
- 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_mytek_specfunction snd_dice_detect_mytek_formats
Annotated Snippet
struct dice_mytek_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];
};
static const struct dice_mytek_spec stereo_192_dsd_dac = {
/* AES, TOSLINK, SPDIF, ADAT inputs on device */
.tx_pcm_chs = {{8, 8, 8}, {0, 0, 0} },
/* PCM 44.1-192, native DSD64/DSD128 to device */
.rx_pcm_chs = {{4, 4, 4}, {0, 0, 0} }
};
/*
* Mytek has a few other firewire-capable devices, though newer models appear
* to lack the port more often than not. As I don't have access to any of them
* they are missing here. An example is the Mytek 8x192 ADDA, which is DICE.
*/
int snd_dice_detect_mytek_formats(struct snd_dice *dice)
{
int i;
const struct dice_mytek_spec *dev;
dev = &stereo_192_dsd_dac;
memcpy(dice->tx_pcm_chs, dev->tx_pcm_chs,
MAX_STREAMS * SND_DICE_RATE_MODE_COUNT * sizeof(unsigned int));
memcpy(dice->rx_pcm_chs, dev->rx_pcm_chs,
MAX_STREAMS * SND_DICE_RATE_MODE_COUNT * sizeof(unsigned int));
for (i = 0; i < MAX_STREAMS; ++i) {
dice->tx_midi_ports[i] = 0;
dice->rx_midi_ports[i] = 0;
}
return 0;
}
Annotation
- Immediate include surface: `dice.h`.
- Detected declarations: `struct dice_mytek_spec`, `function snd_dice_detect_mytek_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.