From: Marco Giunta <marco_giunta@outlook.it>
To: Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Wayne Sun <sunweiwen@awinic.com>,
Jimmy Zhang <zhangjianming@awinic.com>,
Ben Yi <yijiangtao@awinic.com>, Xia Yun'an <imitoy@imitoy.top>,
Marco Giunta <marco_giunta@outlook.it>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] ASoC: aw88399: pass firmware name as argument
Date: Sun, 18 Oct 2026 19:43:56 +0200 [thread overview]
Message-ID: <SN6PR19MB2303DB0BF41797A38EB04CBFFC992@SN6PR19MB2303.namprd19.prod.outlook.com> (raw)
In-Reply-To: <SN6PR19MB230399720ECFE990FF92A7BFFC992@SN6PR19MB2303.namprd19.prod.outlook.com>
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>
---
include/sound/aw88399.h | 2 +-
sound/hda/codecs/side-codecs/aw88399_hda.c | 2 +-
sound/soc/codecs/aw88399-lib.c | 10 +++++-----
sound/soc/codecs/aw88399.c | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/sound/aw88399.h b/include/sound/aw88399.h
index 38d9bd6abd8b..d72c491ee866 100644
--- a/include/sound/aw88399.h
+++ b/include/sound/aw88399.h
@@ -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);
diff --git a/sound/hda/codecs/side-codecs/aw88399_hda.c b/sound/hda/codecs/side-codecs/aw88399_hda.c
index 9c6e01c29651..78bafe3c1b64 100644
--- a/sound/hda/codecs/side-codecs/aw88399_hda.c
+++ b/sound/hda/codecs/side-codecs/aw88399_hda.c
@@ -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;
diff --git a/sound/soc/codecs/aw88399-lib.c b/sound/soc/codecs/aw88399-lib.c
index 75a533c9b752..b4e8aae56805 100644
--- a/sound/soc/codecs/aw88399-lib.c
+++ b/sound/soc/codecs/aw88399-lib.c
@@ -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;
}
diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index e9dab5e7bae3..320dc1b87841 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -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__);
--
2.56.0
next prev parent reply other threads:[~2026-10-18 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 17:43 [PATCH 0/2] ALSA: hda: aw88399: Add per-model firmware loading Marco Giunta
2026-10-18 17:43 ` Marco Giunta [this message]
2026-10-18 17:43 ` [PATCH 2/2] ALSA: hda: aw88399: use SSID-specific firmware name Marco Giunta
2026-10-19 18:02 ` [PATCH 0/2] ALSA: hda: aw88399: Add per-model firmware loading Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SN6PR19MB2303DB0BF41797A38EB04CBFFC992@SN6PR19MB2303.namprd19.prod.outlook.com \
--to=marco_giunta@outlook.it \
--cc=broonie@kernel.org \
--cc=imitoy@imitoy.top \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=perex@perex.cz \
--cc=sunweiwen@awinic.com \
--cc=tiwai@suse.com \
--cc=yijiangtao@awinic.com \
--cc=zhangjianming@awinic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®