[alsa-devel] [PATCH v3 09/14] ASoC: SOF: Add firmware loader support

Mark Brown broonie at kernel.org
Wed Jan 9 22:02:33 CET 2019


On Tue, Dec 11, 2018 at 03:23:13PM -0600, Pierre-Louis Bossart wrote:

> +int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
> +{
> +	struct snd_sof_pdata *plat_data = dev_get_platdata(sdev->dev);
> +	const char *fw_filename;
> +	int ret;

This never actually calls the load_firmware() operation for the DSP
AFAICT?

> +	ret = request_firmware(&plat_data->fw, fw_filename, sdev->dev);
> +
> +	if (ret < 0) {
> +		dev_err(sdev->dev, "error: request firmware failed err: %d\n",
> +			ret);
> +		return ret;
> +	}

I'd suggest logging the name of the firmware we tried to load, users
will thank you.

> +	/* create fw_version debugfs to store boot version info */
> +	if (sdev->first_boot) {
> +		ret = snd_sof_debugfs_buf_create_item(sdev, &sdev->fw_version,
> +						      sizeof(sdev->fw_version),
> +						      "fw_version");
> +
> +		if (ret < 0) {
> +			dev_err(sdev->dev, "error: cannot create debugfs for fw_version\n");
> +			return ret;
> +		}
> +	}

As Andy said elsewhere debugfs stuff like that probably shouldn't be
fatal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20190109/9a3d1bb2/attachment.sig>


More information about the Alsa-devel mailing list