sound/soc/codecs/cs42l52.h
Source file repositories/reference/linux-study-clean/sound/soc/codecs/cs42l52.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/cs42l52.h- Extension
.h- Size
- 8688 bytes
- Lines
- 271
- 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.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef __CS42L52_H__
#define __CS42L52_H__
#define CS42L52_NAME "CS42L52"
#define CS42L52_DEFAULT_CLK 12000000
#define CS42L52_MIN_CLK 11000000
#define CS42L52_MAX_CLK 27000000
#define CS42L52_DEFAULT_FORMAT SNDRV_PCM_FMTBIT_S16_LE
#define CS42L52_DEFAULT_MAX_CHANS 2
#define CS42L52_SYSCLK 1
#define CS42L52_CHIP_SWICTH (1 << 17)
#define CS42L52_ALL_IN_ONE (1 << 16)
#define CS42L52_CHIP_ONE 0x00
#define CS42L52_CHIP_TWO 0x01
#define CS42L52_CHIP_THR 0x02
#define CS42L52_CHIP_MASK 0x0f
#define CS42L52_FIX_BITS_CTL 0x00
#define CS42L52_CHIP 0x01
#define CS42L52_CHIP_ID 0xE0
#define CS42L52_CHIP_ID_MASK 0xF8
#define CS42L52_CHIP_REV_A0 0x00
#define CS42L52_CHIP_REV_A1 0x01
#define CS42L52_CHIP_REV_B0 0x02
#define CS42L52_CHIP_REV_MASK 0x07
#define CS42L52_PWRCTL1 0x02
#define CS42L52_PWRCTL1_PDN_ALL 0x9F
#define CS42L52_PWRCTL1_PDN_CHRG 0x80
#define CS42L52_PWRCTL1_PDN_PGAB 0x10
#define CS42L52_PWRCTL1_PDN_PGAA 0x08
#define CS42L52_PWRCTL1_PDN_ADCB 0x04
#define CS42L52_PWRCTL1_PDN_ADCA 0x02
#define CS42L52_PWRCTL1_PDN_CODEC 0x01
#define CS42L52_PWRCTL2 0x03
#define CS42L52_PWRCTL2_OVRDB (1 << 4)
#define CS42L52_PWRCTL2_OVRDA (1 << 3)
#define CS42L52_PWRCTL2_PDN_MICB (1 << 2)
#define CS42L52_PWRCTL2_PDN_MICB_SHIFT 2
#define CS42L52_PWRCTL2_PDN_MICA (1 << 1)
#define CS42L52_PWRCTL2_PDN_MICA_SHIFT 1
#define CS42L52_PWRCTL2_PDN_MICBIAS (1 << 0)
#define CS42L52_PWRCTL2_PDN_MICBIAS_SHIFT 0
#define CS42L52_PWRCTL3 0x04
#define CS42L52_PWRCTL3_HPB_PDN_SHIFT 6
#define CS42L52_PWRCTL3_HPB_ON_LOW 0x00
#define CS42L52_PWRCTL3_HPB_ON_HIGH 0x01
#define CS42L52_PWRCTL3_HPB_ALWAYS_ON 0x02
#define CS42L52_PWRCTL3_HPB_ALWAYS_OFF 0x03
#define CS42L52_PWRCTL3_HPA_PDN_SHIFT 4
#define CS42L52_PWRCTL3_HPA_ON_LOW 0x00
#define CS42L52_PWRCTL3_HPA_ON_HIGH 0x01
#define CS42L52_PWRCTL3_HPA_ALWAYS_ON 0x02
#define CS42L52_PWRCTL3_HPA_ALWAYS_OFF 0x03
#define CS42L52_PWRCTL3_SPKB_PDN_SHIFT 2
#define CS42L52_PWRCTL3_SPKB_ON_LOW 0x00
#define CS42L52_PWRCTL3_SPKB_ON_HIGH 0x01
#define CS42L52_PWRCTL3_SPKB_ALWAYS_ON 0x02
#define CS42L52_PWRCTL3_PDN_SPKB (1 << 2)
#define CS42L52_PWRCTL3_PDN_SPKA (1 << 0)
#define CS42L52_PWRCTL3_SPKA_PDN_SHIFT 0
#define CS42L52_PWRCTL3_SPKA_ON_LOW 0x00
#define CS42L52_PWRCTL3_SPKA_ON_HIGH 0x01
#define CS42L52_PWRCTL3_SPKA_ALWAYS_ON 0x02
#define CS42L52_DEFAULT_OUTPUT_STATE 0x05
#define CS42L52_PWRCTL3_CONF_MASK 0x03
#define CS42L52_CLK_CTL 0x05
#define CLK_AUTODECT_ENABLE (1 << 7)
#define CLK_SPEED_SHIFT 5
#define CLK_DS_MODE 0x00
#define CLK_SS_MODE 0x01
#define CLK_HS_MODE 0x02
#define CLK_QS_MODE 0x03
#define CLK_32K_SR_SHIFT 4
#define CLK_32K 0x01
#define CLK_NO_32K 0x00
#define CLK_27M_MCLK_SHIFT 3
#define CLK_27M_MCLK 0x01
#define CLK_NO_27M 0x00
#define CLK_RATIO_SHIFT 1
#define CLK_R_128 0x00
#define CLK_R_125 0x01
#define CLK_R_132 0x02
#define CLK_R_136 0x03
Annotation
- 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.