sound/pci/ice1712/aureon.c
Source file repositories/reference/linux-study-clean/sound/pci/ice1712/aureon.c
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ice1712/aureon.c- Extension
.c- Size
- 61266 bytes
- Lines
- 2258
- 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.
- 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/delay.hlinux/interrupt.hlinux/init.hlinux/slab.hlinux/mutex.hsound/core.hice1712.henvy24ht.haureon.hsound/tlv.h
Detected Declarations
struct aureon_specfunction aureon_pca9554_writefunction aureon_universe_inmux_infofunction aureon_universe_inmux_getfunction aureon_universe_inmux_putfunction aureon_ac97_writefunction aureon_ac97_readfunction aureon_ac97_initfunction aureon_ac97_vol_infofunction aureon_ac97_vol_getfunction aureon_ac97_vol_putfunction aureon_ac97_mute_getfunction aureon_ac97_mute_putfunction aureon_ac97_micboost_getfunction aureon_ac97_micboost_putfunction aureon_spi_writefunction aureon_spi_readfunction aureon_cs8415_getfunction aureon_cs8415_readfunction aureon_cs8415_putfunction wm_getfunction wm_put_nocachefunction wm_putfunction aureon_ac97_mmute_getfunction aureon_ac97_mmute_putfunction wm_set_volfunction wm_pcm_mute_getfunction wm_pcm_mute_putfunction wm_master_vol_infofunction wm_master_vol_getfunction wm_master_vol_putfunction wm_vol_infofunction wm_vol_getfunction wm_vol_putfunction wm_mute_infofunction wm_mute_getfunction wm_mute_putfunction wm_master_mute_getfunction wm_master_mute_putfunction wm_pcm_vol_infofunction wm_pcm_vol_getfunction wm_pcm_vol_putfunction wm_adc_mute_getfunction wm_adc_mute_putfunction wm_adc_vol_infofunction wm_adc_vol_getfunction wm_adc_vol_putfunction wm_adc_mux_info
Annotated Snippet
struct aureon_spec {
unsigned short stac9744[64];
unsigned int cs8415_mux;
unsigned short master[2];
unsigned short vol[8];
unsigned char pca9554_out;
};
/* WM8770 registers */
#define WM_DAC_ATTEN 0x00 /* DAC1-8 analog attenuation */
#define WM_DAC_MASTER_ATTEN 0x08 /* DAC master analog attenuation */
#define WM_DAC_DIG_ATTEN 0x09 /* DAC1-8 digital attenuation */
#define WM_DAC_DIG_MASTER_ATTEN 0x11 /* DAC master digital attenuation */
#define WM_PHASE_SWAP 0x12 /* DAC phase */
#define WM_DAC_CTRL1 0x13 /* DAC control bits */
#define WM_MUTE 0x14 /* mute controls */
#define WM_DAC_CTRL2 0x15 /* de-emphasis and zefo-flag */
#define WM_INT_CTRL 0x16 /* interface control */
#define WM_MASTER 0x17 /* master clock and mode */
#define WM_POWERDOWN 0x18 /* power-down controls */
#define WM_ADC_GAIN 0x19 /* ADC gain L(19)/R(1a) */
#define WM_ADC_MUX 0x1b /* input MUX */
#define WM_OUT_MUX1 0x1c /* output MUX */
#define WM_OUT_MUX2 0x1e /* output MUX */
#define WM_RESET 0x1f /* software reset */
/* CS8415A registers */
#define CS8415_CTRL1 0x01
#define CS8415_CTRL2 0x02
#define CS8415_QSUB 0x14
#define CS8415_RATIO 0x1E
#define CS8415_C_BUFFER 0x20
#define CS8415_ID 0x7F
/* PCA9554 registers */
#define PCA9554_DEV 0x40 /* I2C device address */
#define PCA9554_IN 0x00 /* input port */
#define PCA9554_OUT 0x01 /* output port */
#define PCA9554_INVERT 0x02 /* input invert */
#define PCA9554_DIR 0x03 /* port directions */
/*
* Aureon Universe additional controls using PCA9554
*/
/*
* Send data to pca9554
*/
static void aureon_pca9554_write(struct snd_ice1712 *ice, unsigned char reg,
unsigned char data)
{
unsigned int tmp;
int i, j;
unsigned char dev = PCA9554_DEV; /* ID 0100000, write */
unsigned char val = 0;
tmp = snd_ice1712_gpio_read(ice);
snd_ice1712_gpio_set_mask(ice, ~(AUREON_SPI_MOSI|AUREON_SPI_CLK|
AUREON_WM_RW|AUREON_WM_CS|
AUREON_CS8415_CS));
tmp |= AUREON_WM_RW;
tmp |= AUREON_CS8415_CS | AUREON_WM_CS; /* disable SPI devices */
tmp &= ~AUREON_SPI_MOSI;
tmp &= ~AUREON_SPI_CLK;
snd_ice1712_gpio_write(ice, tmp);
udelay(50);
/*
* send i2c stop condition and start condition
* to obtain sane state
*/
tmp |= AUREON_SPI_CLK;
snd_ice1712_gpio_write(ice, tmp);
udelay(50);
tmp |= AUREON_SPI_MOSI;
snd_ice1712_gpio_write(ice, tmp);
udelay(100);
tmp &= ~AUREON_SPI_MOSI;
snd_ice1712_gpio_write(ice, tmp);
udelay(50);
tmp &= ~AUREON_SPI_CLK;
snd_ice1712_gpio_write(ice, tmp);
udelay(100);
/*
* send device address, command and value,
* skipping ack cycles in between
*/
for (j = 0; j < 3; j++) {
Annotation
- Immediate include surface: `linux/delay.h`, `linux/interrupt.h`, `linux/init.h`, `linux/slab.h`, `linux/mutex.h`, `sound/core.h`, `ice1712.h`, `envy24ht.h`.
- Detected declarations: `struct aureon_spec`, `function aureon_pca9554_write`, `function aureon_universe_inmux_info`, `function aureon_universe_inmux_get`, `function aureon_universe_inmux_put`, `function aureon_ac97_write`, `function aureon_ac97_read`, `function aureon_ac97_init`, `function aureon_ac97_vol_info`, `function aureon_ac97_vol_get`.
- 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.