sound/pci/ca0106/ca0106.h
Source file repositories/reference/linux-study-clean/sound/pci/ca0106/ca0106.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ca0106/ca0106.h- Extension
.h- Size
- 37405 bytes
- Lines
- 727
- 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
ca_midi.h
Detected Declarations
struct snd_ca0106struct snd_ca0106_channelstruct snd_ca0106_pcmstruct snd_ca0106_detailsstruct snd_ca0106
Annotated Snippet
struct snd_ca0106_channel {
struct snd_ca0106 *emu;
int number;
int use;
void (*interrupt)(struct snd_ca0106 *emu, struct snd_ca0106_channel *channel);
struct snd_ca0106_pcm *epcm;
};
struct snd_ca0106_pcm {
struct snd_ca0106 *emu;
struct snd_pcm_substream *substream;
int channel_id;
unsigned short running;
};
struct snd_ca0106_details {
u32 serial;
char * name;
int ac97; /* ac97 = 0 -> Select MIC, Line in, TAD in, AUX in.
ac97 = 1 -> Default to AC97 in. */
int gpio_type; /* gpio_type = 1 -> shared mic-in/line-in
gpio_type = 2 -> shared side-out/line-in. */
int i2c_adc; /* with i2c_adc=1, the driver adds some capture volume
controls, phone, mic, line-in and aux. */
u16 spi_dac; /* spi_dac = 0 -> no spi interface for DACs
spi_dac = 0x<front><rear><center-lfe><side>
-> specifies DAC id for each channel pair. */
};
// definition of the chip-specific record
struct snd_ca0106 {
struct snd_card *card;
const struct snd_ca0106_details *details;
struct pci_dev *pci;
unsigned long port;
int irq;
unsigned int serial; /* serial number */
unsigned short model; /* subsystem id */
spinlock_t emu_lock;
struct snd_ac97 *ac97;
struct snd_pcm *pcm[4];
struct snd_ca0106_channel playback_channels[4];
struct snd_ca0106_channel capture_channels[4];
u32 spdif_bits[4]; /* s/pdif out default setup */
u32 spdif_str_bits[4]; /* s/pdif out per-stream setup */
int spdif_enable;
int capture_source;
int i2c_capture_source;
u8 i2c_capture_volume[4][2];
int capture_mic_line_in;
struct snd_dma_buffer *buffer;
struct snd_ca_midi midi;
struct snd_ca_midi midi2;
u16 spi_dac_reg[16];
#ifdef CONFIG_PM_SLEEP
#define NUM_SAVED_VOLUMES 9
unsigned int saved_vol[NUM_SAVED_VOLUMES];
#endif
};
int snd_ca0106_mixer(struct snd_ca0106 *emu);
int snd_ca0106_proc_init(struct snd_ca0106 * emu);
unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu,
unsigned int reg,
unsigned int chn);
void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
unsigned int reg,
unsigned int chn,
unsigned int data);
int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value);
int snd_ca0106_spi_write(struct snd_ca0106 * emu,
unsigned int data);
#ifdef CONFIG_PM_SLEEP
void snd_ca0106_mixer_suspend(struct snd_ca0106 *chip);
void snd_ca0106_mixer_resume(struct snd_ca0106 *chip);
#else
Annotation
- Immediate include surface: `ca_midi.h`.
- Detected declarations: `struct snd_ca0106`, `struct snd_ca0106_channel`, `struct snd_ca0106_pcm`, `struct snd_ca0106_details`, `struct snd_ca0106`.
- 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.