sound/drivers/opl4/opl4_local.h
Source file repositories/reference/linux-study-clean/sound/drivers/opl4/opl4_local.h
File Facts
- System
- Linux kernel
- Corpus path
sound/drivers/opl4/opl4_local.h- Extension
.h- Size
- 6994 bytes
- Lines
- 236
- Domain
- Driver Families
- Bucket
- sound/drivers
- 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
sound/opl4.h
Detected Declarations
struct opl4_soundstruct opl4_regionstruct opl4_region_ptrstruct opl4_voicestruct snd_opl4function snd_opl4_create_procfunction snd_opl4_free_proc
Annotated Snippet
struct opl4_sound {
u16 tone;
s16 pitch_offset;
u8 key_scaling;
s8 panpot;
u8 vibrato;
u8 tone_attenuate;
u8 volume_factor;
u8 reg_lfo_vibrato;
u8 reg_attack_decay1;
u8 reg_level_decay2;
u8 reg_release_correction;
u8 reg_tremolo;
};
struct opl4_region {
u8 key_min, key_max;
struct opl4_sound sound;
};
struct opl4_region_ptr {
int count;
const struct opl4_region *regions;
};
struct opl4_voice {
struct list_head list;
int number;
struct snd_midi_channel *chan;
int note;
int velocity;
const struct opl4_sound *sound;
u8 level_direct;
u8 reg_f_number;
u8 reg_misc;
u8 reg_lfo_vibrato;
};
struct snd_opl4 {
unsigned long fm_port;
unsigned long pcm_port;
struct resource *res_fm_port;
struct resource *res_pcm_port;
unsigned short hardware;
spinlock_t reg_lock;
struct snd_card *card;
#ifdef CONFIG_SND_PROC_FS
struct snd_info_entry *proc_entry;
int memory_access;
#endif
struct mutex access_mutex;
#if IS_ENABLED(CONFIG_SND_SEQUENCER)
int used;
int seq_dev_num;
int seq_client;
struct snd_seq_device *seq_dev;
struct snd_midi_channel_set *chset;
struct opl4_voice voices[OPL4_MAX_VOICES];
struct list_head off_voices;
struct list_head on_voices;
#endif
};
/* opl4_lib.c */
void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value);
u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg);
void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size);
void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size);
/* opl4_mixer.c */
int snd_opl4_create_mixer(struct snd_opl4 *opl4);
#ifdef CONFIG_SND_PROC_FS
/* opl4_proc.c */
int snd_opl4_create_proc(struct snd_opl4 *opl4);
void snd_opl4_free_proc(struct snd_opl4 *opl4);
#else
static inline int snd_opl4_create_proc(struct snd_opl4 *opl4) { return 0; }
static inline void snd_opl4_free_proc(struct snd_opl4 *opl4) {}
#endif
/* opl4_seq.c */
extern int volume_boost;
/* opl4_synth.c */
void snd_opl4_synth_reset(struct snd_opl4 *opl4);
Annotation
- Immediate include surface: `sound/opl4.h`.
- Detected declarations: `struct opl4_sound`, `struct opl4_region`, `struct opl4_region_ptr`, `struct opl4_voice`, `struct snd_opl4`, `function snd_opl4_create_proc`, `function snd_opl4_free_proc`.
- Atlas domain: Driver Families / sound/drivers.
- 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.