Public bug reported:

[Impact]

TAS2783 SoundWire smart amplifiers add >5s to resume on systems with
AMD ACP (e.g., ASUS ProArt PX13, HP EliteBook X G2i). Each TAS2783
device waits up to 5s (TAS2783_PROBE_TIMEOUT) for
slave->initialization_complete during resume. The SoundWire slaves
do not re-enumerate after s2idle on AMD ACP, so the timeout fires
for each device sequentially, causing ~15s slow resume on systems
with 2-3 TAS2783 amps.

After resume, speakers stay silent even though firmware re-downloads
successfully. The regcache holds stale pre-suspend values, so
subsequent read-modify-write updates (DAPM power-up, SDCA PDE
transitions) see "no change" and skip the hardware write. Audio
runs without errors while the amplifier remains muted.

Error log:
  slave-tas2783 sdw:0:1:0102:0000:01:8: resume: initialization timed out
  slave-tas2783 sdw:0:1:0102:0000:01:8: PM: dpm_run_callback(): 
acpi_subsys_resume returns -110
  slave-tas2783 sdw:0:1:0102:0000:01:8: PM: failed to resume: error -110

[Fix]

Three patches from upstream sound tree:

1. Commit: 0d6b2d6f93a6 ("ASoC: codecs: tas2783-sdw: Propagate
   regcache_sync() errors")
   Upstream: v7.3-rc1

2. Commit: ac6d4f298160 ("ASoC: tas2783: Use new SoundWire
   enumeration helper")
   Upstream: v7.2-rc1

3. Commit: b627da430357 ("ASoC: tas2783-sdw: drop stale regcache
   on uninitialized re-attach")
   Upstream: linux-next / sound-7.3-rc1 (not yet in released tag)
   Fixes: 4cc9bd8d7b32 ("ASoc: tas2783A: Add soundwire based
   codec driver")

[Test Plan]

Suspend 30 times:
  $ sudo rtcwake -m mem -s 20

Without patches: resume takes >5s per TAS2783 device, speakers
produce no audio after resume, dmesg shows "resume: initialization
timed out" and "PM: failed to resume: error -110".

With patches: resume completes in <1s, speakers work after resume,
no timeout errors in dmesg.

[Where problems could occur]

Could break TAS2783 SoundWire driver resume and device initialization.

The sdw_slave_wait_for_init() helper changes how the driver waits
for SoundWire enumeration. If the helper has a bug, resume could
hang or return an error for all SoundWire slaves, not just TAS2783.

The regcache_drop_region() call removes all cached register values.
If the device does not actually lose power during suspend (e.g.,
S3 instead of S0i3), dropping the cache forces a full re-initialization
that is unnecessary and could cause a brief audio glitch on resume.

** Affects: hwe-next
     Importance: Undecided
         Status: New

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-oem-6.17 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux (Ubuntu Noble)
     Importance: Undecided
         Status: New

** Affects: linux-oem-6.17 (Ubuntu Noble)
     Importance: Undecided
         Status: In Progress

** Affects: linux (Ubuntu Resolute)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-6.17 (Ubuntu Resolute)
     Importance: Undecided
         Status: New


** Tags: jira-stella-3818 oem-priority stella

** Also affects: linux-oem-6.17 (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: linux-oem-6.17 (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Also affects: linux-oem-6.17 (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu Resolute)
       Status: New => In Progress

** Changed in: linux-oem-6.17 (Ubuntu Noble)
       Status: New => In Progress

** Tags added: jira-stella-3818 oem-priority stella

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164967

Title:
  FIx TAS2783 SoundWire amp resume timeout  >5s

To manage notifications about this bug go to:
https://bugs.launchpad.net/hwe-next/+bug/2164967/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to