sound/isa/sc6000.c
Source file repositories/reference/linux-study-clean/sound/isa/sc6000.c
File Facts
- System
- Linux kernel
- Corpus path
sound/isa/sc6000.c- Extension
.c- Size
- 18924 bytes
- Lines
- 755
- Domain
- Driver Families
- Bucket
- sound/isa
- 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/module.hlinux/delay.hlinux/isa.hlinux/io.hasm/dma.hsound/core.hsound/wss.hsound/opl3.hsound/mpu401.hsound/control.hsound/initval.h
Detected Declarations
struct snd_sc6000function sc6000_irq_to_softcfgfunction sc6000_dma_to_softcfgfunction sc6000_mpu_irq_to_softcfgfunction sc6000_wait_datafunction sc6000_readfunction sc6000_writefunction sc6000_dsp_get_answerfunction sc6000_dsp_resetfunction sc6000_hw_cfg_writefunction sc6000_cfg_writefunction sc6000_setup_boardfunction sc6000_init_mssfunction sc6000_hw_cfg_encodefunction sc6000_prepare_boardfunction sc6000_detect_old_dspfunction sc6000_program_boardfunction sc6000_init_boardfunction snd_sc6000_mixerfunction snd_sc6000_matchfunction snd_sc6000_freefunction __snd_sc6000_probefunction snd_sc6000_probefunction snd_sc6000_suspendfunction snd_sc6000_resume
Annotated Snippet
struct snd_sc6000 {
char __iomem *vport;
char __iomem *vmss_port;
struct snd_wss *chip;
u8 mss_config;
u8 config;
u8 hw_cfg[2];
bool old_dsp;
};
/* hardware dependent functions */
/*
* sc6000_irq_to_softcfg - Decode irq number into cfg code.
*/
static unsigned char sc6000_irq_to_softcfg(int irq)
{
unsigned char val = 0;
switch (irq) {
case 5:
val = 0x28;
break;
case 7:
val = 0x8;
break;
case 9:
val = 0x10;
break;
case 10:
val = 0x18;
break;
case 11:
val = 0x20;
break;
default:
break;
}
return val;
}
/*
* sc6000_dma_to_softcfg - Decode dma number into cfg code.
*/
static unsigned char sc6000_dma_to_softcfg(int dma)
{
unsigned char val = 0;
switch (dma) {
case 0:
val = 1;
break;
case 1:
val = 2;
break;
case 3:
val = 3;
break;
default:
break;
}
return val;
}
/*
* sc6000_mpu_irq_to_softcfg - Decode MPU-401 irq number into cfg code.
*/
static unsigned char sc6000_mpu_irq_to_softcfg(int mpu_irq)
{
unsigned char val = 0;
switch (mpu_irq) {
case 5:
val = 4;
break;
case 7:
val = 0x44;
break;
case 9:
val = 0x84;
break;
case 10:
val = 0xc4;
break;
default:
break;
}
return val;
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/delay.h`, `linux/isa.h`, `linux/io.h`, `asm/dma.h`, `sound/core.h`, `sound/wss.h`, `sound/opl3.h`.
- Detected declarations: `struct snd_sc6000`, `function sc6000_irq_to_softcfg`, `function sc6000_dma_to_softcfg`, `function sc6000_mpu_irq_to_softcfg`, `function sc6000_wait_data`, `function sc6000_read`, `function sc6000_write`, `function sc6000_dsp_get_answer`, `function sc6000_dsp_reset`, `function sc6000_hw_cfg_write`.
- Atlas domain: Driver Families / sound/isa.
- 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.