* [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
@ 2023-03-29 13:05 Jianhua Lu
2023-03-29 14:05 ` Charles Keepax via Alsa-devel
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 13:05 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Richard Fitzgerald, Simon Trimmer, Charles Keepax,
Cristian Ciocaltea
Cc: patches, alsa-devel, linux-kernel, ~postmarketos/upstreaming,
phone-devel, Jianhua Lu
For platform using fdt, system_name is NULL, it doesn't provide
a way to load firmware with prefix name, so add it.
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
sound/soc/codecs/wm_adsp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 216120b68b64..17481e42d440 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -760,6 +760,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
dsp->fwf_name, wm_adsp_fw[dsp->fw].file, system_name,
filetype);
+ else if (asoc_component_prefix)
+ *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
+ dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
+ filetype);
else
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, dsp->fwf_name,
wm_adsp_fw[dsp->fw].file, filetype);
@@ -831,6 +835,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
NULL, "bin");
return 0;
}
+ } else if (asoc_component_prefix) {
+ if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
+ cirrus_dir, NULL,
+ asoc_component_prefix, "wmfw")) {
+ adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
+ wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+ cirrus_dir, NULL,
+ asoc_component_prefix, "bin");
+ return 0;
+ }
}
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 13:05 [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name Jianhua Lu
@ 2023-03-29 14:05 ` Charles Keepax via Alsa-devel
2023-03-29 14:05 ` Charles Keepax
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Charles Keepax via Alsa-devel @ 2023-03-29 14:05 UTC (permalink / raw)
To: Jianhua Lu
Cc: Liam Girdwood, Mark Brown, Takashi Iwai, Richard Fitzgerald,
Simon Trimmer, Cristian Ciocaltea, patches, alsa-devel,
linux-kernel, ~postmarketos/upstreaming, phone-devel
[-- Attachment #0: Type: message/rfc822, Size: 7028 bytes --]
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Jianhua Lu <lujianhua000@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>, Richard Fitzgerald <rf@opensource.cirrus.com>, Simon Trimmer <simont@opensource.cirrus.com>, Cristian Ciocaltea <cristian.ciocaltea@collabora.com>, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org
Subject: Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
Date: Wed, 29 Mar 2023 14:05:24 +0000
Message-ID: <20230329140524.GU68926@ediswmail.ad.cirrus.com>
On Wed, Mar 29, 2023 at 09:05:25PM +0800, Jianhua Lu wrote:
> For platform using fdt, system_name is NULL, it doesn't provide
> a way to load firmware with prefix name, so add it.
>
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
> sound/soc/codecs/wm_adsp.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
> index 216120b68b64..17481e42d440 100644
> --- a/sound/soc/codecs/wm_adsp.c
> +++ b/sound/soc/codecs/wm_adsp.c
> @@ -760,6 +760,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> dsp->fwf_name, wm_adsp_fw[dsp->fw].file, system_name,
> filetype);
> + else if (asoc_component_prefix)
> + *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> + dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
> + filetype);
> else
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, dsp->fwf_name,
> wm_adsp_fw[dsp->fw].file, filetype);
> @@ -831,6 +835,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
> NULL, "bin");
> return 0;
> }
> + } else if (asoc_component_prefix) {
> + if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "wmfw")) {
> + adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
> + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "bin");
> + return 0;
> + }
> }
This direction seems slightly problematic, especially in the
context of amps (which I presume this relates to, please let know
if that is wrong). It would probably be better to be fixing
things up such that the amp in question sets system_name when
registered through DT. Generally speaking the idea is the amp
tuning is going to be specific to the enclosure/speaker involved,
so a generic tuning for say left amps doesn't really make a lot
of sense.
Thanks,
Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 13:05 [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name Jianhua Lu
2023-03-29 14:05 ` Charles Keepax via Alsa-devel
@ 2023-03-29 14:05 ` Charles Keepax
2023-03-29 14:37 ` Jianhua Lu
2023-03-29 15:33 ` Richard Fitzgerald
2023-03-29 15:33 ` Richard Fitzgerald via Alsa-devel
3 siblings, 1 reply; 13+ messages in thread
From: Charles Keepax @ 2023-03-29 14:05 UTC (permalink / raw)
To: Jianhua Lu
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Richard Fitzgerald, Simon Trimmer, Cristian Ciocaltea, patches,
alsa-devel, linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 09:05:25PM +0800, Jianhua Lu wrote:
> For platform using fdt, system_name is NULL, it doesn't provide
> a way to load firmware with prefix name, so add it.
>
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
> sound/soc/codecs/wm_adsp.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
> index 216120b68b64..17481e42d440 100644
> --- a/sound/soc/codecs/wm_adsp.c
> +++ b/sound/soc/codecs/wm_adsp.c
> @@ -760,6 +760,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> dsp->fwf_name, wm_adsp_fw[dsp->fw].file, system_name,
> filetype);
> + else if (asoc_component_prefix)
> + *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> + dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
> + filetype);
> else
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, dsp->fwf_name,
> wm_adsp_fw[dsp->fw].file, filetype);
> @@ -831,6 +835,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
> NULL, "bin");
> return 0;
> }
> + } else if (asoc_component_prefix) {
> + if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "wmfw")) {
> + adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
> + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "bin");
> + return 0;
> + }
> }
This direction seems slightly problematic, especially in the
context of amps (which I presume this relates to, please let know
if that is wrong). It would probably be better to be fixing
things up such that the amp in question sets system_name when
registered through DT. Generally speaking the idea is the amp
tuning is going to be specific to the enclosure/speaker involved,
so a generic tuning for say left amps doesn't really make a lot
of sense.
Thanks,
Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 14:05 ` Charles Keepax
@ 2023-03-29 14:37 ` Jianhua Lu
0 siblings, 0 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 14:37 UTC (permalink / raw)
To: Charles Keepax
Cc: Liam Girdwood, Mark Brown, Takashi Iwai, Richard Fitzgerald,
Simon Trimmer, Cristian Ciocaltea, patches, alsa-devel,
linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 02:05:24PM +0000, Charles Keepax wrote:
>
> This direction seems slightly problematic, especially in the
> context of amps (which I presume this relates to, please let know
> if that is wrong). It would probably be better to be fixing
> things up such that the amp in question sets system_name when
> registered through DT. Generally speaking the idea is the amp
I also consider setting system_name when registered by DT, but I don't
known setting what name to it. Card name or something else?
> tuning is going to be specific to the enclosure/speaker involved,
> so a generic tuning for say left amps doesn't really make a lot
> of sense.
I don't known about amp tuning much, my need just is loading firmware for
more than 1 speaker amp at the platform using fdt.
One of the both way is good to me.
>
> Thanks,
> Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
@ 2023-03-29 14:37 ` Jianhua Lu
0 siblings, 0 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 14:37 UTC (permalink / raw)
To: Charles Keepax
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Richard Fitzgerald, Simon Trimmer, Cristian Ciocaltea, patches,
alsa-devel, linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 02:05:24PM +0000, Charles Keepax wrote:
>
> This direction seems slightly problematic, especially in the
> context of amps (which I presume this relates to, please let know
> if that is wrong). It would probably be better to be fixing
> things up such that the amp in question sets system_name when
> registered through DT. Generally speaking the idea is the amp
I also consider setting system_name when registered by DT, but I don't
known setting what name to it. Card name or something else?
> tuning is going to be specific to the enclosure/speaker involved,
> so a generic tuning for say left amps doesn't really make a lot
> of sense.
I don't known about amp tuning much, my need just is loading firmware for
more than 1 speaker amp at the platform using fdt.
One of the both way is good to me.
>
> Thanks,
> Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 13:05 [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name Jianhua Lu
` (2 preceding siblings ...)
2023-03-29 15:33 ` Richard Fitzgerald
@ 2023-03-29 15:33 ` Richard Fitzgerald via Alsa-devel
3 siblings, 0 replies; 13+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-03-29 15:33 UTC (permalink / raw)
To: Jianhua Lu, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Simon Trimmer, Charles Keepax, Cristian Ciocaltea
Cc: patches, alsa-devel, linux-kernel, ~postmarketos/upstreaming,
phone-devel
[-- Attachment #0: Type: message/rfc822, Size: 7080 bytes --]
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Jianhua Lu <lujianhua000@gmail.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Simon Trimmer <simont@opensource.cirrus.com>, Charles Keepax <ckeepax@opensource.cirrus.com>, Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org
Subject: Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
Date: Wed, 29 Mar 2023 16:33:08 +0100
Message-ID: <57c5a3b3-00cd-5b44-02f4-dedabacc7662@opensource.cirrus.com>
On 29/3/23 14:05, Jianhua Lu wrote:
> For platform using fdt, system_name is NULL, it doesn't provide
> a way to load firmware with prefix name, so add it.
This is intended behavior.
To load per-amp tuning you must know the function of each amp.
You only know that if you know what hardware platform you are running
on.
So if system_name is NULL it should fall back to generic firmware.
>
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
> sound/soc/codecs/wm_adsp.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
> index 216120b68b64..17481e42d440 100644
> --- a/sound/soc/codecs/wm_adsp.c
> +++ b/sound/soc/codecs/wm_adsp.c
> @@ -760,6 +760,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> dsp->fwf_name, wm_adsp_fw[dsp->fw].file, system_name,
> filetype);
> + else if (asoc_component_prefix)
> + *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> + dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
> + filetype);
> else
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, dsp->fwf_name,
> wm_adsp_fw[dsp->fw].file, filetype);
> @@ -831,6 +835,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
> NULL, "bin");
> return 0;
> }
> + } else if (asoc_component_prefix) {
> + if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "wmfw")) {
> + adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
> + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "bin");
> + return 0;
> + }
> }
>
> if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 13:05 [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name Jianhua Lu
2023-03-29 14:05 ` Charles Keepax via Alsa-devel
2023-03-29 14:05 ` Charles Keepax
@ 2023-03-29 15:33 ` Richard Fitzgerald
2023-03-29 15:43 ` Jianhua Lu
2023-03-29 15:33 ` Richard Fitzgerald via Alsa-devel
3 siblings, 1 reply; 13+ messages in thread
From: Richard Fitzgerald @ 2023-03-29 15:33 UTC (permalink / raw)
To: Jianhua Lu, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Simon Trimmer, Charles Keepax, Cristian Ciocaltea
Cc: patches, alsa-devel, linux-kernel, ~postmarketos/upstreaming,
phone-devel
On 29/3/23 14:05, Jianhua Lu wrote:
> For platform using fdt, system_name is NULL, it doesn't provide
> a way to load firmware with prefix name, so add it.
This is intended behavior.
To load per-amp tuning you must know the function of each amp.
You only know that if you know what hardware platform you are running
on.
So if system_name is NULL it should fall back to generic firmware.
>
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
> sound/soc/codecs/wm_adsp.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
> index 216120b68b64..17481e42d440 100644
> --- a/sound/soc/codecs/wm_adsp.c
> +++ b/sound/soc/codecs/wm_adsp.c
> @@ -760,6 +760,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> dsp->fwf_name, wm_adsp_fw[dsp->fw].file, system_name,
> filetype);
> + else if (asoc_component_prefix)
> + *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
> + dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
> + filetype);
> else
> *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, dsp->fwf_name,
> wm_adsp_fw[dsp->fw].file, filetype);
> @@ -831,6 +835,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
> NULL, "bin");
> return 0;
> }
> + } else if (asoc_component_prefix) {
> + if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "wmfw")) {
> + adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
> + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
> + cirrus_dir, NULL,
> + asoc_component_prefix, "bin");
> + return 0;
> + }
> }
>
> if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 14:37 ` Jianhua Lu
(?)
@ 2023-03-29 15:38 ` Richard Fitzgerald via Alsa-devel
-1 siblings, 0 replies; 13+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-03-29 15:38 UTC (permalink / raw)
To: Jianhua Lu, Charles Keepax
Cc: Liam Girdwood, Mark Brown, Takashi Iwai, Simon Trimmer,
Cristian Ciocaltea, patches, alsa-devel, linux-kernel,
~postmarketos/upstreaming, phone-devel
[-- Attachment #0: Type: message/rfc822, Size: 6252 bytes --]
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Jianhua Lu <lujianhua000@gmail.com>, Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>, Simon Trimmer <simont@opensource.cirrus.com>, Cristian Ciocaltea <cristian.ciocaltea@collabora.com>, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org
Subject: Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
Date: Wed, 29 Mar 2023 16:38:07 +0100
Message-ID: <51cdc8df-9472-a604-3cca-ebaa7ae5d899@opensource.cirrus.com>
On 29/3/23 15:37, Jianhua Lu wrote:
> On Wed, Mar 29, 2023 at 02:05:24PM +0000, Charles Keepax wrote:
>>
>> This direction seems slightly problematic, especially in the
>> context of amps (which I presume this relates to, please let know
>> if that is wrong). It would probably be better to be fixing
>> things up such that the amp in question sets system_name when
>> registered through DT. Generally speaking the idea is the amp
> I also consider setting system_name when registered by DT, but I don't
> known setting what name to it. Card name or something else?
It just has to be a unique string.
The normal process is that Cirrus would release the firmware with the
correct name for the platform, so the system-name matches the string in
those release firmware files.
Do you have an official firmware for your platform?
>> tuning is going to be specific to the enclosure/speaker involved,
>> so a generic tuning for say left amps doesn't really make a lot
>> of sense.
> I don't known about amp tuning much, my need just is loading firmware for
> more than 1 speaker amp at the platform using fdt.
>
> One of the both way is good to me.
>>
>> Thanks,
>> Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 14:37 ` Jianhua Lu
(?)
(?)
@ 2023-03-29 15:38 ` Richard Fitzgerald
2023-03-29 15:49 ` Jianhua Lu
-1 siblings, 1 reply; 13+ messages in thread
From: Richard Fitzgerald @ 2023-03-29 15:38 UTC (permalink / raw)
To: Jianhua Lu, Charles Keepax
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Simon Trimmer, Cristian Ciocaltea, patches, alsa-devel,
linux-kernel, ~postmarketos/upstreaming, phone-devel
On 29/3/23 15:37, Jianhua Lu wrote:
> On Wed, Mar 29, 2023 at 02:05:24PM +0000, Charles Keepax wrote:
>>
>> This direction seems slightly problematic, especially in the
>> context of amps (which I presume this relates to, please let know
>> if that is wrong). It would probably be better to be fixing
>> things up such that the amp in question sets system_name when
>> registered through DT. Generally speaking the idea is the amp
> I also consider setting system_name when registered by DT, but I don't
> known setting what name to it. Card name or something else?
It just has to be a unique string.
The normal process is that Cirrus would release the firmware with the
correct name for the platform, so the system-name matches the string in
those release firmware files.
Do you have an official firmware for your platform?
>> tuning is going to be specific to the enclosure/speaker involved,
>> so a generic tuning for say left amps doesn't really make a lot
>> of sense.
> I don't known about amp tuning much, my need just is loading firmware for
> more than 1 speaker amp at the platform using fdt.
>
> One of the both way is good to me.
>>
>> Thanks,
>> Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 15:33 ` Richard Fitzgerald
@ 2023-03-29 15:43 ` Jianhua Lu
0 siblings, 0 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 15:43 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: Liam Girdwood, Mark Brown, Takashi Iwai, Simon Trimmer,
Charles Keepax, Cristian Ciocaltea, patches, alsa-devel,
linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 04:33:08PM +0100, Richard Fitzgerald wrote:
> On 29/3/23 14:05, Jianhua Lu wrote:
> > For platform using fdt, system_name is NULL, it doesn't provide
> > a way to load firmware with prefix name, so add it.
>
> This is intended behavior.
>
> To load per-amp tuning you must know the function of each amp.
> You only know that if you know what hardware platform you are running
> on.
>
> So if system_name is NULL it should fall back to generic firmware.
Make sense
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
@ 2023-03-29 15:43 ` Jianhua Lu
0 siblings, 0 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 15:43 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Simon Trimmer, Charles Keepax, Cristian Ciocaltea, patches,
alsa-devel, linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 04:33:08PM +0100, Richard Fitzgerald wrote:
> On 29/3/23 14:05, Jianhua Lu wrote:
> > For platform using fdt, system_name is NULL, it doesn't provide
> > a way to load firmware with prefix name, so add it.
>
> This is intended behavior.
>
> To load per-amp tuning you must know the function of each amp.
> You only know that if you know what hardware platform you are running
> on.
>
> So if system_name is NULL it should fall back to generic firmware.
Make sense
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
2023-03-29 15:38 ` Richard Fitzgerald
@ 2023-03-29 15:49 ` Jianhua Lu
0 siblings, 0 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 15:49 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: Charles Keepax, Liam Girdwood, Mark Brown, Takashi Iwai,
Simon Trimmer, Cristian Ciocaltea, patches, alsa-devel,
linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 04:38:07PM +0100, Richard Fitzgerald wrote:
> On 29/3/23 15:37, Jianhua Lu wrote:
> > On Wed, Mar 29, 2023 at 02:05:24PM +0000, Charles Keepax wrote:
> >>
> >> This direction seems slightly problematic, especially in the
> >> context of amps (which I presume this relates to, please let know
> >> if that is wrong). It would probably be better to be fixing
> >> things up such that the amp in question sets system_name when
> >> registered through DT. Generally speaking the idea is the amp
> > I also consider setting system_name when registered by DT, but I don't
> > known setting what name to it. Card name or something else?
>
> It just has to be a unique string.
> The normal process is that Cirrus would release the firmware with the
> correct name for the platform, so the system-name matches the string in
> those release firmware files.
>
> Do you have an official firmware for your platform?
My device is Xiaomi Pad 5 Pro, vendor releases wmfw firmware with
default name, coeff firmware with prefix name(TL, TR and BL, BR....),
don't contain a unique string in firmware name.
>
> >>
> >> Thanks,
> >> Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name
@ 2023-03-29 15:49 ` Jianhua Lu
0 siblings, 0 replies; 13+ messages in thread
From: Jianhua Lu @ 2023-03-29 15:49 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: Charles Keepax, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Simon Trimmer, Cristian Ciocaltea, patches,
alsa-devel, linux-kernel, ~postmarketos/upstreaming, phone-devel
On Wed, Mar 29, 2023 at 04:38:07PM +0100, Richard Fitzgerald wrote:
> On 29/3/23 15:37, Jianhua Lu wrote:
> > On Wed, Mar 29, 2023 at 02:05:24PM +0000, Charles Keepax wrote:
> >>
> >> This direction seems slightly problematic, especially in the
> >> context of amps (which I presume this relates to, please let know
> >> if that is wrong). It would probably be better to be fixing
> >> things up such that the amp in question sets system_name when
> >> registered through DT. Generally speaking the idea is the amp
> > I also consider setting system_name when registered by DT, but I don't
> > known setting what name to it. Card name or something else?
>
> It just has to be a unique string.
> The normal process is that Cirrus would release the firmware with the
> correct name for the platform, so the system-name matches the string in
> those release firmware files.
>
> Do you have an official firmware for your platform?
My device is Xiaomi Pad 5 Pro, vendor releases wmfw firmware with
default name, coeff firmware with prefix name(TL, TR and BL, BR....),
don't contain a unique string in firmware name.
>
> >>
> >> Thanks,
> >> Charles
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-03-29 16:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29 13:05 [PATCH] Asoc: wm_adsp: Add support for loading firmware with prefix name Jianhua Lu
2023-03-29 14:05 ` Charles Keepax via Alsa-devel
2023-03-29 14:05 ` Charles Keepax
2023-03-29 14:37 ` Jianhua Lu
2023-03-29 14:37 ` Jianhua Lu
2023-03-29 15:38 ` Richard Fitzgerald via Alsa-devel
2023-03-29 15:38 ` Richard Fitzgerald
2023-03-29 15:49 ` Jianhua Lu
2023-03-29 15:49 ` Jianhua Lu
2023-03-29 15:33 ` Richard Fitzgerald
2023-03-29 15:43 ` Jianhua Lu
2023-03-29 15:43 ` Jianhua Lu
2023-03-29 15:33 ` Richard Fitzgerald via Alsa-devel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.