sound/soc/codecs/rt1320-sdw.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt1320-sdw.h
Extension
.h
Size
4821 bytes
Lines
194
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 rt1320_datafixpoint {
	int silencedetect;
	int r0;
	int meanr0;
	int advancegain;
	int ts;
	int re;
	int t;
	int invrs;
};

typedef struct FwPara_HwSwGain {
	unsigned int SwAdvGain;
	unsigned int SwBasGain;
	unsigned int HwAdvGain;
	unsigned int HwBasGain;
	unsigned int reserve0;
	unsigned int reserve1;
	unsigned int reserve2;
	unsigned int reserve3;
	unsigned int reserve4;
	unsigned int reserve5;
} __attribute__((packed)) FwPara_Get_HwSwGain;

struct rt1320_paramcmd {
	unsigned char moudleid;
	unsigned char commandtype;
	unsigned short reserved1;
	unsigned int commandlength;
	long long reserved2;
	unsigned int paramid;
	unsigned int paramlength;
};

enum rt1320_fw_cmdid {
	RT1320_FW_READY,
	RT1320_SET_PARAM,
	RT1320_GET_PARAM,
	RT1320_GET_POOLSIZE,
};

enum rt1320_power_state {
	RT1320_NORMAL_STATE = 0x18,
	RT1320_K_R0_STATE = 0x1b,
};

enum rt1320_rw_type {
	RT1320_BRA_WRITE = 0,
	RT1320_BRA_READ = 1,
	RT1320_PARAM_WRITE = 2,
	RT1320_PARAM_READ = 3,
};

struct rt1320_sdw_priv {
	struct snd_soc_component *component;
	struct regmap *regmap;
	struct regmap *mbq_regmap;
	struct sdw_slave *sdw_slave;
	struct sdw_bus_params params;
	bool hw_init;
	bool first_hw_init;
	int version_id;
	int brown_out;
	unsigned int dev_id;
	bool fu_dapm_mute;
	bool fu_mixer_mute[4];
	unsigned long long r0_l_reg;
	unsigned long long r0_r_reg;
	unsigned int r0_l_calib;
	unsigned int r0_r_calib;
	unsigned int temp_l_calib;
	unsigned int temp_r_calib;
	const char *dspfw_name;
	bool cali_done;
	bool fw_load_done;
	bool rae_update_done;
	struct work_struct load_dspfw_work;
	struct sdw_bpt_msg bra_msg;
};

#endif /* __RT1320_SDW_H__ */

Annotation

Implementation Notes