sound/core/info_oss.c
Source file repositories/reference/linux-study-clean/sound/core/info_oss.c
File Facts
- System
- Linux kernel
- Corpus path
sound/core/info_oss.c- Extension
.c- Size
- 2811 bytes
- Lines
- 103
- Domain
- Driver Families
- Bucket
- sound/core
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/slab.hlinux/time.hlinux/string.hlinux/export.hsound/core.hsound/minors.hsound/info.hlinux/utsname.hlinux/mutex.h
Detected Declarations
function snd_oss_info_registerfunction snd_sndstat_show_stringsfunction snd_sndstat_proc_readfunction snd_info_minor_registerexport snd_oss_info_register
Annotated Snippet
if (str) {
if (ok < 0) {
snd_iprintf(buf, "\n");
ok++;
}
snd_iprintf(buf, "%i: %s\n", idx, str);
}
}
if (ok < 0)
snd_iprintf(buf, " NOT ENABLED IN CONFIG\n");
return ok;
}
static void snd_sndstat_proc_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_iprintf(buffer, "Sound Driver:3.8.1a-980706 (ALSA emulation code)\n");
snd_iprintf(buffer, "Kernel: %s %s %s %s %s\n",
init_utsname()->sysname,
init_utsname()->nodename,
init_utsname()->release,
init_utsname()->version,
init_utsname()->machine);
snd_iprintf(buffer, "Config options: 0\n");
snd_iprintf(buffer, "\nInstalled drivers: \n");
snd_iprintf(buffer, "Type 10: ALSA emulation\n");
snd_iprintf(buffer, "\nCard config: \n");
snd_card_info_read_oss(buffer);
snd_sndstat_show_strings(buffer, "Audio devices", SNDRV_OSS_INFO_DEV_AUDIO);
snd_sndstat_show_strings(buffer, "Synth devices", SNDRV_OSS_INFO_DEV_SYNTH);
snd_sndstat_show_strings(buffer, "Midi devices", SNDRV_OSS_INFO_DEV_MIDI);
snd_sndstat_show_strings(buffer, "Timers", SNDRV_OSS_INFO_DEV_TIMERS);
snd_sndstat_show_strings(buffer, "Mixers", SNDRV_OSS_INFO_DEV_MIXERS);
}
int __init snd_info_minor_register(void)
{
struct snd_info_entry *entry;
memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
entry = snd_info_create_module_entry(THIS_MODULE, "sndstat",
snd_oss_root);
if (!entry)
return -ENOMEM;
entry->c.text.read = snd_sndstat_proc_read;
return snd_info_register(entry); /* freed in error path */
}
Annotation
- Immediate include surface: `linux/slab.h`, `linux/time.h`, `linux/string.h`, `linux/export.h`, `sound/core.h`, `sound/minors.h`, `sound/info.h`, `linux/utsname.h`.
- Detected declarations: `function snd_oss_info_register`, `function snd_sndstat_show_strings`, `function snd_sndstat_proc_read`, `function snd_info_minor_register`, `export snd_oss_info_register`.
- Atlas domain: Driver Families / sound/core.
- Implementation status: integration 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.