Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Simon Trimmer <simont@opensource.cirrus.com>
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	broonie@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: wm_adsp: Expand firmware loading search options
Date: Thu, 3 Mar 2022 17:09:49 +0000	[thread overview]
Message-ID: <20220303170949.GR38351@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <20220303155016.122125-1-simont@opensource.cirrus.com>

On Thu, Mar 03, 2022 at 03:50:16PM +0000, Simon Trimmer wrote:
> The parts supported by this driver can have product-specific
> firmware and tunings files. Typically these have been used on
> embedded systems where the manufacturer is responsible for
> installing the correct product-specific firmware files into
> /lib/firmware. However, the linux-firmware repository places all
> available firmwares into /lib/firmware and it is up to the driver to
> select the correct product-specific firmware from that directory.
> 
> For example a product containing four smart amplifiers may provide
> firmware specific for that product and each of the amplifiers may
> have coefficient files containing tunings for their placement in the
> mechanical design.
> 
> This change extends firmware (wmfw) and coefficient (bin) filenames
> to be of the general form:
> 
> <cirrus/>part-dspN-fwtype<-system_name<-asoc_component_prefix>>.type
> 
> Where the cirrus subdirectory, system_name and asoc_component_prefix
> are optional.
> 
> New files will be placed in the cirrus subdirectory to avoid
> polluting the main /lib/firmware/ location. The generic name must be
> searched in /lib/firmware before /lib/firmware/cirrus so that a
> generic file in the new location does not override existing
> product-specific files in the legacy location.
> 
> The search order for firmware files is:
>   - cirrus/part-dspN-fwtype-system_name-asoc_component_prefix.wmfw
>   - cirrus/part-dspN-fwtype-system_name.wmfw
>   - part-dspN-fwtype.wmfw
>   - cirrus/part-dspN-fwtype.wmfw
> 
> - Qualifications are added to the filename so that rightwards is more
>   specific.
> - The system_name is provided by the codec driver.
> - The asoc_component_prefix is used to identify tunings for individual
>   parts because it would already exist to disambiguate the controls
>   and it makes it obvious which firmware file applies to which device.
> 
> The optional coefficient file must have the same filename
> construction as the discovered wmfw except:
>   - where the wmfw has only system_name then the bin file can
>     optionally include the asoc_component_prefix. This is to allow a
>     common wmfw for all amps but separate tunings per amp.
> 
> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

  reply	other threads:[~2022-03-03 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 15:50 [PATCH] ASoC: wm_adsp: Expand firmware loading search options Simon Trimmer
2022-03-03 17:09 ` Charles Keepax [this message]
2022-03-07 20:39 ` Mark Brown

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=20220303170949.GR38351@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=simont@opensource.cirrus.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