All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Fitzgerald via Alsa-devel <alsa-devel@alsa-project.org>
To: <broonie@kernel.org>, <pierre-louis.bossart@linux.intel.com>
Cc: peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com,
	Simon Trimmer <simont@opensource.cirrus.com>,
	Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH v3 6/8] ASoC: wm_adsp: Add support for loading bin files without wmfw
Date: Mon, 20 Mar 2023 11:22:43 +0000	[thread overview]
Message-ID: <167931140648.26.12842285182456366955@mailman-core.alsa-project.org> (raw)
In-Reply-To: <20230320112245.115720-1-rf@opensource.cirrus.com>


[-- Attachment #0: Type: message/rfc822, Size: 6325 bytes --]

From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>, <pierre-louis.bossart@linux.intel.com>
Cc: peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Simon Trimmer <simont@opensource.cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH v3 6/8] ASoC: wm_adsp: Add support for loading bin files without wmfw
Date: Mon, 20 Mar 2023 11:22:43 +0000
Message-ID: <20230320112245.115720-7-rf@opensource.cirrus.com>

From: Simon Trimmer <simont@opensource.cirrus.com>

A self-booted DSP may have a file of coefficients to apply to the device
even when there is no firmware to download.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/wm_adsp.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index d4bffa2f7005..c23c306dc38d 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -850,8 +850,29 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
 		return 0;
 	}
 
-	if (dsp->wmfw_optional)
+	if (dsp->wmfw_optional) {
+		if (system_name) {
+			if (asoc_component_prefix)
+				wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+							      cirrus_dir, system_name,
+							      asoc_component_prefix, "bin");
+
+			if (!*coeff_firmware)
+				wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+							      cirrus_dir, system_name,
+							      NULL, "bin");
+		}
+
+		if (!*coeff_firmware)
+			wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+						      "", NULL, NULL, "bin");
+
+		if (!*coeff_firmware)
+			wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+						      cirrus_dir, NULL, NULL, "bin");
+
 		return 0;
+	}
 
 	adsp_err(dsp, "Failed to request firmware <%s>%s-%s-%s<-%s<%s>>.wmfw\n",
 		 cirrus_dir, dsp->part, dsp->fwf_name, wm_adsp_fw[dsp->fw].file,
-- 
2.30.2


  parent reply	other threads:[~2023-03-20 11:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 11:22 [PATCH v3 0/8] ASoC: Initial support for Cirrus Logic CS35L56 Richard Fitzgerald
2023-03-20 11:22 ` [PATCH v3 1/8] firmware: cs_dsp: Introduce no_core_startstop for self-booting DSPs Richard Fitzgerald
2023-03-20 11:22 ` Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` [PATCH v3 2/8] ASoC: wm_adsp: Use no_core_startstop to prevent creating preload control Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` Richard Fitzgerald
2023-03-20 11:22 ` [PATCH v3 3/8] firmware: cs_dsp: Support DSPs that don't require firmware download Richard Fitzgerald
2023-03-20 11:22 ` Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` [PATCH v3 4/8] ASoC: wm_adsp: " Richard Fitzgerald
2023-03-20 11:22 ` Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` [PATCH v3 5/8] ASoC: wm_adsp: Expose the DSP boot work actions as wm_adsp_power_up() Richard Fitzgerald
2023-03-20 11:22 ` Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` [PATCH v3 6/8] ASoC: wm_adsp: Add support for loading bin files without wmfw Richard Fitzgerald
2023-03-20 11:22 ` Richard Fitzgerald via Alsa-devel [this message]
2023-03-20 11:22 ` [PATCH v3 7/8] ASoC: wm_adsp: Simplify the logging of requested firmware files Richard Fitzgerald
2023-03-20 11:22 ` Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` [PATCH v3 8/8] ASoC: cs35l56: Add driver for Cirrus Logic CS35L56 Richard Fitzgerald via Alsa-devel
2023-03-20 11:22 ` Richard Fitzgerald
2023-03-21 16:51 ` [PATCH v3 0/8] ASoC: Initial support " 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=167931140648.26.12842285182456366955@mailman-core.alsa-project.org \
    --to=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rf@opensource.cirrus.com \
    --cc=simont@opensource.cirrus.com \
    --cc=yung-chuan.liao@linux.intel.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 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.