include/sound/tas2781.h
Source file repositories/reference/linux-study-clean/include/sound/tas2781.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/tas2781.h- Extension
.h- Size
- 8585 bytes
- Lines
- 279
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.htas2781-dsp.h
Detected Declarations
struct bulk_reg_valstruct tasdevicestruct cali_regstruct calidatastruct acoustic_datastruct tasdevice_privenum audio_deviceenum dspbin_type
Annotated Snippet
struct bulk_reg_val {
int reg;
unsigned char val[4];
unsigned char val_len;
bool is_locked;
};
struct tasdevice {
struct bulk_reg_val *cali_data_backup;
struct bulk_reg_val alp_cali_bckp;
struct tasdevice_fw *cali_data_fmw;
void *cali_specific;
unsigned int dev_addr;
unsigned int err_code;
unsigned char cur_book;
short cur_prog;
short cur_conf;
bool is_loading;
bool is_loaderr;
};
struct cali_reg {
unsigned int r0_reg;
unsigned int r0_low_reg;
unsigned int invr0_reg;
unsigned int pow_reg;
unsigned int tlimit_reg;
};
struct calidata {
unsigned char *data;
unsigned long total_sz;
struct cali_reg cali_reg_array;
unsigned int cali_dat_sz_per_dev;
};
/*
* To enable CONFIG_SND_SOC_TAS2781_ACOUST_I2C will create a bridge to the
* acoustic tuning tool which can tune the chips' acoustic effect. Due to the
* whole directly exposing the registers, there exist some potential risks. So
* this define is invisible in Kconfig, anyone who wants to use acoustic tool
* have to edit the source manually.
*/
#ifdef CONFIG_SND_SOC_TAS2781_ACOUST_I2C
#define TASDEV_DATA_PAYLOAD_SIZE 128
struct acoustic_data {
unsigned char len;
unsigned char id;
unsigned char addr;
unsigned char book;
unsigned char page;
unsigned char reg;
unsigned char data[TASDEV_DATA_PAYLOAD_SIZE];
};
#endif
struct tasdevice_priv {
struct tasdevice tasdevice[TASDEVICE_MAX_CHANNELS];
struct tasdevice_rca rcabin;
struct calidata cali_data;
#ifdef CONFIG_SND_SOC_TAS2781_ACOUST_I2C
struct acoustic_data acou_data;
#endif
struct tasdevice_fw *fmw;
struct gpio_desc *reset;
struct mutex codec_lock;
struct regmap *regmap;
struct device *dev;
unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64];
unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE];
unsigned char coef_binaryname[64];
unsigned char rca_binaryname[64];
unsigned char dev_name[32];
const unsigned char (*dvc_tlv_table)[4];
const char *name_prefix;
unsigned char ndev;
unsigned int dspbin_typ;
unsigned int magic_num;
unsigned int chip_id;
unsigned int sysclk;
int speaker_id;
int irq;
int cur_prog;
int cur_conf;
int fw_state;
int index;
void *client;
void *codec;
Annotation
- Immediate include surface: `linux/debugfs.h`, `tas2781-dsp.h`.
- Detected declarations: `struct bulk_reg_val`, `struct tasdevice`, `struct cali_reg`, `struct calidata`, `struct acoustic_data`, `struct tasdevice_priv`, `enum audio_device`, `enum dspbin_type`.
- Atlas domain: Driver Families / include/sound.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.