lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Mar 2023 16:33:08 +0100
From:   Richard Fitzgerald <rf@...nsource.cirrus.com>
To:     Jianhua Lu <lujianhua000@...il.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Simon Trimmer <simont@...nsource.cirrus.com>,
        Charles Keepax <ckeepax@...nsource.cirrus.com>,
        Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
CC:     <patches@...nsource.cirrus.com>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>,
        <~postmarketos/upstreaming@...ts.sr.ht>,
        <phone-devel@...r.kernel.org>
Subject: Re: [PATCH] Asoc: wm_adsp: Add support for loading firmware with
 prefix name

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@...il.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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ