diff options
| author | Shenghao Ding <shenghao-ding@ti.com> | 2025-05-07 12:46:15 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-05-07 14:35:30 +0300 |
| commit | d75d38dc460452cc8bbca483dee65839e11c71fe (patch) | |
| tree | 00abd68d0173c4411c89682e5bc303b6f142b26e /include | |
| parent | 0fa382a4f507e8cc835df43b331e0515d861e54d (diff) | |
| download | linux-d75d38dc460452cc8bbca483dee65839e11c71fe.tar.xz | |
ASoC: tas2781: Add a debugfs node for acoustic tuning
"Acoustic Tuning" debugfs node is a bridge to the acoustic tuning tool
which can tune the chips' acoustic effect.
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250507094616.210-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/tas2781.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h index eff011444cc8..07ea38fba03b 100644 --- a/include/sound/tas2781.h +++ b/include/sound/tas2781.h @@ -159,10 +159,33 @@ struct calidata { 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 *speaker_id; struct gpio_desc *reset; |
