Public bug reported:
[Impact]
Systems with TAS2783 SoundWire amplifiers take longer to resume from
suspend because the driver downloads the amplifier firmware again even when
the firmware remains in PRAM across the reset.
This adds avoidable wake-up latency on resume. The issue affects the TAS2783
SoundWire codec driver.
[Fix]
Read the firmware version from the amplifier before downloading firmware.
When the version matches the version already loaded, skip the PRAM block.
Keep downloading the other firmware blocks, retry a failed block once, and
refresh the regcache after the download.
Upstream commit:
f42fbd560cd834c7d10118743683def979c68739
ASoC: tas2783-sdw: add firmware download status check
The commit is merged in linux-next but is not present in a released upstream
v* tag.
[Test Plan]
Enable dynamic debug for the TAS2783 codec driver, then suspend and resume
the system:
echo 'file sound/soc/codecs/tas2783-sdw.c +p' | \
sudo tee /sys/kernel/debug/dynamic_debug/control
sudo rtcwake -m mem -s 20
dmesg | grep -E 'Get Firmware version|Ignore PRAM block|FW download failed'
Without the patch, the driver writes the PRAM firmware block during resume.
With the patch, when the retained firmware version matches, dmesg shows
"Ignore PRAM block", no firmware download error, and resume completes without
the redundant PRAM write.
[Where problems could occur]
The change is limited to the TAS2783 SoundWire codec firmware-loading path.
If the firmware version is read incorrectly, the driver could skip a needed
PRAM download. The amplifier could then fail to initialize or audio could be
missing after resume. If the new retry or regcache handling is wrong, firmware
loading could fail or codec controls could use stale values.
** Affects: linux (Ubuntu)
Importance: Undecided
Status: In Progress
** Affects: linux-oem-7.0 (Ubuntu)
Importance: Undecided
Status: New
** Affects: linux (Ubuntu Resolute)
Importance: Undecided
Status: Invalid
** Affects: linux-oem-7.0 (Ubuntu Resolute)
Importance: Undecided
Status: New
** Affects: linux (Ubuntu Stonking)
Importance: Undecided
Status: In Progress
** Affects: linux-oem-7.0 (Ubuntu Stonking)
Importance: Undecided
Status: New
** Also affects: linux-oem-7.0 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: linux (Ubuntu Resolute)
Importance: Undecided
Status: New
** Also affects: linux-oem-7.0 (Ubuntu Resolute)
Importance: Undecided
Status: New
** Also affects: linux (Ubuntu Stonking)
Importance: Undecided
Status: New
** Also affects: linux-oem-7.0 (Ubuntu Stonking)
Importance: Undecided
Status: New
** Changed in: linux (Ubuntu Resolute)
Status: New => Invalid
** Changed in: linux (Ubuntu Stonking)
Status: New => In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169023
Title:
Fix TI TAS2783 amplifier firmware load issue
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2169023/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs