sound/pci/cs5535audio/cs5535audio.h
Source file repositories/reference/linux-study-clean/sound/pci/cs5535audio/cs5535audio.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/cs5535audio/cs5535audio.h- Extension
.h- Size
- 4138 bytes
- Lines
- 141
- 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 cs5535audiostruct cs5535audio_dma_opsstruct cs5535audio_dma_descstruct cs5535audio_dmastruct cs5535audiofunction olpc_capture_openfunction olpc_capture_closefunction olpc_prequirksfunction olpc_quirks_cleanup
Annotated Snippet
struct cs5535audio_dma_ops {
int type;
void (*enable_dma)(struct cs5535audio *cs5535au);
void (*disable_dma)(struct cs5535audio *cs5535au);
void (*pause_dma)(struct cs5535audio *cs5535au);
void (*setup_prd)(struct cs5535audio *cs5535au, u32 prd_addr);
u32 (*read_prd)(struct cs5535audio *cs5535au);
u32 (*read_dma_pntr)(struct cs5535audio *cs5535au);
};
struct cs5535audio_dma_desc {
__le32 addr;
__le16 size;
__le16 ctlreserved;
};
struct cs5535audio_dma {
const struct cs5535audio_dma_ops *ops;
struct snd_dma_buffer desc_buf;
struct snd_pcm_substream *substream;
unsigned int buf_addr, buf_bytes;
unsigned int period_bytes, periods;
u32 saved_prd;
int pcm_open_flag;
};
struct cs5535audio {
struct snd_card *card;
struct snd_ac97 *ac97;
struct snd_pcm *pcm;
int irq;
struct pci_dev *pci;
unsigned long port;
spinlock_t reg_lock;
struct snd_pcm_substream *playback_substream;
struct snd_pcm_substream *capture_substream;
struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS];
};
extern const struct dev_pm_ops snd_cs5535audio_pm;
#ifdef CONFIG_OLPC
void olpc_prequirks(struct snd_card *card,
struct snd_ac97_template *ac97);
int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
void olpc_quirks_cleanup(void);
void olpc_analog_input(struct snd_ac97 *ac97, int on);
void olpc_mic_bias(struct snd_ac97 *ac97, int on);
static inline void olpc_capture_open(struct snd_ac97 *ac97)
{
/* default to Analog Input off */
olpc_analog_input(ac97, 0);
/* enable MIC Bias for recording */
olpc_mic_bias(ac97, 1);
}
static inline void olpc_capture_close(struct snd_ac97 *ac97)
{
/* disable Analog Input */
olpc_analog_input(ac97, 0);
/* disable the MIC Bias (so the recording LED turns off) */
olpc_mic_bias(ac97, 0);
}
#else
static inline void olpc_prequirks(struct snd_card *card,
struct snd_ac97_template *ac97) { }
static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
{
return 0;
}
static inline void olpc_quirks_cleanup(void) { }
static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { }
static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { }
static inline void olpc_capture_open(struct snd_ac97 *ac97) { }
static inline void olpc_capture_close(struct snd_ac97 *ac97) { }
#endif
int snd_cs5535audio_pcm(struct cs5535audio *cs5535audio);
#endif /* __SOUND_CS5535AUDIO_H */
Annotation
- Detected declarations: `struct cs5535audio`, `struct cs5535audio_dma_ops`, `struct cs5535audio_dma_desc`, `struct cs5535audio_dma`, `struct cs5535audio`, `function olpc_capture_open`, `function olpc_capture_close`, `function olpc_prequirks`, `function olpc_quirks_cleanup`.
- 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.