From 852bb05a397ff7360c78876b355b0d47ecb15a9e Mon Sep 17 00:00:00 2001
From: Chris Chiu <chris.chiu@canonical.com>
Date: Fri, 12 Jun 2026 02:13:09 +0000
Subject: [SRU][R][PATCH 0/1] Fix no audio from right built-in speaker on HP ZBook with TAS2781 amplifier 
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

BugLink: https://bugs.launchpad.net/bugs/2156556

[Impact]
The TI TAS2781 smart amp fails to initialize when connected over SPI on the new HP HP ZBook.
The right built-in speaker will fail to output after reboot

[Fix]
Two changes in one commit:

    Always run the software reset sequence for the amp, not just in the
    no-gpio path. This resets device-0 even when its hardware reset pin
    has no effect.

    Ignore -EXDEV during block processing when the device is on SPI.
    The driver keeps iterating through the blocks and adds up the total
    block size correctly.

Upstream commit (in tiwai/sound for-next, not yet in a released tag):
513480da5e9c ALSA: hda/tas2781: Fix device-0 reset issue and handle
-EXDEV in block data processing

https://patch.msgid.link/20260609105253.19510-1-baojun.xu@ti.com

[Test Plan]
On HP Zbook with a TAS2781 amp connected over SPI:

$ dmesg | grep -i tas2781

Play audio:
$ speaker-test -c 2 -t wav

Without patch: dmesg shows "dev sw-reset fail" or
"process_block: single write error" / "bulk_write error". No sound
from the TAS2781 speakers.

With patch: no reset or block errors in dmesg. Speakers play sound.

[Where problems could occur]
The reset change now runs the software reset on every path, including
the gpio reset path. If the software reset is wrong for some amp, the
device could fail to come up and stay silent.
Both changes are amp init only, so a regression would show up as no
sound on TAS2781 SPI systems.

Baojun Xu (1):
  ALSA: hda/tas2781: Fix device-0 reset issue and handle -EXDEV in block
    data processing

 sound/hda/codecs/side-codecs/tas2781_hda_spi.c | 16 ++++++++--------
 sound/soc/codecs/tas2781-fmwlib.c              |  7 ++++---
 2 files changed, 12 insertions(+), 11 deletions(-)

-- 
2.43.0

