sound/firewire/dice/dice-teac.c
Source file repositories/reference/linux-study-clean/sound/firewire/dice/dice-teac.c
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/dice/dice-teac.c- Extension
.c- Size
- 1045 bytes
- Lines
- 44
- 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
function snd_dice_detect_teac_formats
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
// dice-teac.c - a part of driver for DICE based devices
//
// Copyright (c) 2025 Takashi Sakamoto
#include "dice.h"
int snd_dice_detect_teac_formats(struct snd_dice *dice)
{
__be32 reg;
u32 data;
int err;
err = snd_dice_transaction_read_tx(dice, TX_NUMBER, ®, sizeof(reg));
if (err < 0)
return err;
dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16;
dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16;
dice->tx_midi_ports[0] = 1;
data = be32_to_cpu(reg);
if (data > 1) {
dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16;
dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16;
}
err = snd_dice_transaction_read_rx(dice, RX_NUMBER, ®, sizeof(reg));
if (err < 0)
return err;
dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16;
dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16;
dice->rx_midi_ports[0] = 1;
data = be32_to_cpu(reg);
if (data > 1) {
dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16;
dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16;
}
return 0;
}
Annotation
- Immediate include surface: `dice.h`.
- Detected declarations: `function snd_dice_detect_teac_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.