sound/soc/codecs/pcm6240.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/pcm6240.h
Extension
.h
Size
8287 bytes
Lines
248
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 pcmdevice_regbin_hdr {
	unsigned int img_sz;
	unsigned int checksum;
	unsigned int binary_version_num;
	unsigned int drv_fw_version;
	unsigned int timestamp;
	unsigned char plat_type;
	unsigned char dev_family;
	unsigned char reserve;
	unsigned char ndev;
	unsigned char devs[PCMDEVICE_MAX_REGBIN_DEVICES];
	unsigned int nconfig;
	unsigned int config_size[PCMDEVICE_CONFIG_SUM];
};

struct pcmdevice_block_data {
	unsigned char dev_idx;
	unsigned char block_type;
	unsigned short yram_checksum;
	unsigned int block_size;
	unsigned int n_subblks;
	unsigned char *regdata;
};

struct pcmdevice_config_info {
	char cfg_name[64];
	unsigned int nblocks;
	unsigned int real_nblocks;
	unsigned char active_dev;
	struct pcmdevice_block_data *blk_data[] __counted_by(nblocks);
};

struct pcmdevice_regbin {
	struct pcmdevice_regbin_hdr fw_hdr;
	int ncfgs;
	struct pcmdevice_config_info **cfg_info;
};

struct pcmdevice_priv {
	struct snd_soc_component *component;
	struct i2c_client *client;
	struct device *dev;
	struct mutex codec_lock;
	struct gpio_desc *hw_rst;
	struct regmap *regmap;
	struct pcmdevice_regbin regbin;
	int irq;
	unsigned int addr[PCMDEVICE_MAX_I2C_DEVICES];
	unsigned int chip_id;
	int cur_conf;
	int fw_state;
	int ndev;
	unsigned char bin_name[PCMDEVICE_BIN_FILENAME_LEN];
	/* used for kcontrol name */
	unsigned char upper_dev_name[I2C_NAME_SIZE];
	unsigned char dev_name[I2C_NAME_SIZE];
};

/* mixer control */
struct pcmdevice_mixer_control {
	int max;
	int reg;
	unsigned int dev_no;
	unsigned int shift;
	unsigned int invert;
};
struct pcmdev_ctrl_info {
	const unsigned int *gain;
	const struct pcmdevice_mixer_control *pcmdev_ctrl;
	unsigned int ctrl_array_size;
	snd_kcontrol_get_t *get;
	snd_kcontrol_put_t *put;
	int pcmdev_ctrl_name_id;
};
#endif /* __PCM6240_H__ */

Annotation

Implementation Notes