sound/soc/codecs/rt5682s.h

Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt5682s.h

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt5682s.h
Extension
.h
Size
53727 bytes
Lines
1493
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct pll_calc_map {
	unsigned int freq_in;
	unsigned int freq_out;
	int m;
	int n;
	int k;
	bool m_bp;
	bool k_bp;
	bool byp_ps;
	bool sel_ps;
};

enum {
	RT5682S_SUPPLY_AVDD,
	RT5682S_SUPPLY_MICVDD,
	RT5682S_SUPPLY_DBVDD,
	RT5682S_SUPPLY_LDO1_IN,
	RT5682S_NUM_SUPPLIES,
};

struct rt5682s_priv {
	struct snd_soc_component *component;
	struct rt5682s_platform_data pdata;
	struct gpio_desc *ldo1_en;
	struct regmap *regmap;
	struct snd_soc_jack *hs_jack;
	struct regulator_bulk_data supplies[RT5682S_NUM_SUPPLIES];
	struct delayed_work jack_detect_work;
	struct delayed_work jd_check_work;
	struct mutex calibrate_mutex;
	struct mutex sar_mutex;
	struct mutex wclk_mutex;

#ifdef CONFIG_COMMON_CLK
	struct clk_hw dai_clks_hw[RT5682S_DAI_NUM_CLKS];
	struct clk *mclk;
#endif

	int sysclk;
	int sysclk_src;
	int lrck[RT5682S_AIFS];
	int bclk[RT5682S_AIFS];
	int master[RT5682S_AIFS];

	int pll_src[RT5682S_PLLS];
	int pll_in[RT5682S_PLLS];
	int pll_out[RT5682S_PLLS];
	int pll_comb;

	int jack_type;
	unsigned int irq;
	int irq_work_delay_time;
	int wclk_enabled;
};

int rt5682s_sel_asrc_clk_src(struct snd_soc_component *component,
		unsigned int filter_mask, unsigned int clk_src);

#endif /* __RT5682S_H__ */

Annotation

Implementation Notes