ASoC: aw88399: pass firmware name as argument

Pass the ACF firmware filename as an argument to
aw88399_request_firmware_file() instead of hardcoding AW88399_ACF_FILE.
Both existing callers (ASoC and HDA) pass AW88399_ACF_FILE to preserve
current behavior. Also add missing newlines to the log messages of the
modified lines.

This allows the HDA side codec driver to request per-model firmware files
in the next patch.

Tested-by: Xia Yun'an <imitoy@imitoy.top>
Signed-off-by: Marco Giunta <marco_giunta@outlook.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/SN6PR19MB2303DB0BF41797A38EB04CBFFC992@SN6PR19MB2303.namprd19.prod.outlook.com
This commit is contained in:
Marco Giunta authored and Takashi Iwai committed 2026-10-19 20:00:53 +02:00
1 parent 31fd009c28
commit fc49516fbf
4 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -617,7 +617,7 @@ void aw88399_dev_set_channel(struct aw88399 *aw88399, int channel);
void aw88399_hw_reset(struct aw88399 *aw88399);
int aw88399_init(struct aw88399 *aw88399, struct i2c_client *i2c, struct regmap *regmap);
extern const struct regmap_config aw88399_remap_config;
int aw88399_request_firmware_file(struct aw88399 *aw88399);
int aw88399_request_firmware_file(struct aw88399 *aw88399, const char *fw_name);
void aw88399_start(struct aw88399 *aw88399, bool sync_start);
void aw88399_startup_work(struct work_struct *work);
int aw88399_stop(struct aw_device *aw_dev);
+1 -1
View File
@@ -129,7 +129,7 @@ static int aw88399_hda_init(struct aw88399_hda *aw88399)
if (core->aw_pa)
aw88399_dev_set_channel(core, aw88399->channel);
ret = aw88399_request_firmware_file(core);
ret = aw88399_request_firmware_file(core, AW88399_ACF_FILE);
if (ret)
return ret;
+5 -5
View File
@@ -1284,21 +1284,21 @@ static int aw88399_dev_init(struct aw88399 *aw88399, struct aw_container *aw_cfg
return 0;
}
int aw88399_request_firmware_file(struct aw88399 *aw88399)
int aw88399_request_firmware_file(struct aw88399 *aw88399, const char *fw_name)
{
const struct firmware *cont __free(firmware) = NULL;
int ret;
aw88399->aw_pa->fw_status = AW88399_DEV_FW_FAILED;
ret = request_firmware(&cont, AW88399_ACF_FILE, aw88399->aw_pa->dev);
ret = request_firmware(&cont, fw_name, aw88399->aw_pa->dev);
if (ret) {
dev_err(aw88399->aw_pa->dev, "request [%s] failed!", AW88399_ACF_FILE);
dev_err(aw88399->aw_pa->dev, "request [%s] failed!\n", fw_name);
return ret;
}
dev_dbg(aw88399->aw_pa->dev, "loaded %s - size: %zu\n",
AW88399_ACF_FILE, cont ? cont->size : 0);
fw_name, cont ? cont->size : 0);
aw88399->aw_cfg = devm_kzalloc(aw88399->aw_pa->dev,
struct_size(aw88399->aw_cfg, data, cont->size), GFP_KERNEL);
@@ -1310,7 +1310,7 @@ int aw88399_request_firmware_file(struct aw88399 *aw88399)
ret = aw88395_dev_load_acf_check(aw88399->aw_pa, aw88399->aw_cfg);
if (ret) {
dev_err(aw88399->aw_pa->dev, "load [%s] failed!", AW88399_ACF_FILE);
dev_err(aw88399->aw_pa->dev, "load [%s] failed!\n", fw_name);
return ret;
}
+1 -1
View File
@@ -727,7 +727,7 @@ static int aw88399_codec_probe(struct snd_soc_component *component)
INIT_DELAYED_WORK(&aw88399->start_work, aw88399_startup_work);
ret = aw88399_request_firmware_file(aw88399);
ret = aw88399_request_firmware_file(aw88399, AW88399_ACF_FILE);
if (ret)
dev_err(aw88399->aw_pa->dev, "%s failed\n", __func__);