sound/hda/common/beep.c
Source file repositories/reference/linux-study-clean/sound/hda/common/beep.c
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/common/beep.c- Extension
.c- Size
- 8384 bytes
- Lines
- 346
- Domain
- Driver Families
- Bucket
- sound/hda
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/input.hlinux/slab.hlinux/workqueue.hlinux/export.hsound/core.hhda_beep.hhda_local.h
Detected Declarations
function generate_tonefunction snd_hda_generate_beepfunction beep_linear_tonefunction beep_standard_tonefunction snd_hda_beep_eventfunction turn_on_beepfunction turn_off_beepfunction snd_hda_enable_beep_devicefunction beep_dev_registerfunction beep_dev_disconnectfunction beep_dev_freefunction snd_hda_attach_beep_devicefunction snd_hda_detach_beep_devicefunction ctl_has_mutefunction snd_hda_mixer_amp_switch_get_beepfunction snd_hda_mixer_amp_switch_put_beepexport snd_hda_enable_beep_deviceexport snd_hda_attach_beep_deviceexport snd_hda_detach_beep_deviceexport snd_hda_mixer_amp_switch_get_beepexport snd_hda_mixer_amp_switch_put_beep
Annotated Snippet
if (chs & 1) {
enable |= *valp;
valp++;
}
if (chs & 2)
enable |= *valp;
snd_hda_enable_beep_device(codec, enable);
}
if (!ctl_has_mute(kcontrol))
return 0;
return snd_hda_mixer_amp_switch_put(kcontrol, ucontrol);
}
EXPORT_SYMBOL_GPL(snd_hda_mixer_amp_switch_put_beep);
Annotation
- Immediate include surface: `linux/input.h`, `linux/slab.h`, `linux/workqueue.h`, `linux/export.h`, `sound/core.h`, `hda_beep.h`, `hda_local.h`.
- Detected declarations: `function generate_tone`, `function snd_hda_generate_beep`, `function beep_linear_tone`, `function beep_standard_tone`, `function snd_hda_beep_event`, `function turn_on_beep`, `function turn_off_beep`, `function snd_hda_enable_beep_device`, `function beep_dev_register`, `function beep_dev_disconnect`.
- Atlas domain: Driver Families / sound/hda.
- 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.