sound/soc/codecs/da732x.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/da732x.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/da732x.c- Extension
.c- Size
- 50858 bytes
- Lines
- 1569
- Domain
- Driver Families
- Bucket
- sound/soc
- 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/module.hlinux/moduleparam.hlinux/init.hlinux/delay.hlinux/pm.hlinux/i2c.hlinux/regmap.hlinux/platform_device.hlinux/slab.hlinux/sysfs.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/soc-dapm.hsound/initval.hsound/tlv.hasm/div64.hda732x.hda732x_reg.h
Detected Declarations
struct da732x_privfunction da732x_get_input_divfunction da732x_set_charge_pumpfunction da732x_hpf_setfunction da732x_hpf_getfunction da732x_adc_eventfunction da732x_out_pga_eventfunction da732x_hw_paramsfunction da732x_set_dai_fmtfunction da732x_set_dai_pllfunction da732x_set_dai_sysclkfunction da732x_volatilefunction da732x_dac_offset_adjustfunction da732x_output_offset_adjustfunction da732x_hp_dc_offset_cancellationfunction da732x_set_bias_levelfunction da732x_i2c_probe
Annotated Snippet
struct da732x_priv {
struct regmap *regmap;
unsigned int sysclk;
bool pll_en;
};
/*
* da732x register cache - default settings
*/
static const struct reg_default da732x_reg_cache[] = {
{ DA732X_REG_REF1 , 0x02 },
{ DA732X_REG_BIAS_EN , 0x80 },
{ DA732X_REG_BIAS1 , 0x00 },
{ DA732X_REG_BIAS2 , 0x00 },
{ DA732X_REG_BIAS3 , 0x00 },
{ DA732X_REG_BIAS4 , 0x00 },
{ DA732X_REG_MICBIAS2 , 0x00 },
{ DA732X_REG_MICBIAS1 , 0x00 },
{ DA732X_REG_MICDET , 0x00 },
{ DA732X_REG_MIC1_PRE , 0x01 },
{ DA732X_REG_MIC1 , 0x40 },
{ DA732X_REG_MIC2_PRE , 0x01 },
{ DA732X_REG_MIC2 , 0x40 },
{ DA732X_REG_AUX1L , 0x75 },
{ DA732X_REG_AUX1R , 0x75 },
{ DA732X_REG_MIC3_PRE , 0x01 },
{ DA732X_REG_MIC3 , 0x40 },
{ DA732X_REG_INP_PINBIAS , 0x00 },
{ DA732X_REG_INP_ZC_EN , 0x00 },
{ DA732X_REG_INP_MUX , 0x50 },
{ DA732X_REG_HP_DET , 0x00 },
{ DA732X_REG_HPL_DAC_OFFSET , 0x00 },
{ DA732X_REG_HPL_DAC_OFF_CNTL , 0x00 },
{ DA732X_REG_HPL_OUT_OFFSET , 0x00 },
{ DA732X_REG_HPL , 0x40 },
{ DA732X_REG_HPL_VOL , 0x0F },
{ DA732X_REG_HPR_DAC_OFFSET , 0x00 },
{ DA732X_REG_HPR_DAC_OFF_CNTL , 0x00 },
{ DA732X_REG_HPR_OUT_OFFSET , 0x00 },
{ DA732X_REG_HPR , 0x40 },
{ DA732X_REG_HPR_VOL , 0x0F },
{ DA732X_REG_LIN2 , 0x4F },
{ DA732X_REG_LIN3 , 0x4F },
{ DA732X_REG_LIN4 , 0x4F },
{ DA732X_REG_OUT_ZC_EN , 0x00 },
{ DA732X_REG_HP_LIN1_GNDSEL , 0x00 },
{ DA732X_REG_CP_HP1 , 0x0C },
{ DA732X_REG_CP_HP2 , 0x03 },
{ DA732X_REG_CP_CTRL1 , 0x00 },
{ DA732X_REG_CP_CTRL2 , 0x99 },
{ DA732X_REG_CP_CTRL3 , 0x25 },
{ DA732X_REG_CP_LEVEL_MASK , 0x3F },
{ DA732X_REG_CP_DET , 0x00 },
{ DA732X_REG_CP_STATUS , 0x00 },
{ DA732X_REG_CP_THRESH1 , 0x00 },
{ DA732X_REG_CP_THRESH2 , 0x00 },
{ DA732X_REG_CP_THRESH3 , 0x00 },
{ DA732X_REG_CP_THRESH4 , 0x00 },
{ DA732X_REG_CP_THRESH5 , 0x00 },
{ DA732X_REG_CP_THRESH6 , 0x00 },
{ DA732X_REG_CP_THRESH7 , 0x00 },
{ DA732X_REG_CP_THRESH8 , 0x00 },
{ DA732X_REG_PLL_DIV_LO , 0x00 },
{ DA732X_REG_PLL_DIV_MID , 0x00 },
{ DA732X_REG_PLL_DIV_HI , 0x00 },
{ DA732X_REG_PLL_CTRL , 0x02 },
{ DA732X_REG_CLK_CTRL , 0xaa },
{ DA732X_REG_CLK_DSP , 0x07 },
{ DA732X_REG_CLK_EN1 , 0x00 },
{ DA732X_REG_CLK_EN2 , 0x00 },
{ DA732X_REG_CLK_EN3 , 0x00 },
{ DA732X_REG_CLK_EN4 , 0x00 },
{ DA732X_REG_CLK_EN5 , 0x00 },
{ DA732X_REG_AIF_MCLK , 0x00 },
{ DA732X_REG_AIFA1 , 0x02 },
{ DA732X_REG_AIFA2 , 0x00 },
{ DA732X_REG_AIFA3 , 0x08 },
{ DA732X_REG_AIFB1 , 0x02 },
{ DA732X_REG_AIFB2 , 0x00 },
{ DA732X_REG_AIFB3 , 0x08 },
{ DA732X_REG_PC_CTRL , 0xC0 },
{ DA732X_REG_DATA_ROUTE , 0x00 },
{ DA732X_REG_DSP_CTRL , 0x00 },
{ DA732X_REG_CIF_CTRL2 , 0x00 },
{ DA732X_REG_HANDSHAKE , 0x00 },
{ DA732X_REG_SPARE1_OUT , 0x00 },
{ DA732X_REG_SPARE2_OUT , 0x00 },
{ DA732X_REG_SPARE1_IN , 0x00 },
{ DA732X_REG_ADC1_PD , 0x00 },
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/init.h`, `linux/delay.h`, `linux/pm.h`, `linux/i2c.h`, `linux/regmap.h`, `linux/platform_device.h`.
- Detected declarations: `struct da732x_priv`, `function da732x_get_input_div`, `function da732x_set_charge_pump`, `function da732x_hpf_set`, `function da732x_hpf_get`, `function da732x_adc_event`, `function da732x_out_pga_event`, `function da732x_hw_params`, `function da732x_set_dai_fmt`, `function da732x_set_dai_pll`.
- Atlas domain: Driver Families / sound/soc.
- 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.