sound/soc/codecs/rt5640.h
Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt5640.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/rt5640.h- Extension
.h- Size
- 76452 bytes
- Lines
- 2194
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/gpio/consumer.hlinux/workqueue.hdt-bindings/sound/rt5640.h
Detected Declarations
struct rt5640_privstruct rt5640_set_jack_data
Annotated Snippet
struct rt5640_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct clk *mclk;
struct gpio_desc *ldo1_en; /* GPIO for LDO1_EN */
int irq;
int jd_gpio_irq;
int sysclk;
int sysclk_src;
int lrck[RT5640_AIFS];
int bclk[RT5640_AIFS];
int master[RT5640_AIFS];
int pll_src;
int pll_in;
int pll_out;
bool hp_mute;
bool asrc_en;
bool irq_requested;
bool jd_gpio_irq_requested;
/* Jack and button detect data */
bool ovcd_irq_enabled;
bool pressed;
bool press_reported;
int press_count;
int release_count;
int poll_count;
struct delayed_work bp_work;
struct delayed_work jack_work;
struct snd_soc_jack *jack;
struct gpio_desc *jd_gpio;
unsigned int jd_src;
bool jd_inverted;
unsigned int ovcd_th;
unsigned int ovcd_sf;
bool use_platform_clock;
};
struct rt5640_set_jack_data {
int codec_irq_override;
struct gpio_desc *jd_gpio;
bool use_platform_clock;
};
int rt5640_dmic_enable(struct snd_soc_component *component,
bool dmic1_data_pin, bool dmic2_data_pin);
int rt5640_sel_asrc_clk_src(struct snd_soc_component *component,
unsigned int filter_mask, unsigned int clk_src);
void rt5640_set_ovcd_params(struct snd_soc_component *component);
void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component);
void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component);
int rt5640_detect_headset(struct snd_soc_component *component, struct gpio_desc *hp_det_gpio);
#endif
Annotation
- Immediate include surface: `linux/clk.h`, `linux/gpio/consumer.h`, `linux/workqueue.h`, `dt-bindings/sound/rt5640.h`.
- Detected declarations: `struct rt5640_priv`, `struct rt5640_set_jack_data`.
- 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.