include/sound/tas2781-dsp.h

Source file repositories/reference/linux-study-clean/include/sound/tas2781-dsp.h

File Facts

System
Linux kernel
Corpus path
include/sound/tas2781-dsp.h
Extension
.h
Size
6142 bytes
Lines
230
Domain
Driver Families
Bucket
include/sound
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 tasdevice_fw_fixed_hdr {
	unsigned int fwsize;
	unsigned int ppcver;
	unsigned int drv_ver;
};

struct tasdevice_dspfw_hdr {
	struct tasdevice_fw_fixed_hdr fixed_hdr;
	unsigned short device_family;
	unsigned short device;
	unsigned char ndev;
};

struct tasdev_blk {
	int nr_retry;
	unsigned int type;
	unsigned char is_pchksum_present;
	unsigned char pchksum;
	unsigned char is_ychksum_present;
	unsigned char ychksum;
	unsigned int nr_cmds;
	unsigned int blk_size;
	unsigned int nr_subblocks;
	/* fixed m68k compiling issue, storing the dev_idx as a member of block
	 * can reduce unnecessary timeand system resource comsumption of
	 * dev_idx mapping every time the block data writing to the dsp.
	 */
	unsigned char dev_idx;
	unsigned char *data;
};

struct tasdevice_data {
	char name[64];
	unsigned int nr_blk;
	struct tasdev_blk *dev_blks;
};

struct tasdevice_prog {
	unsigned int prog_size;
	struct tasdevice_data dev_data;
};

struct tasdevice_config {
	unsigned int cfg_size;
	char name[64];
	struct tasdevice_data dev_data;
};

struct tasdevice_calibration {
	struct tasdevice_data dev_data;
};

struct fct_param_address {
	/* Thermal data for PG 1.0 device */
	unsigned char thr[3];
	/* Thermal data for PG 2.0 device */
	unsigned char thr2[3];
	/* Pilot tone enable flag, usually the sine wave */
	unsigned char plt_flg[3];
	/* Pilot tone gain for calibration */
	unsigned char sin_gn[3];
	/* Pilot tone gain for calibration */
	unsigned char sin_gn2[3];
	/* high 32-bit of real-time spk impedance */
	unsigned char r0_reg[3];
	/* check spk connection */
	unsigned char tf_reg[3];
	/* check spk resonant frequency */
	unsigned char a1_reg[3];
	/* check spk resonant frequency */
	unsigned char a2_reg[3];
};

struct tasdevice_fw {
	struct tasdevice_dspfw_hdr fw_hdr;
	unsigned short nr_programs;
	struct tasdevice_prog *programs;
	unsigned short nr_configurations;
	struct tasdevice_config *configs;
	unsigned short nr_calibrations;
	struct tasdevice_calibration *calibrations;
	struct fct_param_address fct_par_addr;
	struct device *dev;
};

enum tasdevice_fw_state {
	/* Driver in startup mode, not load any firmware. */
	TASDEVICE_DSP_FW_PENDING,
	/* DSP firmware in the system, but parsing error. */
	TASDEVICE_DSP_FW_FAIL,

Annotation

Implementation Notes