Re: [PATCH v3 2/2] ASoC: codecs: add TAS2557 mono smart amplifier driver

From: Gianluca Boiano

Date: Thu Nov 19 2026 - 19:45:15 EST


On Sun, Jul 19, 2026 at 08:05:19PM +0100, Mark Brown wrote:
> This looks awfully board specific....

v4 adds ti,asi-port, and the driver programs only the selected ASI,
on the pins the datasheet marks as preferred for that port.

> I didn't check but is there room for sharing code with the other
> multi-book TI devices?

Yes. v4 uses tas2781-comlib-i2c for the paged regmap, book/page
switching and per-chip access, and drops the private copy.

> The tas2781 checks to see if there are one or two devices being
> controlled by the driver and rejects a mismatch. Also, is there some
> overlap in firmware formats here? Again I didn't actually check.

The header has the same layout as the one tas2781-fmwlib parses
(fixed header, description, device family, device), so v4 uses the
TASDEVICE_DSP_TAS_2557_*
values and rejects an image whose chip count does not match before
installing it. The body differs: TAS2557 images carry a PLL section
and each configuration references a PLL by index, which fmwlib does
not parse, so that part stays in the driver.

> Shouldn't an out of range value be an error?

Yes, the image is rejected in v4.

> Does sense_muted get handled properly for suspend? The core mutes and
> unmutes playback streams over suspend but not capture.

sense_muted is gone. The I/V sense ADCs feed the DSP's speaker
protection, so v4 keeps them powered and unmuted while the amplifier
plays, as TI's driver does, and sets no_capture_mute.

> This won't actually take effect if the device doesn't power down - you
> should probably not set use_pmdown_time to force a power down/up, though
> that's annoying when the configuration is the same.

v4 applies the change from hw_params() when the group is already
powered and reloads the configuration only if the new rate needs a
different one. use_pmdown_time stays.

Gianluca