sound/soc/codecs/rt5682.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt5682.h
Extension
.h
Size
53239 bytes
Lines
1500
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 rt5682_priv {
	struct snd_soc_component *component;
	struct device *i2c_dev;
	struct rt5682_platform_data pdata;
	struct gpio_desc *ldo1_en;
	struct regmap *regmap;
	struct regmap *sdw_regmap;
	struct snd_soc_jack *hs_jack;
	struct regulator_bulk_data supplies[RT5682_NUM_SUPPLIES];
	struct delayed_work jack_detect_work;
	struct delayed_work jd_check_work;
	struct mutex disable_irq_lock; /* imp-def irq lock protection */
	bool disable_irq;
	struct mutex calibrate_mutex;
	struct sdw_slave *slave;
	struct sdw_bus_params params;
	bool hw_init;
	bool first_hw_init;
	bool is_sdw;
	bool ve_ic;

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

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

	int pll_src[RT5682_PLLS];
	int pll_in[RT5682_PLLS];
	int pll_out[RT5682_PLLS];

	int jack_type;
	int irq;
	int irq_work_delay_time;
};

extern const char *rt5682_supply_names[RT5682_NUM_SUPPLIES];

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

void rt5682_apply_patch_list(struct rt5682_priv *rt5682, struct device *dev);

void rt5682_jack_detect_handler(struct work_struct *work);

bool rt5682_volatile_register(struct device *dev, unsigned int reg);
bool rt5682_readable_register(struct device *dev, unsigned int reg);

int rt5682_register_component(struct device *dev);
void rt5682_calibrate(struct rt5682_priv *rt5682);
void rt5682_reset(struct rt5682_priv *rt5682);
int rt5682_parse_dt(struct rt5682_priv *rt5682, struct device *dev);
int rt5682_get_ldo1(struct rt5682_priv *rt5682, struct device *dev);

int rt5682_register_dai_clks(struct rt5682_priv *rt5682);

#define RT5682_REG_NUM 318
extern const struct reg_default rt5682_reg[RT5682_REG_NUM];

extern const struct snd_soc_dai_ops rt5682_aif1_dai_ops;
extern const struct snd_soc_dai_ops rt5682_aif2_dai_ops;
extern const struct snd_soc_component_driver rt5682_soc_component_dev;

#endif /* __RT5682_H__ */

Annotation

Implementation Notes