sound/soc/codecs/adau1373.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/adau1373.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/adau1373.c- Extension
.c- Size
- 54303 bytes
- Lines
- 1627
- 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/init.hlinux/gpio/consumer.hlinux/delay.hlinux/pm.hlinux/property.hlinux/i2c.hlinux/slab.hsound/core.hsound/pcm.hsound/pcm_params.hsound/tlv.hsound/soc.hadau1373.hadau-utils.h
Detected Declarations
struct adau1373_daistruct adau1373enum adau1373_micbias_voltagefunction adau1373_pll_eventfunction adau1373_check_aif_clkfunction adau1373_check_srcfunction adau1373_hw_paramsfunction adau1373_set_dai_fmtfunction adau1373_set_dai_sysclkfunction adau1373_set_pllfunction adau1373_load_drc_settingsfunction adau1373_get_micbiasfunction adau1373_probefunction adau1373_set_bias_levelfunction adau1373_resumefunction adau1373_register_volatilefunction adau1373_resetfunction adau1373_parse_fwfunction adau1373_i2c_probe
Annotated Snippet
struct adau1373_dai {
unsigned int clk_src;
unsigned int sysclk;
bool enable_src;
bool clock_provider;
};
enum adau1373_micbias_voltage {
ADAU1373_MICBIAS_2_9V,
ADAU1373_MICBIAS_2_2V,
ADAU1373_MICBIAS_2_6V,
ADAU1373_MICBIAS_1_8V,
};
#define ADAU1373_DRC_SIZE 13
struct adau1373 {
struct regmap *regmap;
struct adau1373_dai dais[3];
bool input_differential[4];
bool lineout_differential;
bool lineout_ground_sense;
unsigned int num_drc;
u8 drc_setting[3][ADAU1373_DRC_SIZE];
enum adau1373_micbias_voltage micbias1;
enum adau1373_micbias_voltage micbias2;
};
#define ADAU1373_INPUT_MODE 0x00
#define ADAU1373_AINL_CTRL(x) (0x01 + (x) * 2)
#define ADAU1373_AINR_CTRL(x) (0x02 + (x) * 2)
#define ADAU1373_LLINE_OUT(x) (0x9 + (x) * 2)
#define ADAU1373_RLINE_OUT(x) (0xa + (x) * 2)
#define ADAU1373_LSPK_OUT 0x0d
#define ADAU1373_RSPK_OUT 0x0e
#define ADAU1373_LHP_OUT 0x0f
#define ADAU1373_RHP_OUT 0x10
#define ADAU1373_ADC_GAIN 0x11
#define ADAU1373_LADC_MIXER 0x12
#define ADAU1373_RADC_MIXER 0x13
#define ADAU1373_LLINE1_MIX 0x14
#define ADAU1373_RLINE1_MIX 0x15
#define ADAU1373_LLINE2_MIX 0x16
#define ADAU1373_RLINE2_MIX 0x17
#define ADAU1373_LSPK_MIX 0x18
#define ADAU1373_RSPK_MIX 0x19
#define ADAU1373_LHP_MIX 0x1a
#define ADAU1373_RHP_MIX 0x1b
#define ADAU1373_EP_MIX 0x1c
#define ADAU1373_HP_CTRL 0x1d
#define ADAU1373_HP_CTRL2 0x1e
#define ADAU1373_LS_CTRL 0x1f
#define ADAU1373_EP_CTRL 0x21
#define ADAU1373_MICBIAS_CTRL1 0x22
#define ADAU1373_MICBIAS_CTRL2 0x23
#define ADAU1373_OUTPUT_CTRL 0x24
#define ADAU1373_PWDN_CTRL1 0x25
#define ADAU1373_PWDN_CTRL2 0x26
#define ADAU1373_PWDN_CTRL3 0x27
#define ADAU1373_DPLL_CTRL(x) (0x28 + (x) * 7)
#define ADAU1373_PLL_CTRL1(x) (0x29 + (x) * 7)
#define ADAU1373_PLL_CTRL2(x) (0x2a + (x) * 7)
#define ADAU1373_PLL_CTRL3(x) (0x2b + (x) * 7)
#define ADAU1373_PLL_CTRL4(x) (0x2c + (x) * 7)
#define ADAU1373_PLL_CTRL5(x) (0x2d + (x) * 7)
#define ADAU1373_PLL_CTRL6(x) (0x2e + (x) * 7)
#define ADAU1373_HEADDECT 0x36
#define ADAU1373_ADC_DAC_STATUS 0x37
#define ADAU1373_ADC_CTRL 0x3c
#define ADAU1373_DAI(x) (0x44 + (x))
#define ADAU1373_CLK_SRC_DIV(x) (0x40 + (x) * 2)
#define ADAU1373_BCLKDIV(x) (0x47 + (x))
#define ADAU1373_SRC_RATIOA(x) (0x4a + (x) * 2)
#define ADAU1373_SRC_RATIOB(x) (0x4b + (x) * 2)
#define ADAU1373_DEEMP_CTRL 0x50
#define ADAU1373_SRC_DAI_CTRL(x) (0x51 + (x))
#define ADAU1373_DIN_MIX_CTRL(x) (0x56 + (x))
#define ADAU1373_DOUT_MIX_CTRL(x) (0x5b + (x))
#define ADAU1373_DAI_PBL_VOL(x) (0x62 + (x) * 2)
#define ADAU1373_DAI_PBR_VOL(x) (0x63 + (x) * 2)
#define ADAU1373_DAI_RECL_VOL(x) (0x68 + (x) * 2)
#define ADAU1373_DAI_RECR_VOL(x) (0x69 + (x) * 2)
#define ADAU1373_DAC1_PBL_VOL 0x6e
#define ADAU1373_DAC1_PBR_VOL 0x6f
#define ADAU1373_DAC2_PBL_VOL 0x70
#define ADAU1373_DAC2_PBR_VOL 0x71
#define ADAU1373_ADC_RECL_VOL 0x72
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/gpio/consumer.h`, `linux/delay.h`, `linux/pm.h`, `linux/property.h`, `linux/i2c.h`, `linux/slab.h`.
- Detected declarations: `struct adau1373_dai`, `struct adau1373`, `enum adau1373_micbias_voltage`, `function adau1373_pll_event`, `function adau1373_check_aif_clk`, `function adau1373_check_src`, `function adau1373_hw_params`, `function adau1373_set_dai_fmt`, `function adau1373_set_dai_sysclk`, `function adau1373_set_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.