diff options
author | Yong Zhi <yong.zhi@intel.com> | 2024-04-02 09:59:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-04-02 17:14:26 +0100 |
commit | f690cdcc01a5b549715fefe22a98962e7672516b (patch) | |
tree | ad99a11c04b31e5f8f136111d92918002337aeb3 /sound/soc/sof/ipc4-loader.c | |
parent | 2ae143fb3a057ad7d0a5f833386116441bfd5172 (diff) |
ASoC: SOF: ipc4-loader: save FW version info to debugfs
To check loaded FW version:
$ hexdump -C /sys/kernel/debug/sof/fw_version
00000000 02 00 07 00 63 00 01 00 00 00 00 00 00 00 00 00 |....c...........|
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240402145959.172619-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4-loader.c')
-rw-r--r-- | sound/soc/sof/ipc4-loader.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc4-loader.c b/sound/soc/sof/ipc4-loader.c index c79479afa8d0..641c4f24cca9 100644 --- a/sound/soc/sof/ipc4-loader.c +++ b/sound/soc/sof/ipc4-loader.c @@ -80,6 +80,14 @@ static ssize_t sof_ipc4_fw_parse_ext_man(struct snd_sof_dev *sdev, dev_dbg(sdev->dev, "Header length: %u, module count: %u\n", fw_header->len, fw_header->num_module_entries); + /* copy the fw_version of basefw into debugfs at first boot */ + if (fw == sdev->basefw.fw) { + sdev->fw_version.major = fw_header->major_version; + sdev->fw_version.minor = fw_header->minor_version; + sdev->fw_version.micro = fw_header->hotfix_version; + sdev->fw_version.build = fw_header->build_version; + } + fw_lib->modules = devm_kmalloc_array(sdev->dev, fw_header->num_module_entries, sizeof(*fw_module), GFP_KERNEL); if (!fw_lib->modules) |