sound/pci/ice1712/wm8766.h
Source file repositories/reference/linux-study-clean/sound/pci/ice1712/wm8766.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ice1712/wm8766.h- Extension
.h- Size
- 4582 bytes
- Lines
- 148
- Domain
- Driver Families
- Bucket
- sound/pci
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct snd_wm8766struct snd_wm8766_opsstruct snd_wm8766_ctlstruct snd_wm8766enum snd_wm8766_ctl_idenum snd_wm8766_agc_mode
Annotated Snippet
struct snd_wm8766_ops {
void (*write)(struct snd_wm8766 *wm, u16 addr, u16 data);
};
enum snd_wm8766_ctl_id {
WM8766_CTL_CH1_VOL,
WM8766_CTL_CH2_VOL,
WM8766_CTL_CH3_VOL,
WM8766_CTL_CH1_SW,
WM8766_CTL_CH2_SW,
WM8766_CTL_CH3_SW,
WM8766_CTL_PHASE1_SW,
WM8766_CTL_PHASE2_SW,
WM8766_CTL_PHASE3_SW,
WM8766_CTL_DEEMPH1_SW,
WM8766_CTL_DEEMPH2_SW,
WM8766_CTL_DEEMPH3_SW,
WM8766_CTL_IZD_SW,
WM8766_CTL_ZC_SW,
WM8766_CTL_COUNT,
};
#define WM8766_ENUM_MAX 16
#define WM8766_FLAG_STEREO (1 << 0)
#define WM8766_FLAG_VOL_UPDATE (1 << 1)
#define WM8766_FLAG_INVERT (1 << 2)
#define WM8766_FLAG_LIM (1 << 3)
#define WM8766_FLAG_ALC (1 << 4)
struct snd_wm8766_ctl {
struct snd_kcontrol *kctl;
const char *name;
snd_ctl_elem_type_t type;
const char *const enum_names[WM8766_ENUM_MAX];
const unsigned int *tlv;
u16 reg1, reg2, mask1, mask2, min, max, flags;
void (*set)(struct snd_wm8766 *wm, u16 ch1, u16 ch2);
void (*get)(struct snd_wm8766 *wm, u16 *ch1, u16 *ch2);
};
enum snd_wm8766_agc_mode { WM8766_AGC_OFF, WM8766_AGC_LIM, WM8766_AGC_ALC };
struct snd_wm8766 {
struct snd_card *card;
struct snd_wm8766_ctl ctl[WM8766_CTL_COUNT];
enum snd_wm8766_agc_mode agc_mode;
struct snd_wm8766_ops ops;
u16 regs[WM8766_REG_COUNT]; /* 9-bit registers */
};
void snd_wm8766_init(struct snd_wm8766 *wm);
void snd_wm8766_resume(struct snd_wm8766 *wm);
void snd_wm8766_set_if(struct snd_wm8766 *wm, u16 dac);
void snd_wm8766_volume_restore(struct snd_wm8766 *wm);
int snd_wm8766_build_controls(struct snd_wm8766 *wm);
#endif /* __SOUND_WM8766_H */
Annotation
- Detected declarations: `struct snd_wm8766`, `struct snd_wm8766_ops`, `struct snd_wm8766_ctl`, `struct snd_wm8766`, `enum snd_wm8766_ctl_id`, `enum snd_wm8766_agc_mode`.
- Atlas domain: Driver Families / sound/pci.
- 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.