From e76ab4521352e23df9f11d70e7563a04345e0d84 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, and a fix has reportedly been shared with HP for this board too. Until it ships, add a quirk: when the constant is absent 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 property is absent, 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 | 21 +++++++++++++++++++++ sound/soc/sdca/sdca_functions.c | 9 ++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) 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..43e5e9ad7fef57 100644 --- a/sound/soc/sdca/sdca_device.c +++ b/sound/soc/sdca/sdca_device.c @@ -97,6 +97,25 @@ static bool sdca_device_quirk_skip_func_type_patching(struct sdw_slave *slave) return false; } +/* + * The HP OmniBook Ultra 14 (board 8EB4) firmware declares the Function + * Topology control (0x05) of its TI TAS2783 amplifiers with access mode 3 + * and no DisCo constant, so the function type cannot be parsed. The + * TAS2783 only implements a SmartAmp function. + */ +static bool sdca_device_quirk_tas2783_smart_amp_func_type(struct sdw_slave *slave) +{ + const char *vendor, *board; + + if (slave->id.mfg_id != 0x0102 || slave->id.part_id != 0x0000) + return false; + + vendor = dmi_get_system_info(DMI_SYS_VENDOR); + board = dmi_get_system_info(DMI_BOARD_NAME); + + return vendor && board && !strcmp(vendor, "HP") && !strcmp(board, "8EB4"); +} + bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk) { switch (quirk) { @@ -104,6 +123,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..3ca96c4204ca06 100644 --- a/sound/soc/sdca/sdca_functions.c +++ b/sound/soc/sdca/sdca_functions.c @@ -101,6 +101,7 @@ static int find_sdca_function(struct acpi_device *adev, void *data) u32 function_type; int function_index; u64 addr; + bool has_dc_value; int i, ret; if (sdca_data->num_functions >= SDCA_MAX_FUNCTION_COUNT) { @@ -132,12 +133,18 @@ static int find_sdca_function(struct acpi_device *adev, void *data) if (!control5) return -ENODEV; + has_dc_value = fwnode_property_present(control5, + "mipi-sdca-control-dc-value"); ret = fwnode_property_read_u32(control5, "mipi-sdca-control-dc-value", &function_type); fwnode_handle_put(control5); - if (ret < 0) { + if (!has_dc_value && + sdca_device_quirk_match(slave, SDCA_QUIRKS_TAS2783_SMART_AMP_FUNC_TYPE)) { + dev_warn(dev, FW_BUG "function type not a DisCo constant, assuming SmartAmp\n"); + function_type = SDCA_FUNCTION_TYPE_SMART_AMP; + } else if (ret < 0) { dev_err(dev, "function type only supported as DisCo constant\n"); return ret; }