Files
Antheas Kapenekakis aa463ec2ff ALSA: hda/tas2781: fix speaker id retrieval for multiple probes
commit 945865a0dd upstream.

Currently, on ASUS projects, the TAS2781 codec attaches the speaker GPIO
to the first tasdevice_priv instance using devm. This causes
tas2781_read_acpi to fail on subsequent probes since the GPIO is already
managed by the first device. This causes a failure on Xbox Ally X,
because it has two amplifiers, and prevents us from quirking both the
Xbox Ally and Xbox Ally X in the realtek codec driver.

It is unnecessary to attach the GPIO to a device as it is static.
Therefore, instead of attaching it and then reading it when loading the
firmware, read its value directly in tas2781_read_acpi and store it in
the private data structure. Then, make reading the value non-fatal so
that ASUS projects that miss a speaker pin can still work, perhaps using
fallback firmware.

Fixes: 4e7035a75d ("ALSA: hda/tas2781: Add speaker id check for ASUS projects")
Cc: stable@vger.kernel.org # 6.17
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Reviewed-by: Baojun Xu <baojun.xu@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251026191635.2447593-1-lkml@antheas.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-12-18 14:00:16 +01:00
..
2024-08-08 07:49:45 +02:00
2023-05-23 12:11:21 +02:00
2024-08-08 07:47:24 +02:00
2025-05-11 16:23:28 +02:00
2023-08-17 09:24:01 +02:00
2025-05-22 20:34:24 +02:00
2023-05-23 12:11:33 +02:00
2025-06-08 23:31:03 +01:00
2025-02-16 23:51:06 +00:00
2024-08-08 07:49:46 +02:00
2020-09-09 18:32:52 +02:00
2025-01-12 13:12:21 +01:00
2024-08-08 07:47:23 +02:00