diff --git a/techpack/audio/asoc/codecs/tfa98xx/src/tfa98xx.c b/techpack/audio/asoc/codecs/tfa98xx/src/tfa98xx.c index c6bb4763e5b7..ff861ad08f09 100644 --- a/techpack/audio/asoc/codecs/tfa98xx/src/tfa98xx.c +++ b/techpack/audio/asoc/codecs/tfa98xx/src/tfa98xx.c @@ -3806,6 +3806,13 @@ static long tfa98xx_misc_device_control_ioctl(struct file *file, /* clear buffer and read livedata from dsp.*/ memset((char *)(&livedata[0]), 0x00, sizeof(livedata)); + /* read original memtrack data from device. */ + if (Tfa98xx_Error_Ok == tfa98xx_read_memtrack_data(tfa98xx, &livedata[0])) { + pr_debug("Device 0x%x read memtrack data sucessed.\n", tfa98xx->i2c->addr); + } else { + pr_err("Device 0x%x read memtrack data failed.\n", tfa98xx->i2c->addr); + } + /* copy data to user spcace. if copied is successed, will be returned actual size to user space. */ livedata_length_bytes = sizeof(int) * MEMTRACK_ITEM_MAX;