From c5ad3f623103c5b606043517a63f202a22283d32 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Wed, 11 Feb 2026 11:27:33 +0100 Subject: [PATCH 1/2] ASoC: dt-bindings: awinic,aw88395: Document firmware-name property Since the aw88261_acf.bin file appears to be device-specific, add a firmware-name property so that devicetree users can point to a device-specific path to not conflict with other devices that might also ship a aw88261_acf.bin. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260211-aw88261-fwname-v1-2-e24e833a019d@fairphone.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/awinic,aw88395.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml index 994d68c074a9..b9abb10942ba 100644 --- a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml +++ b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml @@ -35,6 +35,10 @@ properties: dvdd-supply: true + firmware-name: + maxItems: 1 + description: Name of the *_acf.bin file used for amplifier initialization + awinic,audio-channel: description: It is used to distinguish multiple PA devices, so that different From 171b3663f33e1efdc97f5112f49be10b47b20fa8 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Wed, 11 Feb 2026 11:27:34 +0100 Subject: [PATCH 2/2] ASoC: codecs: aw88261: Add firmware-name support Since the aw88261_acf.bin file appears to be device-specific, add firmware-name support so that devicetree users can point to a device-specific path to not conflict with other devices that might also ship a aw88261_acf.bin. Read the "firmware-name" property if available, and otherwise fall back to the generic name. Signed-off-by: Luca Weiss Link: https://patch.msgid.link/20260211-aw88261-fwname-v1-3-e24e833a019d@fairphone.com Signed-off-by: Mark Brown --- sound/soc/codecs/aw88261.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c index 43c03d3cb252..02f8c2bb2569 100644 --- a/sound/soc/codecs/aw88261.c +++ b/sound/soc/codecs/aw88261.c @@ -1094,17 +1094,22 @@ static int aw88261_dev_init(struct aw88261 *aw88261, struct aw_container *aw_cfg static int aw88261_request_firmware_file(struct aw88261 *aw88261) { const struct firmware *cont = NULL; + const char *fw_name; int ret; aw88261->aw_pa->fw_status = AW88261_DEV_FW_FAILED; - ret = request_firmware(&cont, AW88261_ACF_FILE, aw88261->aw_pa->dev); + ret = device_property_read_string(aw88261->aw_pa->dev, "firmware-name", &fw_name); + if (ret) + fw_name = AW88261_ACF_FILE; + + ret = request_firmware(&cont, fw_name, aw88261->aw_pa->dev); if (ret) return dev_err_probe(aw88261->aw_pa->dev, ret, - "load [%s] failed!", AW88261_ACF_FILE); + "load [%s] failed!", fw_name); dev_info(aw88261->aw_pa->dev, "loaded %s - size: %zu\n", - AW88261_ACF_FILE, cont ? cont->size : 0); + fw_name, cont ? cont->size : 0); aw88261->aw_cfg = devm_kzalloc(aw88261->aw_pa->dev, cont->size + sizeof(int), GFP_KERNEL); if (!aw88261->aw_cfg) { @@ -1117,7 +1122,7 @@ static int aw88261_request_firmware_file(struct aw88261 *aw88261) ret = aw88395_dev_load_acf_check(aw88261->aw_pa, aw88261->aw_cfg); if (ret) { - dev_err(aw88261->aw_pa->dev, "load [%s] failed !", AW88261_ACF_FILE); + dev_err(aw88261->aw_pa->dev, "load [%s] failed !", fw_name); return ret; }