From a4d7e8af39d8757220eb695d9c44ee1f16ca4e7b Mon Sep 17 00:00:00 2001 From: jonnyjonjon Date: Mon, 23 Nov 2026 20:49:40 -0500 Subject: [PATCH] ASoC: SDCA: add a function type quirk for TAS2783 on HP OmniBook Ultra 14 On the HP OmniBook Ultra 14 (board 8EB4, Panther Lake; BIOS F.06 and F.07) the firmware declares the Function Topology control (0x05) of the four TI TAS2783 amplifiers with access mode 3 and no mipi-sdca-control-dc-value. find_sdca_function() then fails with "function type only supported as DisCo constant", no SmartAmp function is created, there is no speaker endpoint, and the internal speakers are silent. The RT712 on the same machine provides the constant and is unaffected. This is a firmware defect. The same one was fixed by a BIOS update on the HP EliteBook X and on the OmniBook X Flip 14 (8EA4, BIOS F.11), see the Link tags below. Until this board gets a fixed BIOS, add a quirk: when the constant cannot be read on this board, treat a TAS2783 (mfg 0x0102, part 0x0000) as a SmartAmp, which is the only function that part implements. On the OmniBook X Flip 14 (8EA4), whose fixed BIOS (F.11) declares the constant, the same part is reported as a SmartAmp (type 1). The quirk is limited to this vendor and board name, and only applies when the constant cannot be read, so a fixed BIOS bypasses it and no other machine changes behaviour. The fallback is logged with FW_BUG. Based on the unconditional fallback proposed by Kasey Prichard in thesofproject/linux PR #5904. Tested on HP OmniBook Ultra 14 (8EB4), BIOS F.07: four SmartAmp functions are created. Working speakers also need "soundwire: intel_ace2x: keep DACTQE at its reset value". This patch was developed with the help of Claude Code (Claude Opus 5.5). I reviewed the change and tested it on the hardware above. Link: https://github.com/thesofproject/linux/issues/5732 Link: https://github.com/thesofproject/linux/pull/5904 Link: https://github.com/thesofproject/linux/issues/5760 Link: https://github.com/thesofproject/linux/issues/5981 Signed-off-by: jonnyjonjon --- include/sound/sdca.h | 1 + sound/soc/sdca/sdca_device.c | 27 +++++++++++++++++++++++++++ sound/soc/sdca/sdca_functions.c | 8 ++++++-- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/include/sound/sdca.h b/include/sound/sdca.h index db2672b3aae27a..e2007277e75568 100644 --- a/include/sound/sdca.h +++ b/include/sound/sdca.h @@ -58,6 +58,7 @@ struct sdca_device_data { enum sdca_quirk { SDCA_QUIRKS_RT712_VB, SDCA_QUIRKS_SKIP_FUNC_TYPE_PATCHING, + SDCA_QUIRKS_TAS2783_SMART_AMP_FUNC_TYPE, }; #if IS_ENABLED(CONFIG_SND_SOC_SDCA) diff --git a/sound/soc/sdca/sdca_device.c b/sound/soc/sdca/sdca_device.c index 3f302bfa545779..bfd771311b4657 100644 --- a/sound/soc/sdca/sdca_device.c +++ b/sound/soc/sdca/sdca_device.c @@ -97,6 +97,31 @@ static bool sdca_device_quirk_skip_func_type_patching(struct sdw_slave *slave) return false; } +/* + * Boards whose firmware omits the DisCo constant (mipi-sdca-control-dc-value) + * for the Function Topology control (0x05) of their TI TAS2783 amplifiers, + * so the function type cannot be read. The TAS2783 only implements a + * SmartAmp function, so it is safe to assume that type on these boards. + */ +static const struct dmi_system_id tas2783_smart_amp_func_type_dmi[] = { + { + /* HP OmniBook Ultra 14 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "8EB4"), + }, + }, + {} +}; + +static bool sdca_device_quirk_tas2783_smart_amp_func_type(struct sdw_slave *slave) +{ + if (slave->id.mfg_id != 0x0102 || slave->id.part_id != 0x0000) + return false; + + return dmi_check_system(tas2783_smart_amp_func_type_dmi); +} + bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk) { switch (quirk) { @@ -104,6 +129,8 @@ bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk) return sdca_device_quirk_rt712_vb(slave); case SDCA_QUIRKS_SKIP_FUNC_TYPE_PATCHING: return sdca_device_quirk_skip_func_type_patching(slave); + case SDCA_QUIRKS_TAS2783_SMART_AMP_FUNC_TYPE: + return sdca_device_quirk_tas2783_smart_amp_func_type(slave); default: break; } diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c index 1eb6418e132dcb..b18cfc035110a5 100644 --- a/sound/soc/sdca/sdca_functions.c +++ b/sound/soc/sdca/sdca_functions.c @@ -138,8 +138,12 @@ static int find_sdca_function(struct acpi_device *adev, void *data) fwnode_handle_put(control5); if (ret < 0) { - dev_err(dev, "function type only supported as DisCo constant\n"); - return ret; + if (!sdca_device_quirk_match(slave, SDCA_QUIRKS_TAS2783_SMART_AMP_FUNC_TYPE)) { + dev_err(dev, "function type only supported as DisCo constant\n"); + return ret; + } + dev_warn(dev, FW_BUG "function type not a DisCo constant, assuming SmartAmp\n"); + function_type = SDCA_FUNCTION_TYPE_SMART_AMP; } if (!sdca_device_quirk_match(slave, SDCA_QUIRKS_SKIP_FUNC_TYPE_PATCHING)) {