sound/soc/codecs/adau1977.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/adau1977.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/adau1977.c- Extension
.c- Size
- 25790 bytes
- Lines
- 1004
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/device.hlinux/gpio/consumer.hlinux/i2c.hlinux/init.hlinux/module.hlinux/regmap.hlinux/regulator/consumer.hlinux/slab.hsound/core.hsound/initval.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/tlv.hdt-bindings/sound/adi,adau1977.hadau1977.h
Detected Declarations
struct adau1977function adau1977_resetfunction adau1977_lookup_fsfunction adau1977_lookup_mcsfunction adau1977_hw_paramsfunction adau1977_power_disablefunction adau1977_power_enablefunction adau1977_set_bias_levelfunction adau1977_set_tdm_slotfunction adau1977_mutefunction adau1977_set_dai_fmtfunction adau1977_startupfunction adau1977_set_tristatefunction adau1977_check_sysclkfunction adau1977_set_sysclkfunction adau1977_component_probefunction adau1977_setup_micbiasfunction adau1977_probefunction adau1977_register_volatileexport adau1977_probeexport adau1977_regmap_config
Annotated Snippet
struct adau1977 {
struct regmap *regmap;
bool right_j;
unsigned int sysclk;
enum adau1977_sysclk_src sysclk_src;
struct gpio_desc *reset_gpio;
enum adau1977_type type;
struct regulator *avdd_reg;
struct regulator *dvdd_reg;
struct snd_pcm_hw_constraint_list constraints;
struct device *dev;
void (*switch_mode)(struct device *dev);
unsigned int max_clock_provider_fs;
unsigned int slot_width;
bool enabled;
bool clock_provider;
};
static const struct reg_default adau1977_reg_defaults[] = {
{ 0x00, 0x00 },
{ 0x01, 0x41 },
{ 0x02, 0x4a },
{ 0x03, 0x7d },
{ 0x04, 0x3d },
{ 0x05, 0x02 },
{ 0x06, 0x00 },
{ 0x07, 0x10 },
{ 0x08, 0x32 },
{ 0x09, 0xf0 },
{ 0x0a, 0xa0 },
{ 0x0b, 0xa0 },
{ 0x0c, 0xa0 },
{ 0x0d, 0xa0 },
{ 0x0e, 0x02 },
{ 0x10, 0x0f },
{ 0x15, 0x20 },
{ 0x16, 0x00 },
{ 0x17, 0x00 },
{ 0x18, 0x00 },
{ 0x1a, 0x00 },
};
static const DECLARE_TLV_DB_MINMAX_MUTE(adau1977_adc_gain, -3562, 6000);
static const struct snd_soc_dapm_widget adau1977_micbias_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY("MICBIAS", ADAU1977_REG_MICBIAS,
3, 0, NULL, 0)
};
static const struct snd_soc_dapm_widget adau1977_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY("Vref", ADAU1977_REG_BLOCK_POWER_SAI,
4, 0, NULL, 0),
SND_SOC_DAPM_ADC("ADC1", "Capture", ADAU1977_REG_BLOCK_POWER_SAI, 0, 0),
SND_SOC_DAPM_ADC("ADC2", "Capture", ADAU1977_REG_BLOCK_POWER_SAI, 1, 0),
SND_SOC_DAPM_ADC("ADC3", "Capture", ADAU1977_REG_BLOCK_POWER_SAI, 2, 0),
SND_SOC_DAPM_ADC("ADC4", "Capture", ADAU1977_REG_BLOCK_POWER_SAI, 3, 0),
SND_SOC_DAPM_INPUT("AIN1"),
SND_SOC_DAPM_INPUT("AIN2"),
SND_SOC_DAPM_INPUT("AIN3"),
SND_SOC_DAPM_INPUT("AIN4"),
SND_SOC_DAPM_OUTPUT("VREF"),
};
static const struct snd_soc_dapm_route adau1977_dapm_routes[] = {
{ "ADC1", NULL, "AIN1" },
{ "ADC2", NULL, "AIN2" },
{ "ADC3", NULL, "AIN3" },
{ "ADC4", NULL, "AIN4" },
{ "ADC1", NULL, "Vref" },
{ "ADC2", NULL, "Vref" },
{ "ADC3", NULL, "Vref" },
{ "ADC4", NULL, "Vref" },
{ "VREF", NULL, "Vref" },
};
#define ADAU1977_VOLUME(x) \
SOC_SINGLE_TLV("ADC" #x " Capture Volume", \
ADAU1977_REG_POST_ADC_GAIN((x) - 1), \
0, 255, 1, adau1977_adc_gain)
#define ADAU1977_HPF_SWITCH(x) \
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/init.h`, `linux/module.h`, `linux/regmap.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct adau1977`, `function adau1977_reset`, `function adau1977_lookup_fs`, `function adau1977_lookup_mcs`, `function adau1977_hw_params`, `function adau1977_power_disable`, `function adau1977_power_enable`, `function adau1977_set_bias_level`, `function adau1977_set_tdm_slot`, `function adau1977_mute`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: integration 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.