Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/tas2781: properly initialize speaker_id for TAS2563
@ 2025-12-22 19:47 August Wikerfors
  2025-12-23  9:51 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: August Wikerfors @ 2025-12-22 19:47 UTC (permalink / raw)
  To: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai
  Cc: Antheas Kapenekakis, linux-sound, linux-kernel, August Wikerfors

After speaker id retrieval was refactored to happen in tas2781_read_acpi,
devices that do not use a speaker id need a negative speaker_id value
instead of NULL, but no initialization was added to the TAS2563 code path.
This causes the driver to attempt to load a non-existent firmware file name
with a speaker id of 0 ("TAS2XXX38700.bin") instead of the correct file
name without a speaker id ("TAS2XXX3870.bin"), resulting in low volume and
these dmesg errors:

    tas2781-hda i2c-INT8866:00: Direct firmware load for TAS2XXX38700.bin failed with error -2
    tas2781-hda i2c-INT8866:00: tasdevice_dsp_parser: load TAS2XXX38700.bin error
    tas2781-hda i2c-INT8866:00: dspfw load TAS2XXX38700.bin error
    [...]
    tas2781-hda i2c-INT8866:00: tasdevice_prmg_load: Firmware is NULL

Fix this by setting speaker_id to -1 as is done for other models.

Fixes: 945865a0ddf3 ("ALSA: hda/tas2781: fix speaker id retrieval for multiple probes")
Cc: stable@vger.kernel.org
Signed-off-by: August Wikerfors <git@augustwikerfors.se>
---
 sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
index c8619995b1d7..f7a7f216d586 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
@@ -111,8 +111,10 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
 	sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
 	if (IS_ERR(sub)) {
 		/* No subsys id in older tas2563 projects. */
-		if (!strncmp(hid, "INT8866", sizeof("INT8866")))
+		if (!strncmp(hid, "INT8866", sizeof("INT8866"))) {
+			p->speaker_id = -1;
 			goto end_2563;
+		}
 		dev_err(p->dev, "Failed to get SUBSYS ID.\n");
 		ret = PTR_ERR(sub);
 		goto err;
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/tas2781: properly initialize speaker_id for TAS2563
  2025-12-22 19:47 [PATCH] ALSA: hda/tas2781: properly initialize speaker_id for TAS2563 August Wikerfors
@ 2025-12-23  9:51 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-12-23  9:51 UTC (permalink / raw)
  To: August Wikerfors
  Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
	Antheas Kapenekakis, linux-sound, linux-kernel

On Mon, 22 Dec 2025 20:47:04 +0100,
August Wikerfors wrote:
> 
> After speaker id retrieval was refactored to happen in tas2781_read_acpi,
> devices that do not use a speaker id need a negative speaker_id value
> instead of NULL, but no initialization was added to the TAS2563 code path.
> This causes the driver to attempt to load a non-existent firmware file name
> with a speaker id of 0 ("TAS2XXX38700.bin") instead of the correct file
> name without a speaker id ("TAS2XXX3870.bin"), resulting in low volume and
> these dmesg errors:
> 
>     tas2781-hda i2c-INT8866:00: Direct firmware load for TAS2XXX38700.bin failed with error -2
>     tas2781-hda i2c-INT8866:00: tasdevice_dsp_parser: load TAS2XXX38700.bin error
>     tas2781-hda i2c-INT8866:00: dspfw load TAS2XXX38700.bin error
>     [...]
>     tas2781-hda i2c-INT8866:00: tasdevice_prmg_load: Firmware is NULL
> 
> Fix this by setting speaker_id to -1 as is done for other models.
> 
> Fixes: 945865a0ddf3 ("ALSA: hda/tas2781: fix speaker id retrieval for multiple probes")
> Cc: stable@vger.kernel.org
> Signed-off-by: August Wikerfors <git@augustwikerfors.se>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-23  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22 19:47 [PATCH] ALSA: hda/tas2781: properly initialize speaker_id for TAS2563 August Wikerfors
2025-12-23  9:51 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox