ASoC: tas2781: Add a debugfs node for acoustic tuning
Subsystems (3)
Shenghao Ding
maintainerPATCH v5 1/1 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 <[email protected]>
---
v5:
- Drop the define CONFIG_SND_SOC_TAS2781_ACOUST_I2C in Kconfig, anyone who wants to use acoustic tool have to edit the source due to the whole directly exposing the registers.
v4:
- Add name_prefix as part of the name of debugfs node in case of multiple devices.
v3:
- Remove unnessary indentation.
- Add a special build CONFIG_SND_SOC_TAS2781_I2C_ACOUST for acoustic tuning debugfs node
v2:
- Implement the "Acoustic Tuning" as debugfs node instead of kcontrol.
v1:
- Add "Acoustic Tuning" kcontrol for acoustic tuning.
--- include/sound/tas2781.h | 23 +++++ sound/soc/codecs/tas2781-i2c.c | 154 +++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+)
include/sound/tas2781.h +23 -0
@@ -161,10 +161,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;
sound/soc/codecs/tas2781-i2c.c +154 -0
176 lines not on this page · raw message
Signature · 1 line
2.43.0