
30 Apr
2025
30 Apr
'25
3:36 a.m.
On Mon, Apr 28, 2025 at 09:39:24AM +0800, Shenghao Ding wrote:
"Acoustic Tuning" debufs node is a bridge to the acoustic tuning tool which can tune the chips' acoustic effect.
+static ssize_t acoustic_ctl_write(struct file *file,
- const char __user *from, size_t count, loff_t *ppos)
+{
- reg = TASDEVICE_REG(src[3], src[4], src[5]);
- guard(mutex)(&priv->codec_lock);
- if (src[1] == 'w') {
if (len > 1)
ret = tasdevice_dev_bulk_write(priv, chn, reg,
&src[6], len);
else
ret = tasdevice_dev_write(priv, chn, reg, src[6]);
It'd be good if this needed some special build to enable like the regmap equivalent or was somehow limiting what could be written, right now it's just always there when debugfs is enabled and there's no filtering of registers or anything so it's just unrestricted write access to the device.