From: Cezary Rojewski Date: Fri, 12 Dec 2025 10:38:57 +0000 (+0100) Subject: ASoC: Intel: catpt: Specify image names in the device descriptor X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e97e07138f956a551895a9556d1a929978a5346d;p=thirdparty%2Fkernel%2Flinux.git ASoC: Intel: catpt: Specify image names in the device descriptor State files to load explicitly in the device descriptor instead of hiding the details within a loading function. Apart from readability, this also reduces the catpt module size slightly. Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20251212103858.110701-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/catpt/core.h b/sound/soc/intel/catpt/core.h index d273f24d3d530..df8a5fd95e13e 100644 --- a/sound/soc/intel/catpt/core.h +++ b/sound/soc/intel/catpt/core.h @@ -62,6 +62,7 @@ struct catpt_module_type { struct catpt_spec { struct snd_soc_acpi_mach *machines; u8 core_id; + const char *fw_name; u32 host_dram_offset; u32 host_iram_offset; u32 host_shim_offset; diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c index d8e0da558495f..0638aecba40de 100644 --- a/sound/soc/intel/catpt/device.c +++ b/sound/soc/intel/catpt/device.c @@ -348,6 +348,7 @@ static struct snd_soc_acpi_mach wpt_machines[] = { static struct catpt_spec lpt_desc = { .machines = lpt_machines, .core_id = 0x01, + .fw_name = "intel/IntcSST1.bin", .host_dram_offset = 0x000000, .host_iram_offset = 0x080000, .host_shim_offset = 0x0E7000, @@ -363,6 +364,7 @@ static struct catpt_spec lpt_desc = { static struct catpt_spec wpt_desc = { .machines = wpt_machines, .core_id = 0x02, + .fw_name = "intel/IntcSST2.bin", .host_dram_offset = 0x000000, .host_iram_offset = 0x0A0000, .host_shim_offset = 0x0FB000, diff --git a/sound/soc/intel/catpt/loader.c b/sound/soc/intel/catpt/loader.c index 80c4ab335525d..dc7afe587e6f2 100644 --- a/sound/soc/intel/catpt/loader.c +++ b/sound/soc/intel/catpt/loader.c @@ -580,10 +580,6 @@ release_fw: static int catpt_load_images(struct catpt_dev *cdev, bool restore) { - static const char *const names[] = { - "intel/IntcSST1.bin", - "intel/IntcSST2.bin", - }; struct dma_chan *chan; int ret; @@ -591,7 +587,7 @@ static int catpt_load_images(struct catpt_dev *cdev, bool restore) if (IS_ERR(chan)) return PTR_ERR(chan); - ret = catpt_load_image(cdev, chan, names[cdev->spec->core_id - 1], + ret = catpt_load_image(cdev, chan, cdev->spec->fw_name, FW_SIGNATURE, restore); if (ret) goto release_dma_chan;